; LLVM IR from ftylitak/qzxing :: src/zxing/bigint/BigInteger.ll (ZN10BigInteger19divideWithRemainderERKS_RS_)

; 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.BigInteger = type { i32, %class.BigUnsigned }
%class.BigUnsigned = type { %class.NumberlikeArray }
%class.NumberlikeArray = type { i32, i32, ptr }

@_ZTIPKc = external constant ptr
@.str.5 = external hidden unnamed_addr constant [92 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11BigUnsignedaSERKS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK11BigUnsigned6isZeroEv(ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

declare i32 @__gxx_personality_v0(...)

declare ptr @__cxa_allocate_exception(i64)

declare void @__cxa_throw(ptr, ptr, ptr)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN15NumberlikeArrayImED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

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

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

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

declare void @_ZN11BigUnsignedC1Ei(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) unnamed_addr #4

declare void @_ZN11BigUnsigned8subtractERKS_S1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10BigInteger19divideWithRemainderERKS_RS_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %class.BigInteger, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %class.BigUnsigned, align 8
  %11 = alloca %class.BigUnsigned, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %12 = load ptr, ptr %4, align 8
  %13 = load ptr, ptr %6, align 8, !tbaa !5
  %14 = icmp eq ptr %12, %13
  br i1 %14, label %15, label %17

15:                                               ; preds = %3
  %16 = call ptr @__cxa_allocate_exception(i64 8) #5
  store ptr @.str.5, ptr %16, align 16, !tbaa !5
  call void @__cxa_throw(ptr %16, ptr @_ZTIPKc, ptr null) #6
  unreachable

17:                                               ; preds = %3
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = icmp eq ptr %12, %18
  br i1 %19, label %24, label %20

20:                                               ; preds = %17
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = icmp eq ptr %21, %22
  br i1 %23, label %24, label %32

24:                                               ; preds = %20, %17
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #5
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN10BigIntegerC2ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %25)
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN10BigInteger19divideWithRemainderERKS_RS_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %26)
          to label %27 unwind label %28

27:                                               ; preds = %24
  call void @_ZN10BigIntegerD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  br label %111

28:                                               ; preds = %24
  %29 = landingpad { ptr, i32 }
          cleanup
  %30 = extractvalue { ptr, i32 } %29, 0
  store ptr %30, ptr %8, align 8
  %31 = extractvalue { ptr, i32 } %29, 1
  store i32 %31, ptr %9, align 4
  call void @_ZN10BigIntegerD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  br label %112

32:                                               ; preds = %20
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds %class.BigInteger, ptr %33, i32 0, i32 0
  %35 = load i32, ptr %34, align 8, !tbaa !9
  %36 = icmp eq i32 %35, 0
  br i1 %36, label %37, label %47

37:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #5
  call void @_ZN11BigUnsignedC1Ei(ptr noundef nonnull align 8 dereferenceable(16) %10, i32 noundef 0)
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = getelementptr inbounds %class.BigInteger, ptr %38, i32 0, i32 1
  invoke void @_ZN11BigUnsignedaSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %39, ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %40 unwind label %43

40:                                               ; preds = %37
  call void @_ZN15NumberlikeArrayImED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #5
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %class.BigInteger, ptr %41, i32 0, i32 0
  store i32 0, ptr %42, align 8, !tbaa !9
  br label %111

43:                                               ; preds = %37
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %8, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %9, align 4
  call void @_ZN15NumberlikeArrayImED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #5
  br label %112

47:                                               ; preds = %32
  %48 = getelementptr inbounds %class.BigInteger, ptr %12, i32 0, i32 0
  %49 = load i32, ptr %48, align 8, !tbaa !9
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %61

51:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #5
  call void @_ZN11BigUnsignedC1Ei(ptr noundef nonnull align 8 dereferenceable(16) %11, i32 noundef 0)
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = getelementptr inbounds %class.BigInteger, ptr %52, i32 0, i32 1
  invoke void @_ZN11BigUnsignedaSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %53, ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %54 unwind label %57

54:                                               ; preds = %51
  call void @_ZN15NumberlikeArrayImED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = getelementptr inbounds %class.BigInteger, ptr %55, i32 0, i32 0
  store i32 0, ptr %56, align 8, !tbaa !9
  br label %111

57:                                               ; preds = %51
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %8, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %9, align 4
  call void @_ZN15NumberlikeArrayImED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  br label %112

61:                                               ; preds = %47
  %62 = getelementptr inbounds %class.BigInteger, ptr %12, i32 0, i32 0
  %63 = load i32, ptr %62, align 8, !tbaa !9
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = getelementptr inbounds %class.BigInteger, ptr %64, i32 0, i32 0
  %66 = load i32, ptr %65, align 8, !tbaa !9
  %67 = icmp eq i32 %63, %66
  br i1 %67, label %68, label %71

68:                                               ; preds = %61
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds %class.BigInteger, ptr %69, i32 0, i32 0
  store i32 1, ptr %70, align 8, !tbaa !9
  br label %75

71:                                               ; preds = %61
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds %class.BigInteger, ptr %72, i32 0, i32 0
  store i32 -1, ptr %73, align 8, !tbaa !9
  %74 = getelementptr inbounds %class.BigInteger, ptr %12, i32 0, i32 1
  call void @_ZN11BigUnsignedmmEi(ptr noundef nonnull align 8 dereferenceable(16) %74, i32 noundef 0)
  br label %75

75:                                               ; preds = %71, %68
  %76 = getelementptr inbounds %class.BigInteger, ptr %12, i32 0, i32 1
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %class.BigInteger, ptr %77, i32 0, i32 1
  %79 = load ptr, ptr %6, align 8, !tbaa !5
  %80 = getelementptr inbounds %class.BigInteger, ptr %79, i32 0, i32 1
  call void @_ZN11BigUnsigned19divideWithRemainderERKS_RS_(ptr noundef nonnull align 8 dereferenceable(16) %76, ptr noundef nonnull align 8 dereferenceable(16) %78, ptr noundef nonnull align 8 dereferenceable(16) %80)
  %81 = getelementptr inbounds %class.BigInteger, ptr %12, i32 0, i32 0
  %82 = load i32, ptr %81, align 8, !tbaa !9
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = getelementptr inbounds %class.BigInteger, ptr %83, i32 0, i32 0
  %85 = load i32, ptr %84, align 8, !tbaa !9
  %86 = icmp ne i32 %82, %85
  br i1 %86, label %87, label %95

87:                                               ; preds = %75
  %88 = load ptr, ptr %6, align 8, !tbaa !5
  %89 = getelementptr inbounds %class.BigInteger, ptr %88, i32 0, i32 1
  call void @_ZN11BigUnsignedppEi(ptr noundef nonnull align 8 dereferenceable(16) %89, i32 noundef 0)
  %90 = getelementptr inbounds %class.BigInteger, ptr %12, i32 0, i32 1
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %class.BigInteger, ptr %91, i32 0, i32 1
  %93 = getelementptr inbounds %class.BigInteger, ptr %12, i32 0, i32 1
  call void @_ZN11BigUnsigned8subtractERKS_S1_(ptr noundef nonnull align 8 dereferenceable(16) %90, ptr noundef nonnull align 8 dereferenceable(16) %92, ptr noundef nonnull align 8 dereferenceable(16) %93)
  %94 = getelementptr inbounds %class.BigInteger, ptr %12, i32 0, i32 1
  call void @_ZN11BigUnsignedmmEi(ptr noundef nonnull align 8 dereferenceable(16) %94, i32 noundef 0)
  br label %95

95:                                               ; preds = %87, %75
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %class.BigInteger, ptr %96, i32 0, i32 0
  %98 = load i32, ptr %97, align 8, !tbaa !9
  %99 = getelementptr inbounds %class.BigInteger, ptr %12, i32 0, i32 0
  store i32 %98, ptr %99, align 8, !tbaa !9
  %100 = getelementptr inbounds %class.BigInteger, ptr %12, i32 0, i32 1
  %101 = call noundef zeroext i1 @_ZNK11BigUnsigned6isZeroEv(ptr noundef nonnull align 8 dereferenceable(16) %100)
  br i1 %101, label %102, label %104

102:                                              ; preds = %95
  %103 = getelementptr inbounds %class.BigInteger, ptr %12, i32 0, i32 0
  store i32 0, ptr %103, align 8, !tbaa !9
  br label %104

104:                                              ; preds = %102, %95
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = getelementptr inbounds %class.BigInteger, ptr %105, i32 0, i32 1
  %107 = call noundef zeroext i1 @_ZNK11BigUnsigned6isZeroEv(ptr noundef nonnull align 8 dereferenceable(16) %106)
  br i1 %107, label %108, label %111

108:                                              ; preds = %104
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = getelementptr inbounds %class.BigInteger, ptr %109, i32 0, i32 0
  store i32 0, ptr %110, align 8, !tbaa !9
  br label %111

111:                                              ; preds = %108, %104, %54, %40, %27
  ret void

112:                                              ; preds = %57, %43, %28
  %113 = load ptr, ptr %8, align 8
  %114 = load i32, ptr %9, align 4
  %115 = insertvalue { ptr, i32 } poison, ptr %113, 0
  %116 = insertvalue { ptr, i32 } %115, i32 %114, 1
  resume { ptr, i32 } %116
}

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

declare void @_ZN11BigUnsignedmmEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #4

declare void @_ZN11BigUnsigned19divideWithRemainderERKS_RS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #4

declare void @_ZN11BigUnsignedppEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #4

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

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

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


; 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.BigInteger = type { i32, %class.BigUnsigned }
%class.BigUnsigned = type { %class.NumberlikeArray }
%class.NumberlikeArray = type { i32, i32, ptr }

@_ZTIPKc = external constant ptr
@.str.5 = external hidden unnamed_addr constant [92 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN15NumberlikeArrayImED2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

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

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

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

declare void @_ZN11BigUnsignedC1Ei(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) unnamed_addr #4

declare void @_ZN11BigUnsigned8subtractERKS_S1_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN10BigInteger19divideWithRemainderERKS_RS_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %class.BigInteger, align 8
  %5 = alloca %class.BigUnsigned, align 8
  %6 = alloca %class.BigUnsigned, align 8
  %7 = icmp eq ptr %0, %2
  br i1 %7, label %8, label %10

8:                                                ; preds = %3
  %9 = tail call ptr @__cxa_allocate_exception(i64 8) #5
  store ptr @.str.5, ptr %9, align 16, !tbaa !5
  tail call void @__cxa_throw(ptr nonnull %9, ptr nonnull @_ZTIPKc, ptr null) #6
  unreachable

10:                                               ; preds = %3
  %11 = icmp eq ptr %0, %1
  %12 = icmp eq ptr %2, %1
  %or.cond = or i1 %11, %12
  br i1 %or.cond, label %13, label %17

13:                                               ; preds = %10
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #5
  call void @_ZN10BigIntegerC2ERKS_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %1)
  invoke void @_ZN10BigInteger19divideWithRemainderERKS_RS_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %14 unwind label %15

14:                                               ; preds = %13
  call void @_ZN10BigIntegerD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  br label %52

15:                                               ; preds = %13
  %16 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN10BigIntegerD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #5
  br label %53

17:                                               ; preds = %10
  %18 = load i32, ptr %1, align 8, !tbaa !9
  %19 = icmp eq i32 %18, 0
  br i1 %19, label %20, label %25

20:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  call void @_ZN11BigUnsignedC1Ei(ptr noundef nonnull align 8 dereferenceable(16) %5, i32 noundef 0)
  %21 = getelementptr inbounds i8, ptr %2, i64 8
  invoke void @_ZN11BigUnsignedaSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %22 unwind label %23

22:                                               ; preds = %20
  call void @_ZN15NumberlikeArrayImED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  store i32 0, ptr %2, align 8, !tbaa !9
  br label %52

23:                                               ; preds = %20
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN15NumberlikeArrayImED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  br label %53

25:                                               ; preds = %17
  %26 = load i32, ptr %0, align 8, !tbaa !9
  %27 = icmp eq i32 %26, 0
  br i1 %27, label %28, label %33

28:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  call void @_ZN11BigUnsignedC1Ei(ptr noundef nonnull align 8 dereferenceable(16) %6, i32 noundef 0)
  %29 = getelementptr inbounds i8, ptr %2, i64 8
  invoke void @_ZN11BigUnsignedaSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %30 unwind label %31

30:                                               ; preds = %28
  call void @_ZN15NumberlikeArrayImED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  store i32 0, ptr %2, align 8, !tbaa !9
  br label %52

31:                                               ; preds = %28
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN15NumberlikeArrayImED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  br label %53

33:                                               ; preds = %25
  %34 = icmp eq i32 %26, %18
  br i1 %34, label %35, label %36

35:                                               ; preds = %33
  store i32 1, ptr %2, align 8, !tbaa !9
  br label %38

36:                                               ; preds = %33
  store i32 -1, ptr %2, align 8, !tbaa !9
  %37 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @_ZN11BigUnsignedmmEi(ptr noundef nonnull align 8 dereferenceable(16) %37, i32 noundef 0)
  br label %38

38:                                               ; preds = %36, %35
  %39 = getelementptr inbounds i8, ptr %0, i64 8
  %40 = getelementptr inbounds i8, ptr %1, i64 8
  %41 = getelementptr inbounds i8, ptr %2, i64 8
  tail call void @_ZN11BigUnsigned19divideWithRemainderERKS_RS_(ptr noundef nonnull align 8 dereferenceable(16) %39, ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull align 8 dereferenceable(16) %41)
  %42 = load i32, ptr %0, align 8, !tbaa !9
  %43 = load i32, ptr %1, align 8, !tbaa !9
  %.not = icmp eq i32 %42, %43
  br i1 %.not, label %45, label %44

44:                                               ; preds = %38
  tail call void @_ZN11BigUnsignedppEi(ptr noundef nonnull align 8 dereferenceable(16) %41, i32 noundef 0)
  tail call void @_ZN11BigUnsigned8subtractERKS_S1_(ptr noundef nonnull align 8 dereferenceable(16) %39, ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull align 8 dereferenceable(16) %39)
  tail call void @_ZN11BigUnsignedmmEi(ptr noundef nonnull align 8 dereferenceable(16) %39, i32 noundef 0)
  %.pre = load i32, ptr %1, align 8, !tbaa !9
  br label %45

45:                                               ; preds = %44, %38
  %46 = phi i32 [ %.pre, %44 ], [ %42, %38 ]
  store i32 %46, ptr %0, align 8, !tbaa !9
  %47 = tail call noundef zeroext i1 @_ZNK11BigUnsigned6isZeroEv(ptr noundef nonnull align 8 dereferenceable(16) %39)
  br i1 %47, label %48, label %49

48:                                               ; preds = %45
  store i32 0, ptr %0, align 8, !tbaa !9
  br label %49

49:                                               ; preds = %48, %45
  %50 = tail call noundef zeroext i1 @_ZNK11BigUnsigned6isZeroEv(ptr noundef nonnull align 8 dereferenceable(16) %41)
  br i1 %50, label %51, label %52

51:                                               ; preds = %49
  store i32 0, ptr %2, align 8, !tbaa !9
  br label %52

52:                                               ; preds = %51, %49, %30, %22, %14
  ret void

53:                                               ; preds = %31, %23, %15
  %.pn = phi { ptr, i32 } [ %16, %15 ], [ %24, %23 ], [ %32, %31 ]
  resume { ptr, i32 } %.pn
}

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

declare void @_ZN11BigUnsignedmmEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #4

declare void @_ZN11BigUnsigned19divideWithRemainderERKS_RS_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4

declare void @_ZN11BigUnsignedppEi(ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #4

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

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

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


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