; 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 }
%"class.juce::Random" = type { i64 }

; 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: mustprogress uwtable
define dso_local void @_ZN4juce6Primes19createProbablePrimeEiiPKii(ptr dead_on_unwind noalias writable sret(%"class.juce::BigInteger") align 8 %0, i32 noundef %1, i32 noundef %2, ptr noundef %3, i32 noundef %4) #1 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca [16 x i32], align 16
  %12 = alloca %"class.juce::Random", align 8
  %13 = alloca %"class.juce::Random", align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca %"class.juce::BigInteger", align 8
  %20 = alloca i32, align 4
  %21 = alloca %"class.juce::BigInteger", align 8
  %22 = alloca i32, align 4
  %23 = alloca %"class.juce::BigInteger", align 8
  %24 = alloca %"class.juce::Random", align 8
  %25 = alloca i32, align 4
  %26 = alloca %"class.juce::BigInteger", align 8
  %27 = alloca %"class.juce::BigInteger", align 8
  %28 = alloca i1, align 1
  store ptr %0, ptr %6, align 8
  store i32 %1, ptr %7, align 4, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !9
  store i32 %4, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr %11) #5
  %29 = load i32, ptr %10, align 4, !tbaa !5
  %30 = icmp sle i32 %29, 0
  br i1 %30, label %31, label %68

31:                                               ; preds = %5
  %32 = getelementptr inbounds [16 x i32], ptr %11, i64 0, i64 0
  store ptr %32, ptr %9, align 8, !tbaa !9
  %33 = call noundef i32 @_ZN4juce18numElementsInArrayIiLi16EEEiRAT0__T_(ptr noundef nonnull align 4 dereferenceable(64) %11)
  store i32 %33, ptr %10, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @_ZN4juce6RandomC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12)
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  invoke void @_ZN4juce6RandomC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %34 unwind label %40

34:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  store i32 10, ptr %16, align 4, !tbaa !5
  br label %35

35:                                               ; preds = %65, %34
  %36 = load i32, ptr %16, align 4, !tbaa !5
  %37 = add nsw i32 %36, -1
  store i32 %37, ptr %16, align 4, !tbaa !5
  %38 = icmp sge i32 %37, 0
  br i1 %38, label %44, label %39

39:                                               ; preds = %35
  store i32 2, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %66

40:                                               ; preds = %31
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %14, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %15, align 4
  br label %67

44:                                               ; preds = %35
  invoke void @_ZN4juce6Random15setSeedRandomlyEv(ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %45 unwind label %52

45:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %46 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %46, ptr %18, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %56, %45
  %48 = load i32, ptr %18, align 4, !tbaa !5
  %49 = add nsw i32 %48, -1
  store i32 %49, ptr %18, align 4, !tbaa !5
  %50 = icmp sge i32 %49, 0
  br i1 %50, label %56, label %51

51:                                               ; preds = %47
  store i32 4, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %65

52:                                               ; preds = %44
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %14, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @_ZN4juce6RandomD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  br label %67

56:                                               ; preds = %47
  %57 = call noundef i32 @_ZN4juce6Random7nextIntEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  %58 = call noundef i32 @_ZN4juce6Random7nextIntEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  %59 = xor i32 %57, %58
  %60 = load i32, ptr %18, align 4, !tbaa !5
  %61 = sext i32 %60 to i64
  %62 = getelementptr inbounds [16 x i32], ptr %11, i64 0, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = xor i32 %63, %59
  store i32 %64, ptr %62, align 4, !tbaa !5
  br label %47, !llvm.loop !11

65:                                               ; preds = %51
  br label %35, !llvm.loop !13

66:                                               ; preds = %39
  call void @_ZN4juce6RandomD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @_ZN4juce6RandomD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %68

67:                                               ; preds = %52, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @_ZN4juce6RandomD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %182

68:                                               ; preds = %66, %5
  call void @llvm.lifetime.start.p0(i64 40, ptr %19) #5
  call void @_ZN4juce10BigIntegerC1Ev(ptr noundef nonnull align 8 dereferenceable(37) %19)
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 15000, ptr %20, align 4, !tbaa !5
  invoke void @_ZN4juce13PrimesHelpersL16createSmallSieveEiRNS_10BigIntegerE(i32 noundef 15000, ptr noundef nonnull align 8 dereferenceable(37) %19)
          to label %69 unwind label %77

69:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 40, ptr %21) #5
  invoke void @_ZN4juce10BigIntegerC1Ev(ptr noundef nonnull align 8 dereferenceable(37) %21)
          to label %70 unwind label %81

70:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  %71 = load i32, ptr %10, align 4, !tbaa !5
  store i32 %71, ptr %22, align 4, !tbaa !5
  br label %72

72:                                               ; preds = %96, %70
  %73 = load i32, ptr %22, align 4, !tbaa !5
  %74 = add nsw i32 %73, -1
  store i32 %74, ptr %22, align 4, !tbaa !5
  %75 = icmp sge i32 %74, 0
  br i1 %75, label %85, label %76

76:                                               ; preds = %72
  store i32 6, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %106

77:                                               ; preds = %68
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %14, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %15, align 4
  br label %181

81:                                               ; preds = %69
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %14, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %15, align 4
  br label %180

85:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 40, ptr %23) #5
  invoke void @_ZN4juce10BigIntegerC1Ev(ptr noundef nonnull align 8 dereferenceable(37) %23)
          to label %86 unwind label %97

86:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %87 = load ptr, ptr %9, align 8, !tbaa !9
  %88 = load i32, ptr %22, align 4, !tbaa !5
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds i32, ptr %87, i64 %89
  %91 = load i32, ptr %90, align 4, !tbaa !5
  %92 = sext i32 %91 to i64
  call void @_ZN4juce6RandomC1Ex(ptr noundef nonnull align 8 dereferenceable(8) %24, i64 noundef %92) #5
  %93 = load i32, ptr %7, align 4, !tbaa !5
  invoke void @_ZN4juce6Random16fillBitsRandomlyERNS_10BigIntegerEii(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 8 dereferenceable(37) %23, i32 noundef 0, i32 noundef %93)
          to label %94 unwind label %101

94:                                               ; preds = %86
  %95 = invoke noundef nonnull align 8 dereferenceable(37) ptr @_ZN4juce10BigIntegereOERKS0_(ptr noundef nonnull align 8 dereferenceable(37) %21, ptr noundef nonnull align 8 dereferenceable(37) %23)
          to label %96 unwind label %101

96:                                               ; preds = %94
  call void @_ZN4juce6RandomD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %23) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %23) #5
  br label %72, !llvm.loop !14

97:                                               ; preds = %85
  %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 = %94, %86
  %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 @_ZN4juce6RandomD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %23) #5
  br label %105

105:                                              ; preds = %101, %97
  call void @llvm.lifetime.end.p0(i64 40, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %179

106:                                              ; preds = %76
  %107 = load i32, ptr %7, align 4, !tbaa !5
  %108 = sub nsw i32 %107, 1
  invoke void @_ZN4juce10BigInteger6setBitEi(ptr noundef nonnull align 8 dereferenceable(37) %21, i32 noundef %108)
          to label %109 unwind label %134

109:                                              ; preds = %106
  call void @_ZN4juce10BigInteger8clearBitEi(ptr noundef nonnull align 8 dereferenceable(37) %21, i32 noundef 0) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  %110 = load i32, ptr %7, align 4, !tbaa !5
  %111 = sdiv i32 %110, 20
  %112 = mul nsw i32 %111, 64
  %113 = invoke noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef 1024, i32 noundef %112)
          to label %114 unwind label %138

114:                                              ; preds = %109
  store i32 %113, ptr %25, align 4, !tbaa !5
  br label %115

115:                                              ; preds = %169, %114
  %116 = call noundef i32 @_ZNK4juce10BigInteger13getHighestBitEv(ptr noundef nonnull align 8 dereferenceable(37) %21) #5
  %117 = load i32, ptr %7, align 4, !tbaa !5
  %118 = icmp slt i32 %116, %117
  br i1 %118, label %119, label %172

119:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 40, ptr %26) #5
  %120 = load i32, ptr %25, align 4, !tbaa !5
  %121 = mul nsw i32 2, %120
  invoke void @_ZN4juce10BigIntegerC1Ei(ptr noundef nonnull align 8 dereferenceable(37) %26, i32 noundef %121)
          to label %122 unwind label %142

122:                                              ; preds = %119
  %123 = invoke noundef nonnull align 8 dereferenceable(37) ptr @_ZN4juce10BigIntegerpLERKS0_(ptr noundef nonnull align 8 dereferenceable(37) %21, ptr noundef nonnull align 8 dereferenceable(37) %26)
          to label %124 unwind label %146

124:                                              ; preds = %122
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %26) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %26) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr %27) #5
  invoke void @_ZN4juce10BigIntegerC1Ev(ptr noundef nonnull align 8 dereferenceable(37) %27)
          to label %125 unwind label %151

125:                                              ; preds = %124
  %126 = load i32, ptr %25, align 4, !tbaa !5
  invoke void @_ZN4juce13PrimesHelpersL8bigSieveERKNS_10BigIntegerEiRS1_S3_i(ptr noundef nonnull align 8 dereferenceable(37) %21, i32 noundef %126, ptr noundef nonnull align 8 dereferenceable(37) %27, ptr noundef nonnull align 8 dereferenceable(37) %19, i32 noundef 15000)
          to label %127 unwind label %155

127:                                              ; preds = %125
  store i1 false, ptr %28, align 1
  invoke void @_ZN4juce10BigIntegerC1Ev(ptr noundef nonnull align 8 dereferenceable(37) %0)
          to label %128 unwind label %155

128:                                              ; preds = %127
  %129 = load i32, ptr %25, align 4, !tbaa !5
  %130 = load i32, ptr %8, align 4, !tbaa !5
  %131 = invoke noundef zeroext i1 @_ZN4juce13PrimesHelpersL13findCandidateERKNS_10BigIntegerES3_iRS1_i(ptr noundef nonnull align 8 dereferenceable(37) %21, ptr noundef nonnull align 8 dereferenceable(37) %27, i32 noundef %129, ptr noundef nonnull align 8 dereferenceable(37) %0, i32 noundef %130)
          to label %132 unwind label %159

132:                                              ; preds = %128
  br i1 %131, label %133, label %163

133:                                              ; preds = %132
  store i1 true, ptr %28, align 1
  store i32 1, ptr %17, align 4
  br label %164

134:                                              ; preds = %106
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %14, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %15, align 4
  br label %179

138:                                              ; preds = %175, %109
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %14, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %15, align 4
  br label %178

142:                                              ; preds = %119
  %143 = landingpad { ptr, i32 }
          cleanup
  %144 = extractvalue { ptr, i32 } %143, 0
  store ptr %144, ptr %14, align 8
  %145 = extractvalue { ptr, i32 } %143, 1
  store i32 %145, ptr %15, align 4
  br label %150

146:                                              ; preds = %122
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %14, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %15, align 4
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %26) #5
  br label %150

150:                                              ; preds = %146, %142
  call void @llvm.lifetime.end.p0(i64 40, ptr %26) #5
  br label %178

151:                                              ; preds = %124
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %14, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %15, align 4
  br label %171

155:                                              ; preds = %127, %125
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %14, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %15, align 4
  br label %170

159:                                              ; preds = %128
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %14, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %15, align 4
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %0) #5
  br label %170

163:                                              ; preds = %132
  store i32 0, ptr %17, align 4
  br label %164

164:                                              ; preds = %163, %133
  %165 = load i1, ptr %28, align 1
  br i1 %165, label %167, label %166

166:                                              ; preds = %164
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %0) #5
  br label %167

167:                                              ; preds = %166, %164
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %27) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %27) #5
  %168 = load i32, ptr %17, align 4
  switch i32 %168, label %177 [
    i32 0, label %169
  ]

169:                                              ; preds = %167
  br label %115, !llvm.loop !15

170:                                              ; preds = %159, %155
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %27) #5
  br label %171

171:                                              ; preds = %170, %151
  call void @llvm.lifetime.end.p0(i64 40, ptr %27) #5
  br label %178

172:                                              ; preds = %115
  br label %173

173:                                              ; preds = %172
  br label %174

174:                                              ; preds = %173
  br label %175

175:                                              ; preds = %174
  invoke void @_ZN4juce10BigIntegerC1Ev(ptr noundef nonnull align 8 dereferenceable(37) %0)
          to label %176 unwind label %138

176:                                              ; preds = %175
  store i32 1, ptr %17, align 4
  br label %177

177:                                              ; preds = %176, %167
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %21) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %19) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %11) #5
  ret void

178:                                              ; preds = %171, %150, %138
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  br label %179

179:                                              ; preds = %178, %134, %105
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %21) #5
  br label %180

180:                                              ; preds = %179, %81
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #5
  br label %181

181:                                              ; preds = %180, %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %19) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #5
  br label %182

182:                                              ; preds = %181, %67
  call void @llvm.lifetime.end.p0(i64 64, ptr %11) #5
  br label %183

183:                                              ; preds = %182
  %184 = load ptr, ptr %14, align 8
  %185 = load i32, ptr %15, align 4
  %186 = insertvalue { ptr, i32 } poison, ptr %184, 0
  %187 = insertvalue { ptr, i32 } %186, i32 %185, 1
  resume { ptr, i32 } %187
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce18numElementsInArrayIiLi16EEEiRAT0__T_(ptr noundef nonnull align 4 dereferenceable(64)) #2

declare void @_ZN4juce6RandomC1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3

declare void @_ZN4juce6Random15setSeedRandomlyEv(ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: nounwind
declare noundef i32 @_ZN4juce6Random7nextIntEv(ptr noundef nonnull align 8 dereferenceable(8)) #4

; Function Attrs: nounwind
declare void @_ZN4juce6RandomD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4

declare void @_ZN4juce10BigIntegerC1Ev(ptr noundef nonnull align 8 dereferenceable(37)) unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN4juce13PrimesHelpersL16createSmallSieveEiRNS_10BigIntegerE(i32 noundef, ptr noundef nonnull align 8 dereferenceable(37)) #1

; Function Attrs: nounwind
declare void @_ZN4juce6RandomC1Ex(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) unnamed_addr #4

declare void @_ZN4juce6Random16fillBitsRandomlyERNS_10BigIntegerEii(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(37), i32 noundef, i32 noundef) #3

declare noundef nonnull align 8 dereferenceable(37) ptr @_ZN4juce10BigIntegereOERKS0_(ptr noundef nonnull align 8 dereferenceable(37), ptr noundef nonnull align 8 dereferenceable(37)) #3

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

declare void @_ZN4juce10BigInteger6setBitEi(ptr noundef nonnull align 8 dereferenceable(37), i32 noundef) #3

; Function Attrs: nounwind
declare void @_ZN4juce10BigInteger8clearBitEi(ptr noundef nonnull align 8 dereferenceable(37), i32 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef, i32 noundef) #2

; Function Attrs: nounwind
declare noundef i32 @_ZNK4juce10BigInteger13getHighestBitEv(ptr noundef nonnull align 8 dereferenceable(37)) #4

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

declare noundef nonnull align 8 dereferenceable(37) ptr @_ZN4juce10BigIntegerpLERKS0_(ptr noundef nonnull align 8 dereferenceable(37), ptr noundef nonnull align 8 dereferenceable(37)) #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN4juce13PrimesHelpersL8bigSieveERKNS_10BigIntegerEiRS1_S3_i(ptr noundef nonnull align 8 dereferenceable(37), i32 noundef, ptr noundef nonnull align 8 dereferenceable(37), ptr noundef nonnull align 8 dereferenceable(37), i32 noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN4juce13PrimesHelpersL13findCandidateERKNS_10BigIntegerES3_iRS1_i(ptr noundef nonnull align 8 dereferenceable(37), ptr noundef nonnull align 8 dereferenceable(37), i32 noundef, ptr noundef nonnull align 8 dereferenceable(37), i32 noundef) #1

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

!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"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !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 }
%"class.juce::Random" = type { i64 }

; 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: mustprogress uwtable
define dso_local void @_ZN4juce6Primes19createProbablePrimeEiiPKii(ptr dead_on_unwind noalias writable sret(%"class.juce::BigInteger") align 8 %0, i32 noundef %1, i32 noundef %2, ptr nocapture noundef readonly %3, i32 noundef %4) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca [16 x i32], align 16
  %7 = alloca %"class.juce::Random", align 8
  %8 = alloca %"class.juce::Random", align 8
  %9 = alloca %"class.juce::BigInteger", align 8
  %10 = alloca %"class.juce::BigInteger", align 8
  %11 = alloca %"class.juce::BigInteger", align 8
  %12 = alloca %"class.juce::Random", align 8
  %13 = alloca %"class.juce::BigInteger", align 8
  %14 = alloca %"class.juce::BigInteger", align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #5
  %15 = icmp slt i32 %4, 1
  br i1 %15, label %16, label %96

16:                                               ; preds = %5
  %17 = call noundef i32 @_ZN4juce18numElementsInArrayIiLi16EEEiRAT0__T_(ptr noundef nonnull align 4 dereferenceable(64) %6)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  call void @_ZN4juce6RandomC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  invoke void @_ZN4juce6RandomC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8)
          to label %.preheader55 unwind label %91

.preheader55:                                     ; preds = %16
  %18 = icmp sgt i32 %17, 0
  br i1 %18, label %.preheader55.split.us.preheader, label %.preheader55.split.preheader

.preheader55.split.preheader:                     ; preds = %.preheader55
  invoke void @_ZN4juce6Random15setSeedRandomlyEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %.preheader54 unwind label %.split

.preheader55.split.us.preheader:                  ; preds = %.preheader55
  %19 = zext nneg i32 %17 to i64
  invoke void @_ZN4juce6Random15setSeedRandomlyEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %.preheader54.us unwind label %.split.us

.preheader54.us:                                  ; preds = %.preheader55.split.us.preheader, %.preheader54.us
  %indvars.iv = phi i64 [ %indvars.iv.next, %.preheader54.us ], [ %19, %.preheader55.split.us.preheader ]
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %20 = call noundef i32 @_ZN4juce6Random7nextIntEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %21 = call noundef i32 @_ZN4juce6Random7nextIntEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %22 = xor i32 %21, %20
  %23 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 %indvars.iv.next
  %24 = load i32, ptr %23, align 4, !tbaa !5
  %25 = xor i32 %22, %24
  store i32 %25, ptr %23, align 4, !tbaa !5
  %26 = icmp ugt i64 %indvars.iv, 1
  br i1 %26, label %.preheader54.us, label %..loopexit_crit_edge.us, !llvm.loop !9

..loopexit_crit_edge.us:                          ; preds = %.preheader54.us
  invoke void @_ZN4juce6Random15setSeedRandomlyEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %.preheader54.us.1 unwind label %.split.us

.preheader54.us.1:                                ; preds = %..loopexit_crit_edge.us, %.preheader54.us.1
  %indvars.iv.1 = phi i64 [ %indvars.iv.next.1, %.preheader54.us.1 ], [ %19, %..loopexit_crit_edge.us ]
  %indvars.iv.next.1 = add nsw i64 %indvars.iv.1, -1
  %27 = call noundef i32 @_ZN4juce6Random7nextIntEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %28 = call noundef i32 @_ZN4juce6Random7nextIntEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %29 = xor i32 %28, %27
  %30 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 %indvars.iv.next.1
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = xor i32 %29, %31
  store i32 %32, ptr %30, align 4, !tbaa !5
  %33 = icmp sgt i64 %indvars.iv.1, 1
  br i1 %33, label %.preheader54.us.1, label %..loopexit_crit_edge.us.1, !llvm.loop !9

..loopexit_crit_edge.us.1:                        ; preds = %.preheader54.us.1
  invoke void @_ZN4juce6Random15setSeedRandomlyEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %.preheader54.us.2 unwind label %.split.us

.preheader54.us.2:                                ; preds = %..loopexit_crit_edge.us.1, %.preheader54.us.2
  %indvars.iv.2 = phi i64 [ %indvars.iv.next.2, %.preheader54.us.2 ], [ %19, %..loopexit_crit_edge.us.1 ]
  %indvars.iv.next.2 = add nsw i64 %indvars.iv.2, -1
  %34 = call noundef i32 @_ZN4juce6Random7nextIntEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %35 = call noundef i32 @_ZN4juce6Random7nextIntEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %36 = xor i32 %35, %34
  %37 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 %indvars.iv.next.2
  %38 = load i32, ptr %37, align 4, !tbaa !5
  %39 = xor i32 %36, %38
  store i32 %39, ptr %37, align 4, !tbaa !5
  %40 = icmp sgt i64 %indvars.iv.2, 1
  br i1 %40, label %.preheader54.us.2, label %..loopexit_crit_edge.us.2, !llvm.loop !9

..loopexit_crit_edge.us.2:                        ; preds = %.preheader54.us.2
  invoke void @_ZN4juce6Random15setSeedRandomlyEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %.preheader54.us.3 unwind label %.split.us

.preheader54.us.3:                                ; preds = %..loopexit_crit_edge.us.2, %.preheader54.us.3
  %indvars.iv.3 = phi i64 [ %indvars.iv.next.3, %.preheader54.us.3 ], [ %19, %..loopexit_crit_edge.us.2 ]
  %indvars.iv.next.3 = add nsw i64 %indvars.iv.3, -1
  %41 = call noundef i32 @_ZN4juce6Random7nextIntEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %42 = call noundef i32 @_ZN4juce6Random7nextIntEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %43 = xor i32 %42, %41
  %44 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 %indvars.iv.next.3
  %45 = load i32, ptr %44, align 4, !tbaa !5
  %46 = xor i32 %43, %45
  store i32 %46, ptr %44, align 4, !tbaa !5
  %47 = icmp sgt i64 %indvars.iv.3, 1
  br i1 %47, label %.preheader54.us.3, label %..loopexit_crit_edge.us.3, !llvm.loop !9

..loopexit_crit_edge.us.3:                        ; preds = %.preheader54.us.3
  invoke void @_ZN4juce6Random15setSeedRandomlyEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %.preheader54.us.4 unwind label %.split.us

.preheader54.us.4:                                ; preds = %..loopexit_crit_edge.us.3, %.preheader54.us.4
  %indvars.iv.4 = phi i64 [ %indvars.iv.next.4, %.preheader54.us.4 ], [ %19, %..loopexit_crit_edge.us.3 ]
  %indvars.iv.next.4 = add nsw i64 %indvars.iv.4, -1
  %48 = call noundef i32 @_ZN4juce6Random7nextIntEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %49 = call noundef i32 @_ZN4juce6Random7nextIntEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %50 = xor i32 %49, %48
  %51 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 %indvars.iv.next.4
  %52 = load i32, ptr %51, align 4, !tbaa !5
  %53 = xor i32 %50, %52
  store i32 %53, ptr %51, align 4, !tbaa !5
  %54 = icmp sgt i64 %indvars.iv.4, 1
  br i1 %54, label %.preheader54.us.4, label %..loopexit_crit_edge.us.4, !llvm.loop !9

..loopexit_crit_edge.us.4:                        ; preds = %.preheader54.us.4
  invoke void @_ZN4juce6Random15setSeedRandomlyEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %.preheader54.us.5 unwind label %.split.us

.preheader54.us.5:                                ; preds = %..loopexit_crit_edge.us.4, %.preheader54.us.5
  %indvars.iv.5 = phi i64 [ %indvars.iv.next.5, %.preheader54.us.5 ], [ %19, %..loopexit_crit_edge.us.4 ]
  %indvars.iv.next.5 = add nsw i64 %indvars.iv.5, -1
  %55 = call noundef i32 @_ZN4juce6Random7nextIntEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %56 = call noundef i32 @_ZN4juce6Random7nextIntEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %57 = xor i32 %56, %55
  %58 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 %indvars.iv.next.5
  %59 = load i32, ptr %58, align 4, !tbaa !5
  %60 = xor i32 %57, %59
  store i32 %60, ptr %58, align 4, !tbaa !5
  %61 = icmp sgt i64 %indvars.iv.5, 1
  br i1 %61, label %.preheader54.us.5, label %..loopexit_crit_edge.us.5, !llvm.loop !9

..loopexit_crit_edge.us.5:                        ; preds = %.preheader54.us.5
  invoke void @_ZN4juce6Random15setSeedRandomlyEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %.preheader54.us.6 unwind label %.split.us

.preheader54.us.6:                                ; preds = %..loopexit_crit_edge.us.5, %.preheader54.us.6
  %indvars.iv.6 = phi i64 [ %indvars.iv.next.6, %.preheader54.us.6 ], [ %19, %..loopexit_crit_edge.us.5 ]
  %indvars.iv.next.6 = add nsw i64 %indvars.iv.6, -1
  %62 = call noundef i32 @_ZN4juce6Random7nextIntEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %63 = call noundef i32 @_ZN4juce6Random7nextIntEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %64 = xor i32 %63, %62
  %65 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 %indvars.iv.next.6
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = xor i32 %64, %66
  store i32 %67, ptr %65, align 4, !tbaa !5
  %68 = icmp sgt i64 %indvars.iv.6, 1
  br i1 %68, label %.preheader54.us.6, label %..loopexit_crit_edge.us.6, !llvm.loop !9

..loopexit_crit_edge.us.6:                        ; preds = %.preheader54.us.6
  invoke void @_ZN4juce6Random15setSeedRandomlyEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %.preheader54.us.7 unwind label %.split.us

.preheader54.us.7:                                ; preds = %..loopexit_crit_edge.us.6, %.preheader54.us.7
  %indvars.iv.7 = phi i64 [ %indvars.iv.next.7, %.preheader54.us.7 ], [ %19, %..loopexit_crit_edge.us.6 ]
  %indvars.iv.next.7 = add nsw i64 %indvars.iv.7, -1
  %69 = call noundef i32 @_ZN4juce6Random7nextIntEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %70 = call noundef i32 @_ZN4juce6Random7nextIntEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %71 = xor i32 %70, %69
  %72 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 %indvars.iv.next.7
  %73 = load i32, ptr %72, align 4, !tbaa !5
  %74 = xor i32 %71, %73
  store i32 %74, ptr %72, align 4, !tbaa !5
  %75 = icmp sgt i64 %indvars.iv.7, 1
  br i1 %75, label %.preheader54.us.7, label %..loopexit_crit_edge.us.7, !llvm.loop !9

..loopexit_crit_edge.us.7:                        ; preds = %.preheader54.us.7
  invoke void @_ZN4juce6Random15setSeedRandomlyEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %.preheader54.us.8 unwind label %.split.us

.preheader54.us.8:                                ; preds = %..loopexit_crit_edge.us.7, %.preheader54.us.8
  %indvars.iv.8 = phi i64 [ %indvars.iv.next.8, %.preheader54.us.8 ], [ %19, %..loopexit_crit_edge.us.7 ]
  %indvars.iv.next.8 = add nsw i64 %indvars.iv.8, -1
  %76 = call noundef i32 @_ZN4juce6Random7nextIntEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %77 = call noundef i32 @_ZN4juce6Random7nextIntEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %78 = xor i32 %77, %76
  %79 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 %indvars.iv.next.8
  %80 = load i32, ptr %79, align 4, !tbaa !5
  %81 = xor i32 %78, %80
  store i32 %81, ptr %79, align 4, !tbaa !5
  %82 = icmp sgt i64 %indvars.iv.8, 1
  br i1 %82, label %.preheader54.us.8, label %..loopexit_crit_edge.us.8, !llvm.loop !9

..loopexit_crit_edge.us.8:                        ; preds = %.preheader54.us.8
  invoke void @_ZN4juce6Random15setSeedRandomlyEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %.preheader54.us.9 unwind label %.split.us

.preheader54.us.9:                                ; preds = %..loopexit_crit_edge.us.8, %.preheader54.us.9
  %indvars.iv.9 = phi i64 [ %indvars.iv.next.9, %.preheader54.us.9 ], [ %19, %..loopexit_crit_edge.us.8 ]
  %indvars.iv.next.9 = add nsw i64 %indvars.iv.9, -1
  %83 = call noundef i32 @_ZN4juce6Random7nextIntEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  %84 = call noundef i32 @_ZN4juce6Random7nextIntEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  %85 = xor i32 %84, %83
  %86 = getelementptr inbounds [16 x i32], ptr %6, i64 0, i64 %indvars.iv.next.9
  %87 = load i32, ptr %86, align 4, !tbaa !5
  %88 = xor i32 %85, %87
  store i32 %88, ptr %86, align 4, !tbaa !5
  %89 = icmp sgt i64 %indvars.iv.9, 1
  br i1 %89, label %.preheader54.us.9, label %.split58.us, !llvm.loop !9

.split.us:                                        ; preds = %..loopexit_crit_edge.us.8, %..loopexit_crit_edge.us.7, %..loopexit_crit_edge.us.6, %..loopexit_crit_edge.us.5, %..loopexit_crit_edge.us.4, %..loopexit_crit_edge.us.3, %..loopexit_crit_edge.us.2, %..loopexit_crit_edge.us.1, %..loopexit_crit_edge.us, %.preheader55.split.us.preheader
  %90 = landingpad { ptr, i32 }
          cleanup
  br label %94

.split58.us:                                      ; preds = %.preheader54.us.9, %.preheader54.8
  call void @_ZN4juce6RandomD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @_ZN4juce6RandomD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br label %96

91:                                               ; preds = %16
  %92 = landingpad { ptr, i32 }
          cleanup
  br label %95

.preheader54:                                     ; preds = %.preheader55.split.preheader
  invoke void @_ZN4juce6Random15setSeedRandomlyEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %.preheader54.1 unwind label %.split

.preheader54.1:                                   ; preds = %.preheader54
  invoke void @_ZN4juce6Random15setSeedRandomlyEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %.preheader54.2 unwind label %.split

.preheader54.2:                                   ; preds = %.preheader54.1
  invoke void @_ZN4juce6Random15setSeedRandomlyEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %.preheader54.3 unwind label %.split

.preheader54.3:                                   ; preds = %.preheader54.2
  invoke void @_ZN4juce6Random15setSeedRandomlyEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %.preheader54.4 unwind label %.split

.preheader54.4:                                   ; preds = %.preheader54.3
  invoke void @_ZN4juce6Random15setSeedRandomlyEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %.preheader54.5 unwind label %.split

.preheader54.5:                                   ; preds = %.preheader54.4
  invoke void @_ZN4juce6Random15setSeedRandomlyEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %.preheader54.6 unwind label %.split

.preheader54.6:                                   ; preds = %.preheader54.5
  invoke void @_ZN4juce6Random15setSeedRandomlyEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %.preheader54.7 unwind label %.split

.preheader54.7:                                   ; preds = %.preheader54.6
  invoke void @_ZN4juce6Random15setSeedRandomlyEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %.preheader54.8 unwind label %.split

.preheader54.8:                                   ; preds = %.preheader54.7
  invoke void @_ZN4juce6Random15setSeedRandomlyEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %.split58.us unwind label %.split

.split:                                           ; preds = %.preheader54.8, %.preheader54.7, %.preheader54.6, %.preheader54.5, %.preheader54.4, %.preheader54.3, %.preheader54.2, %.preheader54.1, %.preheader54, %.preheader55.split.preheader
  %93 = landingpad { ptr, i32 }
          cleanup
  br label %94

94:                                               ; preds = %.split.us, %.split
  %.us-phi = phi { ptr, i32 } [ %93, %.split ], [ %90, %.split.us ]
  call void @_ZN4juce6RandomD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #5
  br label %95

95:                                               ; preds = %94, %91
  %.pn51 = phi { ptr, i32 } [ %.us-phi, %94 ], [ %92, %91 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  call void @_ZN4juce6RandomD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br label %158

96:                                               ; preds = %.split58.us, %5
  %.022 = phi i32 [ %17, %.split58.us ], [ %4, %5 ]
  %.020 = phi ptr [ %6, %.split58.us ], [ %3, %5 ]
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #5
  call void @_ZN4juce10BigIntegerC1Ev(ptr noundef nonnull align 8 dereferenceable(37) %9)
  invoke void @_ZN4juce13PrimesHelpersL16createSmallSieveEiRNS_10BigIntegerE(i32 noundef 15000, ptr noundef nonnull align 8 dereferenceable(37) %9)
          to label %97 unwind label %101

97:                                               ; preds = %96
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %10) #5
  invoke void @_ZN4juce10BigIntegerC1Ev(ptr noundef nonnull align 8 dereferenceable(37) %10)
          to label %.preheader unwind label %103

.preheader:                                       ; preds = %97
  %98 = icmp sgt i32 %.022, 0
  br i1 %98, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %.preheader
  %99 = zext nneg i32 %.022 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %111, %.preheader
  %100 = add nsw i32 %1, -1
  invoke void @_ZN4juce10BigInteger6setBitEi(ptr noundef nonnull align 8 dereferenceable(37) %10, i32 noundef %100)
          to label %118 unwind label %133

101:                                              ; preds = %96
  %102 = landingpad { ptr, i32 }
          cleanup
  br label %157

103:                                              ; preds = %97
  %104 = landingpad { ptr, i32 }
          cleanup
  br label %156

.lr.ph:                                           ; preds = %.lr.ph.preheader, %111
  %indvars.iv64 = phi i64 [ %99, %.lr.ph.preheader ], [ %indvars.iv.next65, %111 ]
  %indvars.iv.next65 = add nsw i64 %indvars.iv64, -1
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %11) #5
  invoke void @_ZN4juce10BigIntegerC1Ev(ptr noundef nonnull align 8 dereferenceable(37) %11)
          to label %105 unwind label %113

105:                                              ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #5
  %106 = getelementptr inbounds i32, ptr %.020, i64 %indvars.iv.next65
  %107 = load i32, ptr %106, align 4, !tbaa !5
  %108 = sext i32 %107 to i64
  call void @_ZN4juce6RandomC1Ex(ptr noundef nonnull align 8 dereferenceable(8) %12, i64 noundef %108) #5
  invoke void @_ZN4juce6Random16fillBitsRandomlyERNS_10BigIntegerEii(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(37) %11, i32 noundef 0, i32 noundef %1)
          to label %109 unwind label %115

109:                                              ; preds = %105
  %110 = invoke noundef nonnull align 8 dereferenceable(37) ptr @_ZN4juce10BigIntegereOERKS0_(ptr noundef nonnull align 8 dereferenceable(37) %10, ptr noundef nonnull align 8 dereferenceable(37) %11)
          to label %111 unwind label %115

111:                                              ; preds = %109
  call void @_ZN4juce6RandomD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %11) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #5
  %112 = icmp ugt i64 %indvars.iv64, 1
  br i1 %112, label %.lr.ph, label %._crit_edge, !llvm.loop !11

113:                                              ; preds = %.lr.ph
  %114 = landingpad { ptr, i32 }
          cleanup
  br label %117

115:                                              ; preds = %109, %105
  %116 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce6RandomD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %11) #5
  br label %117

117:                                              ; preds = %115, %113
  %.pn46 = phi { ptr, i32 } [ %116, %115 ], [ %114, %113 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #5
  br label %155

118:                                              ; preds = %._crit_edge
  call void @_ZN4juce10BigInteger8clearBitEi(ptr noundef nonnull align 8 dereferenceable(37) %10, i32 noundef 0) #5
  %119 = sdiv i32 %1, 20
  %120 = shl nsw i32 %119, 6
  %121 = call noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef 1024, i32 noundef %120)
  %122 = call noundef i32 @_ZNK4juce10BigInteger13getHighestBitEv(ptr noundef nonnull align 8 dereferenceable(37) %10) #5
  %123 = icmp slt i32 %122, %1
  br i1 %123, label %.lr.ph60, label %._crit_edge61

.lr.ph60:                                         ; preds = %118
  %124 = shl nsw i32 %121, 1
  br label %125

125:                                              ; preds = %.lr.ph60, %149
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %13) #5
  invoke void @_ZN4juce10BigIntegerC1Ei(ptr noundef nonnull align 8 dereferenceable(37) %13, i32 noundef %124)
          to label %126 unwind label %137

126:                                              ; preds = %125
  %127 = invoke noundef nonnull align 8 dereferenceable(37) ptr @_ZN4juce10BigIntegerpLERKS0_(ptr noundef nonnull align 8 dereferenceable(37) %10, ptr noundef nonnull align 8 dereferenceable(37) %13)
          to label %128 unwind label %139

128:                                              ; preds = %126
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %13) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %14) #5
  invoke void @_ZN4juce10BigIntegerC1Ev(ptr noundef nonnull align 8 dereferenceable(37) %14)
          to label %129 unwind label %142

129:                                              ; preds = %128
  invoke void @_ZN4juce13PrimesHelpersL8bigSieveERKNS_10BigIntegerEiRS1_S3_i(ptr noundef nonnull align 8 dereferenceable(37) %10, i32 noundef %121, ptr noundef nonnull align 8 dereferenceable(37) %14, ptr noundef nonnull align 8 dereferenceable(37) %9, i32 noundef 15000)
          to label %130 unwind label %144

130:                                              ; preds = %129
  invoke void @_ZN4juce10BigIntegerC1Ev(ptr noundef nonnull align 8 dereferenceable(37) %0)
          to label %131 unwind label %144

131:                                              ; preds = %130
  %132 = invoke noundef zeroext i1 @_ZN4juce13PrimesHelpersL13findCandidateERKNS_10BigIntegerES3_iRS1_i(ptr noundef nonnull align 8 dereferenceable(37) %10, ptr noundef nonnull align 8 dereferenceable(37) %14, i32 noundef %121, ptr noundef nonnull align 8 dereferenceable(37) %0, i32 noundef %2)
          to label %148 unwind label %146

133:                                              ; preds = %._crit_edge
  %134 = landingpad { ptr, i32 }
          cleanup
  br label %155

135:                                              ; preds = %._crit_edge61
  %136 = landingpad { ptr, i32 }
          cleanup
  br label %155

137:                                              ; preds = %125
  %138 = landingpad { ptr, i32 }
          cleanup
  br label %141

139:                                              ; preds = %126
  %140 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %13) #5
  br label %141

141:                                              ; preds = %139, %137
  %.pn = phi { ptr, i32 } [ %140, %139 ], [ %138, %137 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %13) #5
  br label %155

142:                                              ; preds = %128
  %143 = landingpad { ptr, i32 }
          cleanup
  br label %153

144:                                              ; preds = %130, %129
  %145 = landingpad { ptr, i32 }
          cleanup
  br label %152

146:                                              ; preds = %131
  %147 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %0) #5
  br label %152

148:                                              ; preds = %131
  br i1 %132, label %.critedge, label %149

149:                                              ; preds = %148
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %0) #5
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %14) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #5
  %150 = call noundef i32 @_ZNK4juce10BigInteger13getHighestBitEv(ptr noundef nonnull align 8 dereferenceable(37) %10) #5
  %151 = icmp slt i32 %150, %1
  br i1 %151, label %125, label %._crit_edge61, !llvm.loop !12

152:                                              ; preds = %146, %144
  %.pn42 = phi { ptr, i32 } [ %147, %146 ], [ %145, %144 ]
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %14) #5
  br label %153

153:                                              ; preds = %152, %142
  %.pn42.pn = phi { ptr, i32 } [ %.pn42, %152 ], [ %143, %142 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #5
  br label %155

._crit_edge61:                                    ; preds = %149, %118
  invoke void @_ZN4juce10BigIntegerC1Ev(ptr noundef nonnull align 8 dereferenceable(37) %0)
          to label %154 unwind label %135

.critedge:                                        ; preds = %148
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %14) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #5
  br label %154

154:                                              ; preds = %._crit_edge61, %.critedge
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %10) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #5
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %9) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #5
  ret void

155:                                              ; preds = %135, %141, %153, %133, %117
  %.pn46.pn = phi { ptr, i32 } [ %.pn46, %117 ], [ %134, %133 ], [ %.pn42.pn, %153 ], [ %.pn, %141 ], [ %136, %135 ]
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %10) #5
  br label %156

156:                                              ; preds = %155, %103
  %.pn46.pn.pn = phi { ptr, i32 } [ %.pn46.pn, %155 ], [ %104, %103 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %10) #5
  br label %157

157:                                              ; preds = %156, %101
  %.pn46.pn.pn.pn = phi { ptr, i32 } [ %.pn46.pn.pn, %156 ], [ %102, %101 ]
  call void @_ZN4juce10BigIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(37) %9) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #5
  br label %158

158:                                              ; preds = %157, %95
  %.pn51.pn = phi { ptr, i32 } [ %.pn51, %95 ], [ %.pn46.pn.pn.pn, %157 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #5
  resume { ptr, i32 } %.pn51.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce18numElementsInArrayIiLi16EEEiRAT0__T_(ptr noundef nonnull align 4 dereferenceable(64)) local_unnamed_addr #2

declare void @_ZN4juce6RandomC1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3

declare void @_ZN4juce6Random15setSeedRandomlyEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: nounwind
declare noundef i32 @_ZN4juce6Random7nextIntEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: nounwind
declare void @_ZN4juce6RandomD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4

declare void @_ZN4juce10BigIntegerC1Ev(ptr noundef nonnull align 8 dereferenceable(37)) unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN4juce13PrimesHelpersL16createSmallSieveEiRNS_10BigIntegerE(i32 noundef, ptr noundef nonnull align 8 dereferenceable(37)) local_unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZN4juce6RandomC1Ex(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) unnamed_addr #4

declare void @_ZN4juce6Random16fillBitsRandomlyERNS_10BigIntegerEii(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(37), i32 noundef, i32 noundef) local_unnamed_addr #3

declare noundef nonnull align 8 dereferenceable(37) ptr @_ZN4juce10BigIntegereOERKS0_(ptr noundef nonnull align 8 dereferenceable(37), ptr noundef nonnull align 8 dereferenceable(37)) local_unnamed_addr #3

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

declare void @_ZN4juce10BigInteger6setBitEi(ptr noundef nonnull align 8 dereferenceable(37), i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZN4juce10BigInteger8clearBitEi(ptr noundef nonnull align 8 dereferenceable(37), i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN4juce4jmaxIiEET_S1_S1_(i32 noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare noundef i32 @_ZNK4juce10BigInteger13getHighestBitEv(ptr noundef nonnull align 8 dereferenceable(37)) local_unnamed_addr #4

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

declare noundef nonnull align 8 dereferenceable(37) ptr @_ZN4juce10BigIntegerpLERKS0_(ptr noundef nonnull align 8 dereferenceable(37), ptr noundef nonnull align 8 dereferenceable(37)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN4juce13PrimesHelpersL8bigSieveERKNS_10BigIntegerEiRS1_S3_i(ptr noundef nonnull align 8 dereferenceable(37), i32 noundef, ptr noundef nonnull align 8 dereferenceable(37), ptr noundef nonnull align 8 dereferenceable(37), i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN4juce13PrimesHelpersL13findCandidateERKNS_10BigIntegerES3_iRS1_i(ptr noundef nonnull align 8 dereferenceable(37), ptr noundef nonnull align 8 dereferenceable(37), i32 noundef, ptr noundef nonnull align 8 dereferenceable(37), i32 noundef) local_unnamed_addr #1

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

!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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass