; LLVM IR from rcliftonharvey/dspfilters4juce :: DSPFilters4JUCEDemo/JuceLibraryCode (juce_cryptography)

; 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.juce::BigInteger" = type <{ %"class.juce::HeapBlock", [4 x i32], i64, i32, i8, [3 x i8] }>
%"class.juce::HeapBlock" = type { ptr }

; 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

; Function Attrs: nounwind
declare void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37)) unnamed_addr #1

declare void @_ZN4juce10BigIntegerC1Ei(ptr noundef nonnull align 8 dereferenceable(37), i32 noundef) unnamed_addr #2

declare void @_ZNK4juce10BigInteger25findGreatestCommonDivisorES0_(ptr dead_on_unwind writable sret(%"class.juce::BigInteger") align 8, ptr noundef nonnull align 8 dereferenceable(37), ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce6RSAKey21findBestCommonDivisorERKNS_10BigIntegerES3_(ptr dead_on_unwind noalias writable sret(%"class.juce::BigInteger") align 8 %0, ptr noundef nonnull align 8 dereferenceable(37) %1, ptr noundef nonnull align 8 dereferenceable(37) %2) #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i1, align 1
  %10 = alloca %"class.juce::BigInteger", align 8
  %11 = alloca %"class.juce::BigInteger", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.juce::BigInteger", align 8
  %15 = alloca i1, align 1
  %16 = alloca %"class.juce::BigInteger", align 8
  %17 = alloca i1, align 1
  %18 = alloca i1, align 1
  %19 = alloca i1, align 1
  %20 = alloca %"class.juce::BigInteger", align 8
  %21 = alloca %"class.juce::BigInteger", align 8
  %22 = alloca %"class.juce::BigInteger", align 8
  %23 = alloca i1, align 1
  %24 = alloca %"class.juce::BigInteger", align 8
  %25 = alloca i1, align 1
  %26 = alloca i1, align 1
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 2, ptr %7, align 4, !tbaa !9
  br label %27

27:                                               ; preds = %87, %3
  %28 = load i32, ptr %7, align 4, !tbaa !9
  %29 = icmp sle i32 %28, 65536
  br i1 %29, label %31, label %30

30:                                               ; preds = %27
  store i32 2, ptr %8, align 4
  br label %90

31:                                               ; preds = %27
  store i1 false, ptr %9, align 1
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = add nsw i32 1, %32
  call void @_ZN4juce10BigIntegerC1Ei(ptr noundef nonnull align 8 dereferenceable(37) %0, i32 noundef %33)
  call void @llvm.lifetime.start.p0(i64 40, ptr %10) #4
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  store i1 false, ptr %15, align 1
  store i1 false, ptr %17, align 1
  store i1 false, ptr %18, align 1
  invoke void @_ZN4juce10BigIntegerC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(37) %11, ptr noundef nonnull align 8 dereferenceable(37) %34)
          to label %35 unwind label %55

35:                                               ; preds = %31
  invoke void @_ZNK4juce10BigInteger25findGreatestCommonDivisorES0_(ptr dead_on_unwind writable sret(%"class.juce::BigInteger") align 8 %10, ptr noundef nonnull align 8 dereferenceable(37) %0, ptr noundef %11)
          to label %36 unwind label %59

36:                                               ; preds = %35
  %37 = call noundef zeroext i1 @_ZNK4juce10BigInteger5isOneEv(ptr noundef nonnull align 8 dereferenceable(37) %10) #4
  br i1 %37, label %38, label %43

38:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 40, ptr %14) #4
  store i1 true, ptr %15, align 1
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN4juce10BigIntegerC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(37) %16, ptr noundef nonnull align 8 dereferenceable(37) %39)
          to label %40 unwind label %63

40:                                               ; preds = %38
  store i1 true, ptr %17, align 1
  invoke void @_ZNK4juce10BigInteger25findGreatestCommonDivisorES0_(ptr dead_on_unwind writable sret(%"class.juce::BigInteger") align 8 %14, ptr noundef nonnull align 8 dereferenceable(37) %0, ptr noundef %16)
          to label %41 unwind label %67

41:                                               ; preds = %40
  store i1 true, ptr %18, align 1
  %42 = call noundef zeroext i1 @_ZNK4juce10BigInteger5isOneEv(ptr noundef nonnull align 8 dereferenceable(37) %14) #4
  br label %43

43:                                               ; preds = %41, %36
  %44 = phi i1 [ false, %36 ], [ %42, %41 ]
  %45 = load i1, ptr %18, align 1
  br i1 %45, label %46, label %47

46:                                               ; preds = %43
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %14) #4
  br label %47

47:                                               ; preds = %46, %43
  %48 = load i1, ptr %17, align 1
  br i1 %48, label %49, label %50

49:                                               ; preds = %47
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %16) #4
  br label %50

50:                                               ; preds = %49, %47
  %51 = load i1, ptr %15, align 1
  br i1 %51, label %52, label %53

52:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #4
  br label %53

53:                                               ; preds = %52, %50
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %10) #4
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %11) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %10) #4
  br i1 %44, label %54, label %80

54:                                               ; preds = %53
  store i1 true, ptr %9, align 1
  store i32 1, ptr %8, align 4
  br label %81

55:                                               ; preds = %31
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %12, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %13, align 4
  br label %79

59:                                               ; preds = %35
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %12, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %13, align 4
  br label %78

63:                                               ; preds = %38
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %12, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %13, align 4
  br label %74

67:                                               ; preds = %40
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %12, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %13, align 4
  %71 = load i1, ptr %17, align 1
  br i1 %71, label %72, label %73

72:                                               ; preds = %67
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %16) #4
  br label %73

73:                                               ; preds = %72, %67
  br label %74

74:                                               ; preds = %73, %63
  %75 = load i1, ptr %15, align 1
  br i1 %75, label %76, label %77

76:                                               ; preds = %74
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #4
  br label %77

77:                                               ; preds = %76, %74
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %10) #4
  br label %78

78:                                               ; preds = %77, %59
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %11) #4
  br label %79

79:                                               ; preds = %78, %55
  call void @llvm.lifetime.end.p0(i64 40, ptr %10) #4
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %0) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %153

80:                                               ; preds = %53
  store i32 0, ptr %8, align 4
  br label %81

81:                                               ; preds = %80, %54
  %82 = load i1, ptr %9, align 1
  br i1 %82, label %84, label %83

83:                                               ; preds = %81
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %0) #4
  br label %84

84:                                               ; preds = %83, %81
  %85 = load i32, ptr %8, align 4
  switch i32 %85, label %90 [
    i32 0, label %86
  ]

86:                                               ; preds = %84
  br label %87

87:                                               ; preds = %86
  %88 = load i32, ptr %7, align 4, !tbaa !9
  %89 = mul nsw i32 %88, 2
  store i32 %89, ptr %7, align 4, !tbaa !9
  br label %27, !llvm.loop !11

90:                                               ; preds = %84, %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  %91 = load i32, ptr %8, align 4
  switch i32 %91, label %158 [
    i32 2, label %92
    i32 1, label %152
  ]

92:                                               ; preds = %90
  store i1 false, ptr %19, align 1
  call void @_ZN4juce10BigIntegerC1Ei(ptr noundef nonnull align 8 dereferenceable(37) %0, i32 noundef 4)
  br label %93

93:                                               ; preds = %117, %92
  call void @llvm.lifetime.start.p0(i64 40, ptr %20) #4
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  store i1 false, ptr %23, align 1
  store i1 false, ptr %25, align 1
  store i1 false, ptr %26, align 1
  invoke void @_ZN4juce10BigIntegerC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(37) %21, ptr noundef nonnull align 8 dereferenceable(37) %94)
          to label %95 unwind label %118

95:                                               ; preds = %93
  invoke void @_ZNK4juce10BigInteger25findGreatestCommonDivisorES0_(ptr dead_on_unwind writable sret(%"class.juce::BigInteger") align 8 %20, ptr noundef nonnull align 8 dereferenceable(37) %0, ptr noundef %21)
          to label %96 unwind label %122

96:                                               ; preds = %95
  %97 = call noundef zeroext i1 @_ZNK4juce10BigInteger5isOneEv(ptr noundef nonnull align 8 dereferenceable(37) %20) #4
  br i1 %97, label %98, label %103

98:                                               ; preds = %96
  call void @llvm.lifetime.start.p0(i64 40, ptr %22) #4
  store i1 true, ptr %23, align 1
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN4juce10BigIntegerC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(37) %24, ptr noundef nonnull align 8 dereferenceable(37) %99)
          to label %100 unwind label %126

100:                                              ; preds = %98
  store i1 true, ptr %25, align 1
  invoke void @_ZNK4juce10BigInteger25findGreatestCommonDivisorES0_(ptr dead_on_unwind writable sret(%"class.juce::BigInteger") align 8 %22, ptr noundef nonnull align 8 dereferenceable(37) %0, ptr noundef %24)
          to label %101 unwind label %130

101:                                              ; preds = %100
  store i1 true, ptr %26, align 1
  %102 = call noundef zeroext i1 @_ZNK4juce10BigInteger5isOneEv(ptr noundef nonnull align 8 dereferenceable(37) %22) #4
  br label %103

103:                                              ; preds = %101, %96
  %104 = phi i1 [ false, %96 ], [ %102, %101 ]
  %105 = xor i1 %104, true
  %106 = load i1, ptr %26, align 1
  br i1 %106, label %107, label %108

107:                                              ; preds = %103
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %22) #4
  br label %108

108:                                              ; preds = %107, %103
  %109 = load i1, ptr %25, align 1
  br i1 %109, label %110, label %111

110:                                              ; preds = %108
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %24) #4
  br label %111

111:                                              ; preds = %110, %108
  %112 = load i1, ptr %23, align 1
  br i1 %112, label %113, label %114

113:                                              ; preds = %111
  call void @llvm.lifetime.end.p0(i64 40, ptr %22) #4
  br label %114

114:                                              ; preds = %113, %111
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %20) #4
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %21) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #4
  br i1 %105, label %115, label %147

115:                                              ; preds = %114
  %116 = invoke noundef nonnull align 8 dereferenceable(37) ptr @_ZN4juce10BigIntegerppEv(ptr noundef nonnull align 8 dereferenceable(37) %0)
          to label %117 unwind label %143

117:                                              ; preds = %115
  br label %93, !llvm.loop !13

118:                                              ; preds = %93
  %119 = landingpad { ptr, i32 }
          cleanup
  %120 = extractvalue { ptr, i32 } %119, 0
  store ptr %120, ptr %12, align 8
  %121 = extractvalue { ptr, i32 } %119, 1
  store i32 %121, ptr %13, align 4
  br label %142

122:                                              ; preds = %95
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %12, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %13, align 4
  br label %141

126:                                              ; preds = %98
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %12, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %13, align 4
  br label %137

130:                                              ; preds = %100
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %12, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %13, align 4
  %134 = load i1, ptr %25, align 1
  br i1 %134, label %135, label %136

135:                                              ; preds = %130
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %24) #4
  br label %136

136:                                              ; preds = %135, %130
  br label %137

137:                                              ; preds = %136, %126
  %138 = load i1, ptr %23, align 1
  br i1 %138, label %139, label %140

139:                                              ; preds = %137
  call void @llvm.lifetime.end.p0(i64 40, ptr %22) #4
  br label %140

140:                                              ; preds = %139, %137
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %20) #4
  br label %141

141:                                              ; preds = %140, %122
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %21) #4
  br label %142

142:                                              ; preds = %141, %118
  call void @llvm.lifetime.end.p0(i64 40, ptr %20) #4
  br label %151

143:                                              ; preds = %115
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %12, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %13, align 4
  br label %151

147:                                              ; preds = %114
  store i1 true, ptr %19, align 1
  store i32 1, ptr %8, align 4
  %148 = load i1, ptr %19, align 1
  br i1 %148, label %150, label %149

149:                                              ; preds = %147
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %0) #4
  br label %150

150:                                              ; preds = %149, %147
  br label %152

151:                                              ; preds = %143, %142
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %0) #4
  br label %153

152:                                              ; preds = %150, %90
  ret void

153:                                              ; preds = %151, %79
  %154 = load ptr, ptr %12, align 8
  %155 = load i32, ptr %13, align 4
  %156 = insertvalue { ptr, i32 } poison, ptr %154, 0
  %157 = insertvalue { ptr, i32 } %156, i32 %155, 1
  resume { ptr, i32 } %157

158:                                              ; preds = %90
  unreachable
}

declare void @_ZN4juce10BigIntegerC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(37), ptr noundef nonnull align 8 dereferenceable(37)) unnamed_addr #2

; Function Attrs: nounwind
declare noundef zeroext i1 @_ZNK4juce10BigInteger5isOneEv(ptr noundef nonnull align 8 dereferenceable(37)) #1

declare noundef nonnull align 8 dereferenceable(37) ptr @_ZN4juce10BigIntegerppEv(ptr noundef nonnull align 8 dereferenceable(37)) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { "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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; 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.juce::BigInteger" = type <{ %"class.juce::HeapBlock", [4 x i32], i64, i32, i8, [3 x i8] }>
%"class.juce::HeapBlock" = type { ptr }

; 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: nounwind
declare void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37)) unnamed_addr #1

declare void @_ZN4juce10BigIntegerC1Ei(ptr noundef nonnull align 8 dereferenceable(37), i32 noundef) unnamed_addr #2

declare void @_ZNK4juce10BigInteger25findGreatestCommonDivisorES0_(ptr dead_on_unwind writable sret(%"class.juce::BigInteger") align 8, ptr noundef nonnull align 8 dereferenceable(37), ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4juce6RSAKey21findBestCommonDivisorERKNS_10BigIntegerES3_(ptr dead_on_unwind noalias writable sret(%"class.juce::BigInteger") align 8 %0, ptr noundef nonnull align 8 dereferenceable(37) %1, ptr noundef nonnull align 8 dereferenceable(37) %2) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.juce::BigInteger", align 8
  %5 = alloca %"class.juce::BigInteger", align 8
  %6 = alloca %"class.juce::BigInteger", align 8
  %7 = alloca %"class.juce::BigInteger", align 8
  %8 = alloca %"class.juce::BigInteger", align 8
  %9 = alloca %"class.juce::BigInteger", align 8
  %10 = alloca %"class.juce::BigInteger", align 8
  %11 = alloca %"class.juce::BigInteger", align 8
  br label %12

12:                                               ; preds = %3, %31
  %.03963 = phi i32 [ 2, %3 ], [ %32, %31 ]
  %13 = or disjoint i32 %.03963, 1
  call void @_ZN4juce10BigIntegerC1Ei(ptr noundef nonnull align 8 dereferenceable(37) %0, i32 noundef %13)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #4
  invoke void @_ZN4juce10BigIntegerC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(37) %5, ptr noundef nonnull align 8 dereferenceable(37) %1)
          to label %14 unwind label %20

14:                                               ; preds = %12
  invoke void @_ZNK4juce10BigInteger25findGreatestCommonDivisorES0_(ptr dead_on_unwind nonnull writable sret(%"class.juce::BigInteger") align 8 %4, ptr noundef nonnull align 8 dereferenceable(37) %0, ptr noundef nonnull %5)
          to label %15 unwind label %22

15:                                               ; preds = %14
  %16 = call noundef zeroext i1 @_ZNK4juce10BigInteger5isOneEv(ptr noundef nonnull align 8 dereferenceable(37) %4) #4
  br i1 %16, label %17, label %.critedge60

17:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #4
  invoke void @_ZN4juce10BigIntegerC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(37) %7, ptr noundef nonnull align 8 dereferenceable(37) %2)
          to label %18 unwind label %24

18:                                               ; preds = %17
  invoke void @_ZNK4juce10BigInteger25findGreatestCommonDivisorES0_(ptr dead_on_unwind nonnull writable sret(%"class.juce::BigInteger") align 8 %6, ptr noundef nonnull align 8 dereferenceable(37) %0, ptr noundef nonnull %7)
          to label %.critedge unwind label %26

.critedge:                                        ; preds = %18
  %19 = call noundef zeroext i1 @_ZNK4juce10BigInteger5isOneEv(ptr noundef nonnull align 8 dereferenceable(37) %6) #4
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %6) #4
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %7) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #4
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %4) #4
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %5) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #4
  br i1 %19, label %.critedge52, label %31

20:                                               ; preds = %12
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %30

22:                                               ; preds = %14
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %29

24:                                               ; preds = %17
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %28

26:                                               ; preds = %18
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %7) #4
  br label %28

28:                                               ; preds = %24, %26
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %25, %24 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #4
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %4) #4
  br label %29

29:                                               ; preds = %28, %22
  %.pn.pn = phi { ptr, i32 } [ %.pn, %28 ], [ %23, %22 ]
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %5) #4
  br label %30

30:                                               ; preds = %29, %20
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %29 ], [ %21, %20 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #4
  br label %57

.critedge60:                                      ; preds = %15
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %4) #4
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %5) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #4
  br label %31

31:                                               ; preds = %.critedge60, %.critedge
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %0) #4
  %32 = shl nuw nsw i32 %.03963, 1
  %33 = icmp ult i32 %.03963, 32769
  br i1 %33, label %12, label %34, !llvm.loop !5

34:                                               ; preds = %31
  call void @_ZN4juce10BigIntegerC1Ei(ptr noundef nonnull align 8 dereferenceable(37) %0, i32 noundef 4)
  br label %35

35:                                               ; preds = %42, %34
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #4
  invoke void @_ZN4juce10BigIntegerC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(37) %9, ptr noundef nonnull align 8 dereferenceable(37) %1)
          to label %36 unwind label %44

36:                                               ; preds = %35
  invoke void @_ZNK4juce10BigInteger25findGreatestCommonDivisorES0_(ptr dead_on_unwind nonnull writable sret(%"class.juce::BigInteger") align 8 %8, ptr noundef nonnull align 8 dereferenceable(37) %0, ptr noundef nonnull %9)
          to label %37 unwind label %46

37:                                               ; preds = %36
  %38 = call noundef zeroext i1 @_ZNK4juce10BigInteger5isOneEv(ptr noundef nonnull align 8 dereferenceable(37) %8) #4
  br i1 %38, label %39, label %.critedge61

39:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %10) #4
  invoke void @_ZN4juce10BigIntegerC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(37) %11, ptr noundef nonnull align 8 dereferenceable(37) %2)
          to label %40 unwind label %48

40:                                               ; preds = %39
  invoke void @_ZNK4juce10BigInteger25findGreatestCommonDivisorES0_(ptr dead_on_unwind nonnull writable sret(%"class.juce::BigInteger") align 8 %10, ptr noundef nonnull align 8 dereferenceable(37) %0, ptr noundef nonnull %11)
          to label %.critedge54 unwind label %50

.critedge54:                                      ; preds = %40
  %41 = call noundef zeroext i1 @_ZNK4juce10BigInteger5isOneEv(ptr noundef nonnull align 8 dereferenceable(37) %10) #4
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %10) #4
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %11) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #4
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %8) #4
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %9) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #4
  br i1 %41, label %.critedge52, label %42

.critedge61:                                      ; preds = %37
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %8) #4
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %9) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #4
  br label %42

42:                                               ; preds = %.critedge61, %.critedge54
  %43 = invoke noundef nonnull align 8 dereferenceable(37) ptr @_ZN4juce10BigIntegerppEv(ptr noundef nonnull align 8 dereferenceable(37) %0)
          to label %35 unwind label %55, !llvm.loop !7

44:                                               ; preds = %35
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %54

46:                                               ; preds = %36
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %53

48:                                               ; preds = %39
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %52

50:                                               ; preds = %40
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %11) #4
  br label %52

52:                                               ; preds = %48, %50
  %.pn43 = phi { ptr, i32 } [ %51, %50 ], [ %49, %48 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #4
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %8) #4
  br label %53

53:                                               ; preds = %52, %46
  %.pn43.pn = phi { ptr, i32 } [ %.pn43, %52 ], [ %47, %46 ]
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %9) #4
  br label %54

54:                                               ; preds = %53, %44
  %.pn43.pn.pn = phi { ptr, i32 } [ %.pn43.pn, %53 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #4
  br label %57

55:                                               ; preds = %42
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %57

.critedge52:                                      ; preds = %.critedge, %.critedge54
  ret void

57:                                               ; preds = %54, %55, %30
  %.pn47.pn = phi { ptr, i32 } [ %.pn.pn.pn, %30 ], [ %56, %55 ], [ %.pn43.pn.pn, %54 ]
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %0) #4
  resume { ptr, i32 } %.pn47.pn
}

declare void @_ZN4juce10BigIntegerC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(37), ptr noundef nonnull align 8 dereferenceable(37)) unnamed_addr #2

; Function Attrs: nounwind
declare noundef zeroext i1 @_ZNK4juce10BigInteger5isOneEv(ptr noundef nonnull align 8 dereferenceable(37)) local_unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(37) ptr @_ZN4juce10BigIntegerppEv(ptr noundef nonnull align 8 dereferenceable(37)) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { "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 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}


; Effective O3 passes: CorrelatedValuePropagationPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass