; LLVM IR from MtSaka/library :: test/yosupo/data_structure/predecessor_problem.test (main)

; 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.FastSet = type { i64, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca %struct.FastSet, align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i8, align 1
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store i32 0, ptr %1, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @_Z4scanIiJiEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3)
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #6
  %15 = load i32, ptr %2, align 4, !tbaa !5
  call void @_ZN7FastSetILi64EEC2Ei(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %15)
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  invoke void @_Z4scanINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJEEvRT_DpRT0_(ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %16 unwind label %23

16:                                               ; preds = %0
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !9
  br label %17

17:                                               ; preds = %43, %16
  %18 = load i64, ptr %8, align 8, !tbaa !9
  %19 = load i32, ptr %2, align 4, !tbaa !5
  %20 = sext i32 %19 to i64
  %21 = icmp slt i64 %18, %20
  br i1 %21, label %27, label %22

22:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %46

23:                                               ; preds = %0
  %24 = landingpad { ptr, i32 }
          cleanup
  %25 = extractvalue { ptr, i32 } %24, 0
  store ptr %25, ptr %6, align 8
  %26 = extractvalue { ptr, i32 } %24, 1
  store i32 %26, ptr %7, align 4
  br label %131

27:                                               ; preds = %17
  %28 = load i64, ptr %8, align 8, !tbaa !9
  %29 = invoke noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %5, i64 noundef %28)
          to label %30 unwind label %38

30:                                               ; preds = %27
  %31 = load i8, ptr %29, align 1, !tbaa !11
  %32 = sext i8 %31 to i32
  %33 = icmp eq i32 %32, 49
  br i1 %33, label %34, label %42

34:                                               ; preds = %30
  %35 = load i64, ptr %8, align 8, !tbaa !9
  %36 = trunc i64 %35 to i32
  invoke void @_ZN7FastSetILi64EE6insertEi(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %36)
          to label %37 unwind label %38

37:                                               ; preds = %34
  br label %42

38:                                               ; preds = %34, %27
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %6, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %131

42:                                               ; preds = %37, %30
  br label %43

43:                                               ; preds = %42
  %44 = load i64, ptr %8, align 8, !tbaa !9
  %45 = add nsw i64 %44, 1
  store i64 %45, ptr %8, align 8, !tbaa !9
  br label %17, !llvm.loop !12

46:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store i64 0, ptr %9, align 8, !tbaa !9
  br label %47

47:                                               ; preds = %125, %46
  %48 = load i64, ptr %9, align 8, !tbaa !9
  %49 = load i32, ptr %3, align 4, !tbaa !5
  %50 = sext i32 %49 to i64
  %51 = icmp slt i64 %48, %50
  br i1 %51, label %53, label %52

52:                                               ; preds = %47
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %129

53:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  invoke void @_Z4scanIiJiEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %54 unwind label %64

54:                                               ; preds = %53
  %55 = load i32, ptr %10, align 4, !tbaa !5
  %56 = icmp eq i32 %55, 0
  br i1 %56, label %57, label %69

57:                                               ; preds = %54
  %58 = load i32, ptr %11, align 4, !tbaa !5
  %59 = invoke noundef zeroext i1 @_ZN7FastSetILi64EE8containsEi(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %58)
          to label %60 unwind label %64

60:                                               ; preds = %57
  br i1 %59, label %68, label %61

61:                                               ; preds = %60
  %62 = load i32, ptr %11, align 4, !tbaa !5
  invoke void @_ZN7FastSetILi64EE6insertEi(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %62)
          to label %63 unwind label %64

63:                                               ; preds = %61
  br label %68

64:                                               ; preds = %76, %72, %61, %57, %53
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %6, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %7, align 4
  br label %128

68:                                               ; preds = %63, %60
  br label %124

69:                                               ; preds = %54
  %70 = load i32, ptr %10, align 4, !tbaa !5
  %71 = icmp eq i32 %70, 1
  br i1 %71, label %72, label %80

72:                                               ; preds = %69
  %73 = load i32, ptr %11, align 4, !tbaa !5
  %74 = invoke noundef zeroext i1 @_ZN7FastSetILi64EE8containsEi(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %73)
          to label %75 unwind label %64

75:                                               ; preds = %72
  br i1 %74, label %76, label %79

76:                                               ; preds = %75
  %77 = load i32, ptr %11, align 4, !tbaa !5
  invoke void @_ZN7FastSetILi64EE5eraseEi(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %77)
          to label %78 unwind label %64

78:                                               ; preds = %76
  br label %79

79:                                               ; preds = %78, %75
  br label %123

80:                                               ; preds = %69
  %81 = load i32, ptr %10, align 4, !tbaa !5
  %82 = icmp eq i32 %81, 2
  br i1 %82, label %83, label %93

83:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  %84 = load i32, ptr %11, align 4, !tbaa !5
  %85 = invoke noundef zeroext i1 @_ZN7FastSetILi64EE8containsEi(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %84)
          to label %86 unwind label %89

86:                                               ; preds = %83
  %87 = zext i1 %85 to i8
  store i8 %87, ptr %12, align 1, !tbaa !14
  invoke void @_Z5printIbEvRKT_(ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %88 unwind label %89

88:                                               ; preds = %86
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  br label %122

89:                                               ; preds = %86, %83
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %6, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  br label %128

93:                                               ; preds = %80
  %94 = load i32, ptr %10, align 4, !tbaa !5
  %95 = icmp eq i32 %94, 3
  br i1 %95, label %96, label %111

96:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %97 = load i32, ptr %11, align 4, !tbaa !5
  %98 = sub nsw i32 %97, 1
  %99 = invoke noundef i32 @_ZN7FastSetILi64EE4nextEi(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %98)
          to label %100 unwind label %105

100:                                              ; preds = %96
  store i32 %99, ptr %13, align 4, !tbaa !5
  %101 = load i32, ptr %13, align 4, !tbaa !5
  %102 = load i32, ptr %2, align 4, !tbaa !5
  %103 = icmp eq i32 %101, %102
  br i1 %103, label %104, label %109

104:                                              ; preds = %100
  store i32 -1, ptr %13, align 4, !tbaa !5
  br label %109

105:                                              ; preds = %109, %96
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %6, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %128

109:                                              ; preds = %104, %100
  invoke void @_Z5printIiEvRKT_(ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %110 unwind label %105

110:                                              ; preds = %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  br label %121

111:                                              ; preds = %93
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %112 = load i32, ptr %11, align 4, !tbaa !5
  %113 = add nsw i32 %112, 1
  %114 = invoke noundef i32 @_ZN7FastSetILi64EE4prevEi(ptr noundef nonnull align 8 dereferenceable(32) %4, i32 noundef %113)
          to label %115 unwind label %117

115:                                              ; preds = %111
  store i32 %114, ptr %14, align 4, !tbaa !5
  invoke void @_Z5printIiEvRKT_(ptr noundef nonnull align 4 dereferenceable(4) %14)
          to label %116 unwind label %117

116:                                              ; preds = %115
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %121

117:                                              ; preds = %115, %111
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %6, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %128

121:                                              ; preds = %116, %110
  br label %122

122:                                              ; preds = %121, %88
  br label %123

123:                                              ; preds = %122, %79
  br label %124

124:                                              ; preds = %123, %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %125

125:                                              ; preds = %124
  %126 = load i64, ptr %9, align 8, !tbaa !9
  %127 = add nsw i64 %126, 1
  store i64 %127, ptr %9, align 8, !tbaa !9
  br label %47, !llvm.loop !16

128:                                              ; preds = %117, %105, %89, %64
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %131

129:                                              ; preds = %52
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #6
  call void @_ZN7FastSetILi64EED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %130 = load i32, ptr %1, align 4
  ret i32 %130

131:                                              ; preds = %128, %38, %23
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #6
  call void @_ZN7FastSetILi64EED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  br label %132

132:                                              ; preds = %131
  %133 = load ptr, ptr %6, align 8
  %134 = load i32, ptr %7, align 4
  %135 = insertvalue { ptr, i32 } poison, ptr %133, 0
  %136 = insertvalue { ptr, i32 } %135, i32 %134, 1
  resume { ptr, i32 } %136
}

; 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 dso_local void @_Z4scanIiJiEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7FastSetILi64EEC2Ei(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z4scanINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJEEvRT_DpRT0_(ptr noundef nonnull align 8 dereferenceable(32)) #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7FastSetILi64EE6insertEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #4 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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN7FastSetILi64EE8containsEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7FastSetILi64EE5eraseEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z5printIbEvRKT_(ptr noundef nonnull align 1 dereferenceable(1)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN7FastSetILi64EE4nextEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z5printIiEvRKT_(ptr noundef nonnull align 4 dereferenceable(4)) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7FastSetILi64EE4prevEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

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

attributes #0 = { mustprogress norecurse 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 #5 = { 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 #6 = { 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, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = distinct !{!16, !13}


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

%struct.FastSet = type { i64, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca %struct.FastSet, align 8
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i8, align 1
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @_Z4scanIiJiEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 4 dereferenceable(4) %2)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #6
  %10 = load i32, ptr %1, align 4, !tbaa !5
  call void @_ZN7FastSetILi64EEC2Ei(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %10)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  invoke void @_Z4scanINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJEEvRT_DpRT0_(ptr noundef nonnull align 8 dereferenceable(32) %4)
          to label %.preheader15 unwind label %15

.preheader15:                                     ; preds = %0
  %11 = load i32, ptr %1, align 4, !tbaa !5
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph, label %.preheader

.preheader:                                       ; preds = %22, %.preheader15
  %13 = load i32, ptr %2, align 4, !tbaa !5
  %14 = icmp sgt i32 %13, 0
  br i1 %14, label %.lr.ph18, label %._crit_edge

15:                                               ; preds = %0
  %16 = landingpad { ptr, i32 }
          cleanup
  br label %71

.lr.ph:                                           ; preds = %.preheader15, %22
  %.0816 = phi i64 [ %23, %22 ], [ 0, %.preheader15 ]
  %17 = call noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32) %4, i64 noundef %.0816)
  %18 = load i8, ptr %17, align 1, !tbaa !9
  %19 = icmp eq i8 %18, 49
  br i1 %19, label %20, label %22

20:                                               ; preds = %.lr.ph
  %21 = trunc i64 %.0816 to i32
  call void @_ZN7FastSetILi64EE6insertEi(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %21)
  br label %22

22:                                               ; preds = %.lr.ph, %20
  %23 = add nuw nsw i64 %.0816, 1
  %24 = load i32, ptr %1, align 4, !tbaa !5
  %25 = sext i32 %24 to i64
  %26 = icmp slt i64 %23, %25
  br i1 %26, label %.lr.ph, label %.preheader, !llvm.loop !10

._crit_edge:                                      ; preds = %65, %.preheader
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  call void @_ZN7FastSetILi64EED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0

.lr.ph18:                                         ; preds = %.preheader, %65
  %.017 = phi i64 [ %66, %65 ], [ 0, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #6
  invoke void @_Z4scanIiJiEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %27 unwind label %34

27:                                               ; preds = %.lr.ph18
  %28 = load i32, ptr %5, align 4, !tbaa !5
  switch i32 %28, label %57 [
    i32 0, label %29
    i32 1, label %36
    i32 2, label %41
    i32 3, label %48
  ]

29:                                               ; preds = %27
  %30 = load i32, ptr %6, align 4, !tbaa !5
  %31 = call noundef zeroext i1 @_ZN7FastSetILi64EE8containsEi(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %30)
  br i1 %31, label %65, label %32

32:                                               ; preds = %29
  %33 = load i32, ptr %6, align 4, !tbaa !5
  call void @_ZN7FastSetILi64EE6insertEi(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %33)
  br label %65

34:                                               ; preds = %.lr.ph18
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %70

36:                                               ; preds = %27
  %37 = load i32, ptr %6, align 4, !tbaa !5
  %38 = call noundef zeroext i1 @_ZN7FastSetILi64EE8containsEi(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %37)
  br i1 %38, label %39, label %65

39:                                               ; preds = %36
  %40 = load i32, ptr %6, align 4, !tbaa !5
  call void @_ZN7FastSetILi64EE5eraseEi(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %40)
  br label %65

41:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #6
  %42 = load i32, ptr %6, align 4, !tbaa !5
  %43 = call noundef zeroext i1 @_ZN7FastSetILi64EE8containsEi(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %42)
  %44 = zext i1 %43 to i8
  store i8 %44, ptr %7, align 1, !tbaa !12
  invoke void @_Z5printIbEvRKT_(ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %45 unwind label %46

45:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  br label %65

46:                                               ; preds = %41
  %47 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #6
  br label %70

48:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  %49 = load i32, ptr %6, align 4, !tbaa !5
  %50 = add nsw i32 %49, -1
  %51 = call noundef i32 @_ZN7FastSetILi64EE4nextEi(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %50)
  %52 = load i32, ptr %1, align 4, !tbaa !5
  %53 = icmp eq i32 %51, %52
  %spec.store.select = select i1 %53, i32 -1, i32 %51
  store i32 %spec.store.select, ptr %8, align 4
  invoke void @_Z5printIiEvRKT_(ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %56 unwind label %54

54:                                               ; preds = %48
  %55 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  br label %70

56:                                               ; preds = %48
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  br label %65

57:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  %58 = load i32, ptr %6, align 4, !tbaa !5
  %59 = add nsw i32 %58, 1
  %60 = invoke noundef i32 @_ZN7FastSetILi64EE4prevEi(ptr noundef nonnull align 8 dereferenceable(32) %3, i32 noundef %59)
          to label %61 unwind label %63

61:                                               ; preds = %57
  store i32 %60, ptr %9, align 4, !tbaa !5
  invoke void @_Z5printIiEvRKT_(ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %62 unwind label %63

62:                                               ; preds = %61
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  br label %65

63:                                               ; preds = %61, %57
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  br label %70

65:                                               ; preds = %39, %36, %56, %62, %45, %29, %32
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  %66 = add nuw nsw i64 %.017, 1
  %67 = load i32, ptr %2, align 4, !tbaa !5
  %68 = sext i32 %67 to i64
  %69 = icmp slt i64 %66, %68
  br i1 %69, label %.lr.ph18, label %._crit_edge, !llvm.loop !14

70:                                               ; preds = %63, %54, %46, %34
  %.pn = phi { ptr, i32 } [ %47, %46 ], [ %55, %54 ], [ %64, %63 ], [ %35, %34 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  br label %71

71:                                               ; preds = %70, %15
  %.pn.pn = phi { ptr, i32 } [ %.pn, %70 ], [ %16, %15 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #6
  call void @_ZN7FastSetILi64EED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: mustprogress 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 dso_local void @_Z4scanIiJiEEvRT_DpRT0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7FastSetILi64EEC2Ei(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z4scanINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJEEvRT_DpRT0_(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 1 dereferenceable(1) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7FastSetILi64EE6insertEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN7FastSetILi64EE8containsEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7FastSetILi64EE5eraseEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z5printIbEvRKT_(ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN7FastSetILi64EE4nextEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #4 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z5printIiEvRKT_(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN7FastSetILi64EE4prevEi(ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #4 align 2

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

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


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass