; LLVM IR from intel/cryptography-primitives :: examples/utils/bignum.ll (ZN9BigNumberC2EPKc)

; 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.BigNumber = type { ptr, ptr }

@_ZTV9BigNumber = external dso_local unnamed_addr constant { [4 x ptr] }, align 8
@_ZL12HexDigitList = external hidden global [17 x i8], align 16

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9BigNumberC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca [2 x i8], align 1
  %10 = alloca i32, align 4
  %11 = alloca %class.BigNumber, align 8
  %12 = alloca %class.BigNumber, align 8
  %13 = alloca %class.BigNumber, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca %class.BigNumber, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %17 = load ptr, ptr %3, align 8
  store ptr getelementptr inbounds inrange(-16, 16) ({ [4 x ptr] }, ptr @_ZTV9BigNumber, i32 0, i32 0, i32 2), ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #4
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %18, i64 0
  %20 = load i8, ptr %19, align 1, !tbaa !11
  %21 = sext i8 %20 to i32
  %22 = icmp eq i32 45, %21
  %23 = zext i1 %22 to i8
  store i8 %23, ptr %5, align 1, !tbaa !12
  %24 = load i8, ptr %5, align 1, !tbaa !12, !range !14, !noundef !15
  %25 = trunc i8 %24 to i1
  br i1 %25, label %26, label %29

26:                                               ; preds = %2
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %27, i32 1
  store ptr %28, ptr %4, align 8, !tbaa !5
  br label %29

29:                                               ; preds = %26, %2
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #4
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %30, i64 0
  %32 = load i8, ptr %31, align 1, !tbaa !11
  %33 = sext i8 %32 to i32
  %34 = icmp eq i32 48, %33
  br i1 %34, label %35, label %49

35:                                               ; preds = %29
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %36, i64 1
  %38 = load i8, ptr %37, align 1, !tbaa !11
  %39 = sext i8 %38 to i32
  %40 = icmp eq i32 120, %39
  br i1 %40, label %47, label %41

41:                                               ; preds = %35
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %42, i64 1
  %44 = load i8, ptr %43, align 1, !tbaa !11
  %45 = sext i8 %44 to i32
  %46 = icmp eq i32 88, %45
  br label %47

47:                                               ; preds = %41, %35
  %48 = phi i1 [ true, %35 ], [ %46, %41 ]
  br label %49

49:                                               ; preds = %47, %29
  %50 = phi i1 [ false, %29 ], [ %48, %47 ]
  %51 = zext i1 %50 to i8
  store i8 %51, ptr %6, align 1, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %52 = load i8, ptr %6, align 1, !tbaa !12, !range !14, !noundef !15
  %53 = trunc i8 %52 to i1
  br i1 %53, label %54, label %62

54:                                               ; preds = %49
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %55, i64 2
  store ptr %56, ptr %4, align 8, !tbaa !5
  store i32 16, ptr %8, align 4, !tbaa !16
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = call noundef i64 @_Z11strlen_safePKcm(ptr noundef %57, i64 noundef 4096)
  %59 = add i64 %58, 7
  %60 = trunc i64 %59 to i32
  %61 = sdiv i32 %60, 8
  store i32 %61, ptr %7, align 4, !tbaa !16
  br label %68

62:                                               ; preds = %49
  store i32 10, ptr %8, align 4, !tbaa !16
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = call noundef i64 @_Z11strlen_safePKcm(ptr noundef %63, i64 noundef 4096)
  %65 = add i64 %64, 9
  %66 = trunc i64 %65 to i32
  %67 = sdiv i32 %66, 10
  store i32 %67, ptr %7, align 4, !tbaa !16
  br label %68

68:                                               ; preds = %62, %54
  %69 = load i32, ptr %7, align 4, !tbaa !16
  %70 = call noundef zeroext i1 @_ZN9BigNumber6createEPKji13IppsBigNumSGN(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef null, i32 noundef %69, i32 noundef 1)
  %71 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN9BigNumber4ZeroEv()
  %72 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN9BigNumberaSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %71)
  br label %73

73:                                               ; preds = %90, %68
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = load i8, ptr %74, align 1, !tbaa !11
  %76 = icmp ne i8 %75, 0
  br i1 %76, label %77, label %107

77:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 2, ptr %9) #4
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = getelementptr inbounds i8, ptr %78, i64 0
  %80 = load i8, ptr %79, align 1, !tbaa !11
  store i8 %80, ptr %9, align 1, !tbaa !11
  %81 = getelementptr inbounds i8, ptr %9, i64 1
  store i8 0, ptr %81, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %82 = getelementptr inbounds [2 x i8], ptr %9, i64 0, i64 0
  %83 = call i64 @strcspn(ptr noundef @_ZL12HexDigitList, ptr noundef %82) #5
  %84 = trunc i64 %83 to i32
  store i32 %84, ptr %10, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #4
  %85 = load i32, ptr %8, align 4, !tbaa !16
  call void @_ZmlRK9BigNumberj(ptr dead_on_unwind writable sret(%class.BigNumber) align 8 %12, ptr noundef nonnull align 8 dereferenceable(16) %17, i32 noundef %85)
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #4
  %86 = load i32, ptr %10, align 4, !tbaa !16
  invoke void @_ZN9BigNumberC1Ej(ptr noundef nonnull align 8 dereferenceable(16) %13, i32 noundef %86)
          to label %87 unwind label %93

87:                                               ; preds = %77
  invoke void @_ZplRK9BigNumberS1_(ptr dead_on_unwind writable sret(%class.BigNumber) align 8 %11, ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %88 unwind label %97

88:                                               ; preds = %87
  %89 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN9BigNumberaSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %90 unwind label %101

90:                                               ; preds = %88
  call void @_ZN9BigNumberD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #4
  call void @_ZN9BigNumberD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #4
  call void @_ZN9BigNumberD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #4
  %91 = load ptr, ptr %4, align 8, !tbaa !5
  %92 = getelementptr inbounds i8, ptr %91, i32 1
  store ptr %92, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr %9) #4
  br label %73, !llvm.loop !18

93:                                               ; preds = %77
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %14, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %15, align 4
  br label %106

97:                                               ; preds = %87
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %14, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %15, align 4
  br label %105

101:                                              ; preds = %88
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %14, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %15, align 4
  call void @_ZN9BigNumberD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #4
  br label %105

105:                                              ; preds = %101, %97
  call void @_ZN9BigNumberD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #4
  br label %106

106:                                              ; preds = %105, %93
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #4
  call void @_ZN9BigNumberD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr %9) #4
  br label %119

107:                                              ; preds = %73
  %108 = load i8, ptr %5, align 1, !tbaa !12, !range !14, !noundef !15
  %109 = trunc i8 %108 to i1
  br i1 %109, label %110, label %118

110:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #4
  %111 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN9BigNumber4ZeroEv()
  call void @_ZmiRK9BigNumberS1_(ptr dead_on_unwind writable sret(%class.BigNumber) align 8 %16, ptr noundef nonnull align 8 dereferenceable(16) %111, ptr noundef nonnull align 8 dereferenceable(16) %17)
  %112 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN9BigNumberaSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %113 unwind label %114

113:                                              ; preds = %110
  call void @_ZN9BigNumberD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #4
  br label %118

114:                                              ; preds = %110
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %14, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %15, align 4
  call void @_ZN9BigNumberD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #4
  br label %119

118:                                              ; preds = %113, %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  ret void

119:                                              ; preds = %114, %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #4
  br label %120

120:                                              ; preds = %119
  %121 = load ptr, ptr %14, align 8
  %122 = load i32, ptr %15, align 4
  %123 = insertvalue { ptr, i32 } poison, ptr %121, 0
  %124 = insertvalue { ptr, i32 } %123, i32 %122, 1
  resume { ptr, i32 } %124
}

declare noundef i64 @_Z11strlen_safePKcm(ptr noundef, i64 noundef) #2

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strcspn(ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZplRK9BigNumberS1_(ptr dead_on_unwind noalias writable sret(%class.BigNumber) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZmlRK9BigNumberj(ptr dead_on_unwind noalias writable sret(%class.BigNumber) align 8, ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZmiRK9BigNumberS1_(ptr dead_on_unwind noalias writable sret(%class.BigNumber) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #0

declare void @_ZN9BigNumberD1Ev(ptr)

declare void @_ZN9BigNumberC1Ej(ptr, i32)

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

!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, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!17, !17, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"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.BigNumber = type { ptr, ptr }

@_ZTV9BigNumber = external dso_local unnamed_addr constant { [4 x ptr] }, align 8
@_ZL12HexDigitList = external hidden global [17 x i8], align 16

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

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

; 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 uwtable
define dso_local void @_ZN9BigNumberC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca [2 x i8], align 1
  %4 = alloca %class.BigNumber, align 8
  %5 = alloca %class.BigNumber, align 8
  %6 = alloca %class.BigNumber, align 8
  %7 = alloca %class.BigNumber, align 8
  store ptr getelementptr inbounds inrange(-16, 16) (i8, ptr @_ZTV9BigNumber, i64 16), ptr %0, align 8, !tbaa !5
  %8 = load i8, ptr %1, align 1, !tbaa !8
  %9 = icmp eq i8 %8, 45
  %spec.select.idx = zext i1 %9 to i64
  %spec.select = getelementptr inbounds i8, ptr %1, i64 %spec.select.idx
  %10 = load i8, ptr %spec.select, align 1, !tbaa !8
  %11 = icmp eq i8 %10, 48
  br i1 %11, label %12, label %.critedge

12:                                               ; preds = %2
  %13 = getelementptr inbounds i8, ptr %spec.select, i64 1
  %14 = load i8, ptr %13, align 1, !tbaa !8
  switch i8 %14, label %.critedge [
    i8 120, label %15
    i8 88, label %15
  ]

15:                                               ; preds = %12, %12
  %16 = getelementptr inbounds i8, ptr %spec.select, i64 2
  br label %.critedge

.critedge:                                        ; preds = %2, %12, %15
  %spec.select.sink = phi ptr [ %16, %15 ], [ %spec.select, %12 ], [ %spec.select, %2 ]
  %.sink36 = phi i32 [ 7, %15 ], [ 9, %12 ], [ 9, %2 ]
  %.sink34 = phi i32 [ 8, %15 ], [ 10, %12 ], [ 10, %2 ]
  %.025 = phi i32 [ 16, %15 ], [ 10, %12 ], [ 10, %2 ]
  %17 = tail call noundef i64 @_Z11strlen_safePKcm(ptr noundef nonnull %spec.select.sink, i64 noundef 4096)
  %18 = trunc i64 %17 to i32
  %19 = add i32 %.sink36, %18
  %20 = sdiv i32 %19, %.sink34
  %21 = tail call noundef zeroext i1 @_ZN9BigNumber6createEPKji13IppsBigNumSGN(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef null, i32 noundef %20, i32 noundef 1)
  %22 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZN9BigNumber4ZeroEv()
  %23 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZN9BigNumberaSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %22)
  %24 = load i8, ptr %spec.select.sink, align 1, !tbaa !8
  %.not32 = icmp eq i8 %24, 0
  br i1 %.not32, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.critedge
  %25 = getelementptr inbounds i8, ptr %3, i64 1
  br label %26

26:                                               ; preds = %.lr.ph, %33
  %27 = phi i8 [ %24, %.lr.ph ], [ %35, %33 ]
  %.22433 = phi ptr [ %spec.select.sink, %.lr.ph ], [ %34, %33 ]
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %3) #4
  store i8 %27, ptr %3, align 1, !tbaa !8
  store i8 0, ptr %25, align 1, !tbaa !8
  %28 = call i64 @strcspn(ptr noundef nonnull @_ZL12HexDigitList, ptr noundef nonnull %3) #5
  %29 = trunc i64 %28 to i32
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  call void @_ZmlRK9BigNumberj(ptr dead_on_unwind nonnull writable sret(%class.BigNumber) align 8 %5, ptr noundef nonnull align 8 dereferenceable(16) %0, i32 noundef %.025)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #4
  invoke void @_ZN9BigNumberC1Ej(ptr noundef nonnull align 8 dereferenceable(16) %6, i32 noundef %29)
          to label %30 unwind label %36

30:                                               ; preds = %26
  invoke void @_ZplRK9BigNumberS1_(ptr dead_on_unwind nonnull writable sret(%class.BigNumber) align 8 %4, ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %31 unwind label %38

31:                                               ; preds = %30
  %32 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN9BigNumberaSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %33 unwind label %40

33:                                               ; preds = %31
  call void @_ZN9BigNumberD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #4
  call void @_ZN9BigNumberD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #4
  call void @_ZN9BigNumberD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  %34 = getelementptr inbounds i8, ptr %.22433, i64 1
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %3) #4
  %35 = load i8, ptr %34, align 1, !tbaa !8
  %.not = icmp eq i8 %35, 0
  br i1 %.not, label %._crit_edge, label %26, !llvm.loop !10

36:                                               ; preds = %26
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %43

38:                                               ; preds = %30
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %42

40:                                               ; preds = %31
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9BigNumberD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #4
  br label %42

42:                                               ; preds = %40, %38
  %.pn = phi { ptr, i32 } [ %41, %40 ], [ %39, %38 ]
  call void @_ZN9BigNumberD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #4
  br label %43

43:                                               ; preds = %42, %36
  %.pn.pn = phi { ptr, i32 } [ %.pn, %42 ], [ %37, %36 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #4
  call void @_ZN9BigNumberD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %3) #4
  br label %51

._crit_edge:                                      ; preds = %33, %.critedge
  br i1 %9, label %44, label %50

44:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #4
  %45 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN9BigNumber4ZeroEv()
  call void @_ZmiRK9BigNumberS1_(ptr dead_on_unwind nonnull writable sret(%class.BigNumber) align 8 %7, ptr noundef nonnull align 8 dereferenceable(16) %45, ptr noundef nonnull align 8 dereferenceable(16) %0)
  %46 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN9BigNumberaSERKS_(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(16) %7)
          to label %47 unwind label %48

47:                                               ; preds = %44
  call void @_ZN9BigNumberD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  br label %50

48:                                               ; preds = %44
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN9BigNumberD1Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #4
  br label %51

50:                                               ; preds = %47, %._crit_edge
  ret void

51:                                               ; preds = %48, %43
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %43 ], [ %49, %48 ]
  resume { ptr, i32 } %.pn.pn.pn
}

declare noundef i64 @_Z11strlen_safePKcm(ptr noundef, i64 noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strcspn(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZplRK9BigNumberS1_(ptr dead_on_unwind noalias writable sret(%class.BigNumber) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZmlRK9BigNumberj(ptr dead_on_unwind noalias writable sret(%class.BigNumber) align 8, ptr noundef nonnull align 8 dereferenceable(16), i32 noundef) local_unnamed_addr #0

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZmiRK9BigNumberS1_(ptr dead_on_unwind noalias writable sret(%class.BigNumber) align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0

declare void @_ZN9BigNumberD1Ev(ptr) local_unnamed_addr

declare void @_ZN9BigNumberC1Ej(ptr, i32) local_unnamed_addr

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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 nofree nounwind willreturn memory(argmem: read) "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 = { nounwind }
attributes #5 = { nounwind willreturn memory(read) }

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"omnipotent char", !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}


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