; LLVM IR from nickgildea/z3_codegen :: codegen (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"

%"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 }
%class.ISASubset = type { %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZTIN2z39exceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.19 = external hidden unnamed_addr constant [29 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_Z12FindSolutioniRK9ISASubset(i32 noundef, ptr noundef nonnull align 8 dereferenceable(24)) #2

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca %class.ISASubset, align 8
  %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 ptr, align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #9
  call void @_ZN9ISASubsetC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  %14 = invoke noundef i32 @_Z17ISA_OpCodeForNamePKc(ptr noundef @.str.7)
          to label %15 unwind label %30

15:                                               ; preds = %2
  invoke void @_ZN9ISASubset9addOpcodeEi(ptr noundef nonnull align 8 dereferenceable(24) %6, i32 noundef %14)
          to label %16 unwind label %30

16:                                               ; preds = %15
  %17 = invoke noundef i32 @_Z17ISA_OpCodeForNamePKc(ptr noundef @.str.16)
          to label %18 unwind label %30

18:                                               ; preds = %16
  invoke void @_ZN9ISASubset9addOpcodeEi(ptr noundef nonnull align 8 dereferenceable(24) %6, i32 noundef %17)
          to label %19 unwind label %30

19:                                               ; preds = %18
  %20 = invoke noundef i32 @_Z17ISA_OpCodeForNamePKc(ptr noundef @.str.17)
          to label %21 unwind label %30

21:                                               ; preds = %19
  invoke void @_ZN9ISASubset9addOpcodeEi(ptr noundef nonnull align 8 dereferenceable(24) %6, i32 noundef %20)
          to label %22 unwind label %30

22:                                               ; preds = %21
  %23 = invoke noundef i32 @_Z17ISA_OpCodeForNamePKc(ptr noundef @.str.18)
          to label %24 unwind label %30

24:                                               ; preds = %22
  invoke void @_ZN9ISASubset9addOpcodeEi(ptr noundef nonnull align 8 dereferenceable(24) %6, i32 noundef %23)
          to label %25 unwind label %30

25:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  store i32 2, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #9
  store i32 8, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #9
  store i32 2, ptr %11, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %62, %25
  %27 = load i32, ptr %11, align 4, !tbaa !5
  %28 = icmp slt i32 %27, 8
  br i1 %28, label %34, label %29

29:                                               ; preds = %26
  store i32 2, ptr %12, align 4
  br label %76

30:                                               ; preds = %24, %22, %21, %19, %18, %16, %15, %2
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %7, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %8, align 4
  br label %80

34:                                               ; preds = %26
  %35 = load i32, ptr %11, align 4, !tbaa !5
  %36 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.19, i32 noundef %35)
          to label %37 unwind label %42

37:                                               ; preds = %34
  %38 = load i32, ptr %11, align 4, !tbaa !5
  %39 = invoke noundef zeroext i1 @_Z12FindSolutioniRK9ISASubset(i32 noundef %38, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %40 unwind label %42

40:                                               ; preds = %37
  br i1 %39, label %41, label %65

41:                                               ; preds = %40
  store i32 2, ptr %12, align 4
  br label %76

42:                                               ; preds = %37, %34
  %43 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN2z39exceptionE
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %7, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %8, align 4
  br label %46

46:                                               ; preds = %42
  %47 = load i32, ptr %8, align 4
  %48 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTIN2z39exceptionE) #9
  %49 = icmp eq i32 %47, %48
  br i1 %49, label %50, label %77

50:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  %51 = load ptr, ptr %7, align 8
  %52 = call ptr @__cxa_begin_catch(ptr %51) #9
  store ptr %52, ptr %13, align 8
  %53 = load ptr, ptr %13, align 8, !tbaa !9
  %54 = invoke noundef ptr @_ZNK2z39exception3msgEv(ptr noundef nonnull align 8 dereferenceable(40) %53)
          to label %55 unwind label %66

55:                                               ; preds = %50
  %56 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef %54)
          to label %57 unwind label %66

57:                                               ; preds = %55
  %58 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %56, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %59 unwind label %66

59:                                               ; preds = %57
  invoke void @__cxa_end_catch()
          to label %60 unwind label %70

60:                                               ; preds = %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  br label %61

61:                                               ; preds = %65, %60
  br label %62

62:                                               ; preds = %61
  %63 = load i32, ptr %11, align 4, !tbaa !5
  %64 = add nsw i32 %63, 1
  store i32 %64, ptr %11, align 4, !tbaa !5
  br label %26, !llvm.loop !11

65:                                               ; preds = %40
  br label %61

66:                                               ; preds = %57, %55, %50
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %7, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %8, align 4
  invoke void @__cxa_end_catch()
          to label %74 unwind label %86

70:                                               ; preds = %59
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %7, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %8, align 4
  br label %75

74:                                               ; preds = %66
  br label %75

75:                                               ; preds = %74, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  br label %77

76:                                               ; preds = %41, %29
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  br label %78

77:                                               ; preds = %75, %46
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  br label %80

78:                                               ; preds = %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  call void @_ZN9ISASubsetD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #9
  %79 = load i32, ptr %3, align 4
  ret i32 %79

80:                                               ; preds = %77, %30
  call void @_ZN9ISASubsetD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #9
  br label %81

81:                                               ; preds = %80
  %82 = load ptr, ptr %7, align 8
  %83 = load i32, ptr %8, align 4
  %84 = insertvalue { ptr, i32 } poison, ptr %82, 0
  %85 = insertvalue { ptr, i32 } %84, i32 %83, 1
  resume { ptr, i32 } %85

86:                                               ; preds = %66
  %87 = landingpad { ptr, i32 }
          catch ptr null
  %88 = extractvalue { ptr, i32 } %87, 0
  call void @__clang_call_terminate(ptr %88) #10
  unreachable
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9ISASubsetC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9ISASubset9addOpcodeEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #2 align 2

declare noundef i32 @_Z17ISA_OpCodeForNamePKc(ptr noundef) #1

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #5

declare ptr @__cxa_begin_catch(ptr)

; 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) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK2z39exception3msgEv(ptr noundef nonnull align 8 dereferenceable(40)) #7 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) #2 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)) #6

declare void @__cxa_end_catch()

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #8

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9ISASubsetD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 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 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 #4 = { 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 #5 = { nounwind memory(none) }
attributes #6 = { 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 #7 = { 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 #8 = { noinline noreturn nounwind uwtable "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 #9 = { nounwind }
attributes #10 = { noreturn 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 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"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::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 }
%class.ISASubset = type { %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.7 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZTIN2z39exceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.19 = external hidden unnamed_addr constant [29 x i8], align 1
@_ZSt4cout = external global %"class.std::basic_ostream", align 8

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readnone %1) local_unnamed_addr #3 personality ptr @__gxx_personality_v0 {
  %3 = alloca %class.ISASubset, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #10
  call void @_ZN9ISASubsetC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #10
  %4 = invoke noundef i32 @_Z17ISA_OpCodeForNamePKc(ptr noundef nonnull @.str.7)
          to label %5 unwind label %95

5:                                                ; preds = %2
  invoke void @_ZN9ISASubset9addOpcodeEi(ptr noundef nonnull align 8 dereferenceable(24) %3, i32 noundef %4)
          to label %6 unwind label %95

6:                                                ; preds = %5
  %7 = invoke noundef i32 @_Z17ISA_OpCodeForNamePKc(ptr noundef nonnull @.str.16)
          to label %8 unwind label %95

8:                                                ; preds = %6
  invoke void @_ZN9ISASubset9addOpcodeEi(ptr noundef nonnull align 8 dereferenceable(24) %3, i32 noundef %7)
          to label %9 unwind label %95

9:                                                ; preds = %8
  %10 = invoke noundef i32 @_Z17ISA_OpCodeForNamePKc(ptr noundef nonnull @.str.17)
          to label %11 unwind label %95

11:                                               ; preds = %9
  invoke void @_ZN9ISASubset9addOpcodeEi(ptr noundef nonnull align 8 dereferenceable(24) %3, i32 noundef %10)
          to label %12 unwind label %95

12:                                               ; preds = %11
  %13 = invoke noundef i32 @_Z17ISA_OpCodeForNamePKc(ptr noundef nonnull @.str.18)
          to label %14 unwind label %95

14:                                               ; preds = %12
  invoke void @_ZN9ISASubset9addOpcodeEi(ptr noundef nonnull align 8 dereferenceable(24) %3, i32 noundef %13)
          to label %.preheader.peel unwind label %95

.preheader.peel:                                  ; preds = %14
  %15 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19, i32 noundef 2)
  %16 = invoke noundef zeroext i1 @_Z12FindSolutioniRK9ISASubset(i32 noundef 2, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %30 unwind label %17

17:                                               ; preds = %.preheader.peel
  %18 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN2z39exceptionE
  %19 = extractvalue { ptr, i32 } %18, 1
  %20 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTIN2z39exceptionE) #10
  %21 = icmp eq i32 %19, %20
  br i1 %21, label %22, label %.loopexit

22:                                               ; preds = %17
  %23 = extractvalue { ptr, i32 } %18, 0
  %24 = call ptr @__cxa_begin_catch(ptr %23) #10
  %25 = call noundef ptr @_ZNK2z39exception3msgEv(ptr noundef nonnull align 8 dereferenceable(40) %24)
  %26 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef %25)
          to label %27 unwind label %.loopexit.split-lp

27:                                               ; preds = %22
  %28 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %29 unwind label %.loopexit.split-lp

29:                                               ; preds = %27
  invoke void @__cxa_end_catch()
          to label %.preheader.peel29 unwind label %.loopexit.split-lp55

30:                                               ; preds = %.preheader.peel
  br i1 %16, label %.loopexit59, label %.preheader.peel29

.preheader.peel29:                                ; preds = %29, %30
  %31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19, i32 noundef 3)
  %32 = invoke noundef zeroext i1 @_Z12FindSolutioniRK9ISASubset(i32 noundef 3, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %46 unwind label %33

33:                                               ; preds = %.preheader.peel29
  %34 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN2z39exceptionE
  %35 = extractvalue { ptr, i32 } %34, 1
  %36 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTIN2z39exceptionE) #10
  %37 = icmp eq i32 %35, %36
  br i1 %37, label %38, label %.loopexit

38:                                               ; preds = %33
  %39 = extractvalue { ptr, i32 } %34, 0
  %40 = call ptr @__cxa_begin_catch(ptr %39) #10
  %41 = call noundef ptr @_ZNK2z39exception3msgEv(ptr noundef nonnull align 8 dereferenceable(40) %40)
  %42 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef %41)
          to label %43 unwind label %.loopexit.split-lp

43:                                               ; preds = %38
  %44 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %45 unwind label %.loopexit.split-lp

45:                                               ; preds = %43
  invoke void @__cxa_end_catch()
          to label %.preheader.peel35 unwind label %.loopexit.split-lp55

46:                                               ; preds = %.preheader.peel29
  br i1 %32, label %.loopexit59, label %.preheader.peel35

.preheader.peel35:                                ; preds = %45, %46
  %47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19, i32 noundef 4)
  %48 = invoke noundef zeroext i1 @_Z12FindSolutioniRK9ISASubset(i32 noundef 4, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %62 unwind label %49

49:                                               ; preds = %.preheader.peel35
  %50 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN2z39exceptionE
  %51 = extractvalue { ptr, i32 } %50, 1
  %52 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTIN2z39exceptionE) #10
  %53 = icmp eq i32 %51, %52
  br i1 %53, label %54, label %.loopexit

54:                                               ; preds = %49
  %55 = extractvalue { ptr, i32 } %50, 0
  %56 = call ptr @__cxa_begin_catch(ptr %55) #10
  %57 = call noundef ptr @_ZNK2z39exception3msgEv(ptr noundef nonnull align 8 dereferenceable(40) %56)
  %58 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef %57)
          to label %59 unwind label %.loopexit.split-lp

59:                                               ; preds = %54
  %60 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %58, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %61 unwind label %.loopexit.split-lp

61:                                               ; preds = %59
  invoke void @__cxa_end_catch()
          to label %.preheader.peel41 unwind label %.loopexit.split-lp55

62:                                               ; preds = %.preheader.peel35
  br i1 %48, label %.loopexit59, label %.preheader.peel41

.preheader.peel41:                                ; preds = %61, %62
  %63 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19, i32 noundef 5)
  %64 = invoke noundef zeroext i1 @_Z12FindSolutioniRK9ISASubset(i32 noundef 5, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %78 unwind label %65

65:                                               ; preds = %.preheader.peel41
  %66 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN2z39exceptionE
  %67 = extractvalue { ptr, i32 } %66, 1
  %68 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTIN2z39exceptionE) #10
  %69 = icmp eq i32 %67, %68
  br i1 %69, label %70, label %.loopexit

70:                                               ; preds = %65
  %71 = extractvalue { ptr, i32 } %66, 0
  %72 = call ptr @__cxa_begin_catch(ptr %71) #10
  %73 = call noundef ptr @_ZNK2z39exception3msgEv(ptr noundef nonnull align 8 dereferenceable(40) %72)
  %74 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef %73)
          to label %75 unwind label %.loopexit.split-lp

75:                                               ; preds = %70
  %76 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %74, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %77 unwind label %.loopexit.split-lp

77:                                               ; preds = %75
  invoke void @__cxa_end_catch()
          to label %.preheader.peel47 unwind label %.loopexit.split-lp55

78:                                               ; preds = %.preheader.peel41
  br i1 %64, label %.loopexit59, label %.preheader.peel47

.preheader.peel47:                                ; preds = %77, %78
  %79 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19, i32 noundef 6)
  %80 = invoke noundef zeroext i1 @_Z12FindSolutioniRK9ISASubset(i32 noundef 6, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %94 unwind label %81

81:                                               ; preds = %.preheader.peel47
  %82 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN2z39exceptionE
  %83 = extractvalue { ptr, i32 } %82, 1
  %84 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTIN2z39exceptionE) #10
  %85 = icmp eq i32 %83, %84
  br i1 %85, label %86, label %.loopexit

86:                                               ; preds = %81
  %87 = extractvalue { ptr, i32 } %82, 0
  %88 = call ptr @__cxa_begin_catch(ptr %87) #10
  %89 = call noundef ptr @_ZNK2z39exception3msgEv(ptr noundef nonnull align 8 dereferenceable(40) %88)
  %90 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef %89)
          to label %91 unwind label %.loopexit.split-lp

91:                                               ; preds = %86
  %92 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %93 unwind label %.loopexit.split-lp

93:                                               ; preds = %91
  invoke void @__cxa_end_catch()
          to label %.preheader unwind label %.loopexit.split-lp55

94:                                               ; preds = %.preheader.peel47
  br i1 %80, label %.loopexit59, label %.preheader

95:                                               ; preds = %14, %12, %11, %9, %8, %6, %5, %2
  %96 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

.preheader:                                       ; preds = %93, %94
  %97 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.19, i32 noundef 7)
  %98 = invoke noundef zeroext i1 @_Z12FindSolutioniRK9ISASubset(i32 noundef 7, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %.loopexit59 unwind label %99

99:                                               ; preds = %.preheader
  %100 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTIN2z39exceptionE
  %101 = extractvalue { ptr, i32 } %100, 1
  %102 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTIN2z39exceptionE) #10
  %103 = icmp eq i32 %101, %102
  br i1 %103, label %104, label %.loopexit

104:                                              ; preds = %99
  %105 = extractvalue { ptr, i32 } %100, 0
  %106 = call ptr @__cxa_begin_catch(ptr %105) #10
  %107 = call noundef ptr @_ZNK2z39exception3msgEv(ptr noundef nonnull align 8 dereferenceable(40) %106)
  %108 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef %107)
          to label %109 unwind label %.loopexit53

109:                                              ; preds = %104
  %110 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %108, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %111 unwind label %.loopexit53

111:                                              ; preds = %109
  invoke void @__cxa_end_catch()
          to label %.loopexit59 unwind label %.loopexit54

.loopexit53:                                      ; preds = %104, %109
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %112

.loopexit.split-lp:                               ; preds = %22, %27, %38, %43, %54, %59, %70, %75, %86, %91
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %112

112:                                              ; preds = %.loopexit.split-lp, %.loopexit53
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit53 ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  invoke void @__cxa_end_catch()
          to label %.loopexit unwind label %113

.loopexit54:                                      ; preds = %111
  %lpad.loopexit56 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

.loopexit.split-lp55:                             ; preds = %29, %45, %61, %77, %93
  %lpad.loopexit.split-lp57 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

.loopexit59:                                      ; preds = %.preheader, %111, %94, %78, %62, %46, %30
  call void @_ZN9ISASubsetD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #10
  ret i32 0

.loopexit:                                        ; preds = %17, %33, %49, %65, %81, %99, %.loopexit54, %.loopexit.split-lp55, %112, %95
  %.merged = phi { ptr, i32 } [ %96, %95 ], [ %lpad.phi, %112 ], [ %lpad.loopexit56, %.loopexit54 ], [ %lpad.loopexit.split-lp57, %.loopexit.split-lp55 ], [ %18, %17 ], [ %34, %33 ], [ %50, %49 ], [ %66, %65 ], [ %82, %81 ], [ %100, %99 ]
  call void @_ZN9ISASubsetD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #10
  resume { ptr, i32 } %.merged

113:                                              ; preds = %112
  %114 = landingpad { ptr, i32 }
          catch ptr null
  %115 = extractvalue { ptr, i32 } %114, 0
  call void @__clang_call_terminate(ptr %115) #11
  unreachable
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9ISASubsetC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9ISASubset9addOpcodeEi(ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #2 align 2

declare noundef i32 @_Z17ISA_OpCodeForNamePKc(ptr noundef) local_unnamed_addr #5

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #6

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK2z39exception3msgEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #8 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 #2 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)) #7

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #9

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9ISASubsetD2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #4 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 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 #4 = { 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 #5 = { "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 = { nofree nosync nounwind memory(none) }
attributes #7 = { 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 #8 = { 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 #9 = { noinline noreturn nounwind uwtable "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 #10 = { nounwind }
attributes #11 = { noreturn 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)"}


; Effective O3 passes: GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass