; LLVM IR from tevador/RandomX :: src/dataset.ll (ZN7randomx9initCacheEP13randomx_cachePKvm)

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

%struct.Argon2_instance_t = type { ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr }
%struct.Argon2_Context = type { ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, i32, i32, i32, i32, i32, ptr, ptr, i32 }
%"class.randomx::Blake2Generator" = type { [64 x i8], i64 }
%struct.randomx_cache = type { ptr, ptr, ptr, ptr, ptr, [8 x %"class.randomx::SuperscalarProgram"], %"class.std::vector", %"class.std::__cxx11::basic_string", ptr }
%"class.randomx::SuperscalarProgram" = type { [512 x %"class.randomx::Instruction"], i32, i32, double, i32, i32, i32, i32, i32, i32, [8 x i32], [8 x i32] }
%"class.randomx::Instruction" = type { i8, i8, i8, i8, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [65 x i8], align 1
@__PRETTY_FUNCTION__._ZN7randomx9initCacheEP13randomx_cachePKvm = external hidden unnamed_addr constant [63 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7randomx9initCacheEP13randomx_cachePKvm(ptr noundef %0, ptr noundef %1, i64 noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %struct.Argon2_instance_t, align 8
  %10 = alloca %struct.Argon2_Context, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.randomx::Blake2Generator", align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i64 %2, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 64, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 120, ptr %10) #5
  %18 = getelementptr inbounds %struct.Argon2_Context, ptr %10, i32 0, i32 0
  store ptr null, ptr %18, align 8, !tbaa !11
  %19 = getelementptr inbounds %struct.Argon2_Context, ptr %10, i32 0, i32 1
  store i32 0, ptr %19, align 8, !tbaa !14
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = ptrtoint ptr %20 to i64
  %22 = inttoptr i64 %21 to ptr
  %23 = getelementptr inbounds %struct.Argon2_Context, ptr %10, i32 0, i32 2
  store ptr %22, ptr %23, align 8, !tbaa !15
  %24 = load i64, ptr %6, align 8, !tbaa !9
  %25 = trunc i64 %24 to i32
  %26 = getelementptr inbounds %struct.Argon2_Context, ptr %10, i32 0, i32 3
  store i32 %25, ptr %26, align 8, !tbaa !16
  %27 = getelementptr inbounds %struct.Argon2_Context, ptr %10, i32 0, i32 4
  store ptr @.str, ptr %27, align 8, !tbaa !17
  %28 = getelementptr inbounds %struct.Argon2_Context, ptr %10, i32 0, i32 5
  store i32 8, ptr %28, align 8, !tbaa !18
  %29 = getelementptr inbounds %struct.Argon2_Context, ptr %10, i32 0, i32 6
  store ptr null, ptr %29, align 8, !tbaa !19
  %30 = getelementptr inbounds %struct.Argon2_Context, ptr %10, i32 0, i32 7
  store i32 0, ptr %30, align 8, !tbaa !20
  %31 = getelementptr inbounds %struct.Argon2_Context, ptr %10, i32 0, i32 8
  store ptr null, ptr %31, align 8, !tbaa !21
  %32 = getelementptr inbounds %struct.Argon2_Context, ptr %10, i32 0, i32 9
  store i32 0, ptr %32, align 8, !tbaa !22
  %33 = getelementptr inbounds %struct.Argon2_Context, ptr %10, i32 0, i32 10
  store i32 3, ptr %33, align 4, !tbaa !23
  %34 = getelementptr inbounds %struct.Argon2_Context, ptr %10, i32 0, i32 11
  store i32 262144, ptr %34, align 8, !tbaa !24
  %35 = getelementptr inbounds %struct.Argon2_Context, ptr %10, i32 0, i32 12
  store i32 1, ptr %35, align 4, !tbaa !25
  %36 = getelementptr inbounds %struct.Argon2_Context, ptr %10, i32 0, i32 13
  store i32 1, ptr %36, align 8, !tbaa !26
  %37 = getelementptr inbounds %struct.Argon2_Context, ptr %10, i32 0, i32 15
  store ptr null, ptr %37, align 8, !tbaa !27
  %38 = getelementptr inbounds %struct.Argon2_Context, ptr %10, i32 0, i32 16
  store ptr null, ptr %38, align 8, !tbaa !28
  %39 = getelementptr inbounds %struct.Argon2_Context, ptr %10, i32 0, i32 17
  store i32 0, ptr %39, align 8, !tbaa !29
  %40 = getelementptr inbounds %struct.Argon2_Context, ptr %10, i32 0, i32 14
  store i32 19, ptr %40, align 4, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  %41 = call i32 @randomx_argon2_validate_inputs(ptr noundef %10)
  store i32 %41, ptr %11, align 4, !tbaa !31
  %42 = load i32, ptr %11, align 4, !tbaa !31
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %44, label %45

44:                                               ; preds = %3
  br label %47

45:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 96, ptr noundef @__PRETTY_FUNCTION__._ZN7randomx9initCacheEP13randomx_cachePKvm) #6
  unreachable

46:                                               ; No predecessors!
  br label %47

47:                                               ; preds = %46, %44
  %48 = getelementptr inbounds %struct.Argon2_Context, ptr %10, i32 0, i32 11
  %49 = load i32, ptr %48, align 8, !tbaa !24
  store i32 %49, ptr %7, align 4, !tbaa !31
  %50 = load i32, ptr %7, align 4, !tbaa !31
  %51 = getelementptr inbounds %struct.Argon2_Context, ptr %10, i32 0, i32 12
  %52 = load i32, ptr %51, align 4, !tbaa !25
  %53 = mul i32 %52, 4
  %54 = udiv i32 %50, %53
  store i32 %54, ptr %8, align 4, !tbaa !31
  %55 = getelementptr inbounds %struct.Argon2_Context, ptr %10, i32 0, i32 14
  %56 = load i32, ptr %55, align 4, !tbaa !30
  %57 = getelementptr inbounds %struct.Argon2_instance_t, ptr %9, i32 0, i32 1
  store i32 %56, ptr %57, align 8, !tbaa !32
  %58 = getelementptr inbounds %struct.Argon2_instance_t, ptr %9, i32 0, i32 0
  store ptr null, ptr %58, align 8, !tbaa !35
  %59 = getelementptr inbounds %struct.Argon2_Context, ptr %10, i32 0, i32 10
  %60 = load i32, ptr %59, align 4, !tbaa !23
  %61 = getelementptr inbounds %struct.Argon2_instance_t, ptr %9, i32 0, i32 2
  store i32 %60, ptr %61, align 4, !tbaa !36
  %62 = load i32, ptr %7, align 4, !tbaa !31
  %63 = getelementptr inbounds %struct.Argon2_instance_t, ptr %9, i32 0, i32 3
  store i32 %62, ptr %63, align 8, !tbaa !37
  %64 = load i32, ptr %8, align 4, !tbaa !31
  %65 = getelementptr inbounds %struct.Argon2_instance_t, ptr %9, i32 0, i32 4
  store i32 %64, ptr %65, align 4, !tbaa !38
  %66 = load i32, ptr %8, align 4, !tbaa !31
  %67 = mul i32 %66, 4
  %68 = getelementptr inbounds %struct.Argon2_instance_t, ptr %9, i32 0, i32 5
  store i32 %67, ptr %68, align 8, !tbaa !39
  %69 = getelementptr inbounds %struct.Argon2_Context, ptr %10, i32 0, i32 12
  %70 = load i32, ptr %69, align 4, !tbaa !25
  %71 = getelementptr inbounds %struct.Argon2_instance_t, ptr %9, i32 0, i32 6
  store i32 %70, ptr %71, align 4, !tbaa !40
  %72 = getelementptr inbounds %struct.Argon2_Context, ptr %10, i32 0, i32 13
  %73 = load i32, ptr %72, align 8, !tbaa !26
  %74 = getelementptr inbounds %struct.Argon2_instance_t, ptr %9, i32 0, i32 7
  store i32 %73, ptr %74, align 8, !tbaa !41
  %75 = getelementptr inbounds %struct.Argon2_instance_t, ptr %9, i32 0, i32 8
  store i32 0, ptr %75, align 4, !tbaa !42
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.randomx_cache, ptr %76, i32 0, i32 0
  %78 = load ptr, ptr %77, align 8, !tbaa !43
  %79 = getelementptr inbounds %struct.Argon2_instance_t, ptr %9, i32 0, i32 0
  store ptr %78, ptr %79, align 8, !tbaa !35
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.randomx_cache, ptr %80, i32 0, i32 8
  %82 = load ptr, ptr %81, align 8, !tbaa !51
  %83 = getelementptr inbounds %struct.Argon2_instance_t, ptr %9, i32 0, i32 11
  store ptr %82, ptr %83, align 8, !tbaa !52
  %84 = getelementptr inbounds %struct.Argon2_instance_t, ptr %9, i32 0, i32 7
  %85 = load i32, ptr %84, align 8, !tbaa !41
  %86 = getelementptr inbounds %struct.Argon2_instance_t, ptr %9, i32 0, i32 6
  %87 = load i32, ptr %86, align 4, !tbaa !40
  %88 = icmp ugt i32 %85, %87
  br i1 %88, label %89, label %93

89:                                               ; preds = %47
  %90 = getelementptr inbounds %struct.Argon2_instance_t, ptr %9, i32 0, i32 6
  %91 = load i32, ptr %90, align 4, !tbaa !40
  %92 = getelementptr inbounds %struct.Argon2_instance_t, ptr %9, i32 0, i32 7
  store i32 %91, ptr %92, align 8, !tbaa !41
  br label %93

93:                                               ; preds = %89, %47
  %94 = call i32 @randomx_argon2_initialize(ptr noundef %9, ptr noundef %10)
  %95 = call i32 @randomx_argon2_fill_memory_blocks(ptr noundef %9)
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.randomx_cache, ptr %96, i32 0, i32 6
  call void @_ZNSt6vectorImSaImEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %97) #5
  call void @llvm.lifetime.start.p0(i64 72, ptr %12) #5
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = load i64, ptr %6, align 8, !tbaa !9
  call void @_ZN7randomx15Blake2GeneratorC1EPKvmi(ptr noundef nonnull align 8 dereferenceable(72) %12, ptr noundef %98, i64 noundef %99, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !31
  br label %100

100:                                              ; preds = %149, %93
  %101 = load i32, ptr %13, align 4, !tbaa !31
  %102 = icmp slt i32 %101, 8
  br i1 %102, label %104, label %103

103:                                              ; preds = %100
  store i32 2, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %152

104:                                              ; preds = %100
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.randomx_cache, ptr %105, i32 0, i32 5
  %107 = load i32, ptr %13, align 4, !tbaa !31
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds [8 x %"class.randomx::SuperscalarProgram"], ptr %106, i64 0, i64 %108
  call void @_ZN7randomx19generateSuperscalarERNS_18SuperscalarProgramERNS_15Blake2GeneratorE(ptr noundef nonnull align 8 dereferenceable(4200) %109, ptr noundef nonnull align 8 dereferenceable(72) %12)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  store i32 0, ptr %15, align 4, !tbaa !31
  br label %110

110:                                              ; preds = %145, %104
  %111 = load i32, ptr %15, align 4, !tbaa !31
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.randomx_cache, ptr %112, i32 0, i32 5
  %114 = load i32, ptr %13, align 4, !tbaa !31
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [8 x %"class.randomx::SuperscalarProgram"], ptr %113, i64 0, i64 %115
  %117 = call noundef i32 @_ZN7randomx18SuperscalarProgram7getSizeEv(ptr noundef nonnull align 8 dereferenceable(4200) %116)
  %118 = icmp ult i32 %111, %117
  br i1 %118, label %120, label %119

119:                                              ; preds = %110
  store i32 5, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %148

120:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %121 = load ptr, ptr %4, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.randomx_cache, ptr %121, i32 0, i32 5
  %123 = load i32, ptr %13, align 4, !tbaa !31
  %124 = sext i32 %123 to i64
  %125 = getelementptr inbounds [8 x %"class.randomx::SuperscalarProgram"], ptr %122, i64 0, i64 %124
  %126 = load i32, ptr %15, align 4, !tbaa !31
  %127 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN7randomx18SuperscalarProgramclEi(ptr noundef nonnull align 8 dereferenceable(4200) %125, i32 noundef %126)
  store ptr %127, ptr %16, align 8, !tbaa !5
  %128 = load ptr, ptr %16, align 8, !tbaa !5
  %129 = getelementptr inbounds %"class.randomx::Instruction", ptr %128, i32 0, i32 0
  %130 = load i8, ptr %129, align 4, !tbaa !53
  %131 = zext i8 %130 to i32
  %132 = icmp eq i32 %131, 13
  br i1 %132, label %133, label %144

133:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  %134 = load ptr, ptr %16, align 8, !tbaa !5
  %135 = call noundef i32 @_ZNK7randomx11Instruction8getImm32Ev(ptr noundef nonnull align 4 dereferenceable(8) %134)
  %136 = call i64 @randomx_reciprocal(i32 noundef %135)
  store i64 %136, ptr %17, align 8, !tbaa !9
  %137 = load ptr, ptr %16, align 8, !tbaa !5
  %138 = load ptr, ptr %4, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.randomx_cache, ptr %138, i32 0, i32 6
  %140 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %139) #5
  %141 = trunc i64 %140 to i32
  call void @_ZN7randomx11Instruction8setImm32Ej(ptr noundef nonnull align 4 dereferenceable(8) %137, i32 noundef %141)
  %142 = load ptr, ptr %4, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.randomx_cache, ptr %142, i32 0, i32 6
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %143, ptr noundef nonnull align 8 dereferenceable(8) %17)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  br label %144

144:                                              ; preds = %133, %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  br label %145

145:                                              ; preds = %144
  %146 = load i32, ptr %15, align 4, !tbaa !31
  %147 = add i32 %146, 1
  store i32 %147, ptr %15, align 4, !tbaa !31
  br label %110, !llvm.loop !55

148:                                              ; preds = %119
  br label %149

149:                                              ; preds = %148
  %150 = load i32, ptr %13, align 4, !tbaa !31
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %13, align 4, !tbaa !31
  br label %100, !llvm.loop !57

152:                                              ; preds = %103
  call void @llvm.lifetime.end.p0(i64 72, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 120, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret void
}

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

declare i32 @randomx_argon2_validate_inputs(ptr noundef) #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

declare i32 @randomx_argon2_initialize(ptr noundef, ptr noundef) #2

declare i32 @randomx_argon2_fill_memory_blocks(ptr noundef) #2

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

declare void @_ZN7randomx15Blake2GeneratorC1EPKvmi(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef, i64 noundef, i32 noundef) unnamed_addr #2

declare void @_ZN7randomx19generateSuperscalarERNS_18SuperscalarProgramERNS_15Blake2GeneratorE(ptr noundef nonnull align 8 dereferenceable(4200), ptr noundef nonnull align 8 dereferenceable(72)) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZN7randomx18SuperscalarProgramclEi(ptr noundef nonnull align 8 dereferenceable(4200), i32 noundef) #4 align 2

declare i64 @randomx_reciprocal(i32 noundef) #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

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

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

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 = { noreturn 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 #4 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTS14Argon2_Context", !6, i64 0, !13, i64 8, !6, i64 16, !13, i64 24, !6, i64 32, !13, i64 40, !6, i64 48, !13, i64 56, !6, i64 64, !13, i64 72, !13, i64 76, !13, i64 80, !13, i64 84, !13, i64 88, !13, i64 92, !6, i64 96, !6, i64 104, !13, i64 112}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !13, i64 8}
!15 = !{!12, !6, i64 16}
!16 = !{!12, !13, i64 24}
!17 = !{!12, !6, i64 32}
!18 = !{!12, !13, i64 40}
!19 = !{!12, !6, i64 48}
!20 = !{!12, !13, i64 56}
!21 = !{!12, !6, i64 64}
!22 = !{!12, !13, i64 72}
!23 = !{!12, !13, i64 76}
!24 = !{!12, !13, i64 80}
!25 = !{!12, !13, i64 84}
!26 = !{!12, !13, i64 88}
!27 = !{!12, !6, i64 96}
!28 = !{!12, !6, i64 104}
!29 = !{!12, !13, i64 112}
!30 = !{!12, !13, i64 92}
!31 = !{!13, !13, i64 0}
!32 = !{!33, !13, i64 8}
!33 = !{!"_ZTS17Argon2_instance_t", !6, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !34, i64 36, !13, i64 40, !6, i64 48, !6, i64 56}
!34 = !{!"_ZTS11Argon2_type", !7, i64 0}
!35 = !{!33, !6, i64 0}
!36 = !{!33, !13, i64 12}
!37 = !{!33, !13, i64 16}
!38 = !{!33, !13, i64 20}
!39 = !{!33, !13, i64 24}
!40 = !{!33, !13, i64 28}
!41 = !{!33, !13, i64 32}
!42 = !{!33, !34, i64 36}
!43 = !{!44, !6, i64 0}
!44 = !{!"_ZTS13randomx_cache", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !7, i64 40, !45, i64 33640, !49, i64 33664, !6, i64 33696}
!45 = !{!"_ZTSSt6vectorImSaImEE", !46, i64 0}
!46 = !{!"_ZTSSt12_Vector_baseImSaImEE", !47, i64 0}
!47 = !{!"_ZTSNSt12_Vector_baseImSaImEE12_Vector_implE", !48, i64 0}
!48 = !{!"_ZTSNSt12_Vector_baseImSaImEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!49 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !50, i64 0, !10, i64 8, !7, i64 16}
!50 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!51 = !{!44, !6, i64 33696}
!52 = !{!33, !6, i64 56}
!53 = !{!54, !7, i64 0}
!54 = !{!"_ZTSN7randomx11InstructionE", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !13, i64 4}
!55 = distinct !{!55, !56}
!56 = !{!"llvm.loop.mustprogress"}
!57 = distinct !{!57, !56}


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

%struct.Argon2_instance_t = type { ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr }
%struct.Argon2_Context = type { ptr, i32, ptr, i32, ptr, i32, ptr, i32, ptr, i32, i32, i32, i32, i32, i32, ptr, ptr, i32 }
%"class.randomx::Blake2Generator" = type { [64 x i8], i64 }

@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [65 x i8], align 1
@__PRETTY_FUNCTION__._ZN7randomx9initCacheEP13randomx_cachePKvm = external hidden unnamed_addr constant [63 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7randomx9initCacheEP13randomx_cachePKvm(ptr noundef %0, ptr noundef %1, i64 noundef %2) local_unnamed_addr #0 {
  %4 = alloca %struct.Argon2_instance_t, align 8
  %5 = alloca %struct.Argon2_Context, align 8
  %6 = alloca %"class.randomx::Blake2Generator", align 8
  %7 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %5) #6
  store ptr null, ptr %5, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %5, i64 8
  store i32 0, ptr %8, align 8, !tbaa !11
  %9 = getelementptr inbounds i8, ptr %5, i64 16
  store ptr %1, ptr %9, align 8, !tbaa !12
  %10 = trunc i64 %2 to i32
  %11 = getelementptr inbounds i8, ptr %5, i64 24
  store i32 %10, ptr %11, align 8, !tbaa !13
  %12 = getelementptr inbounds i8, ptr %5, i64 32
  store ptr @.str, ptr %12, align 8, !tbaa !14
  %13 = getelementptr inbounds i8, ptr %5, i64 40
  store i32 8, ptr %13, align 8, !tbaa !15
  %14 = getelementptr inbounds i8, ptr %5, i64 48
  store ptr null, ptr %14, align 8, !tbaa !16
  %15 = getelementptr inbounds i8, ptr %5, i64 56
  store i32 0, ptr %15, align 8, !tbaa !17
  %16 = getelementptr inbounds i8, ptr %5, i64 64
  store ptr null, ptr %16, align 8, !tbaa !18
  %17 = getelementptr inbounds i8, ptr %5, i64 72
  store <4 x i32> <i32 0, i32 3, i32 262144, i32 1>, ptr %17, align 8, !tbaa !19
  %18 = getelementptr inbounds i8, ptr %5, i64 88
  store i32 1, ptr %18, align 8, !tbaa !20
  %19 = getelementptr inbounds i8, ptr %5, i64 96
  %20 = getelementptr inbounds i8, ptr %5, i64 92
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(20) %19, i8 0, i64 20, i1 false)
  store i32 19, ptr %20, align 4, !tbaa !21
  %21 = call i32 @randomx_argon2_validate_inputs(ptr noundef nonnull %5)
  %22 = icmp eq i32 %21, 0
  br i1 %22, label %24, label %23

23:                                               ; preds = %3
  call void @__assert_fail(ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 96, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7randomx9initCacheEP13randomx_cachePKvm) #7
  unreachable

24:                                               ; preds = %3
  %25 = getelementptr inbounds i8, ptr %5, i64 84
  %26 = getelementptr inbounds i8, ptr %5, i64 80
  %27 = getelementptr inbounds i8, ptr %5, i64 76
  %28 = load i32, ptr %26, align 8, !tbaa !22
  %29 = load i32, ptr %25, align 4, !tbaa !23
  %30 = shl i32 %29, 2
  %31 = udiv i32 %28, %30
  %32 = load i32, ptr %20, align 4, !tbaa !21
  %33 = getelementptr inbounds i8, ptr %4, i64 8
  store i32 %32, ptr %33, align 8, !tbaa !24
  %34 = load i32, ptr %27, align 4, !tbaa !27
  %35 = getelementptr inbounds i8, ptr %4, i64 12
  store i32 %34, ptr %35, align 4, !tbaa !28
  %36 = getelementptr inbounds i8, ptr %4, i64 16
  store i32 %28, ptr %36, align 8, !tbaa !29
  %37 = getelementptr inbounds i8, ptr %4, i64 20
  store i32 %31, ptr %37, align 4, !tbaa !30
  %38 = shl i32 %31, 2
  %39 = getelementptr inbounds i8, ptr %4, i64 24
  store i32 %38, ptr %39, align 8, !tbaa !31
  %40 = getelementptr inbounds i8, ptr %4, i64 28
  store i32 %29, ptr %40, align 4, !tbaa !32
  %41 = load i32, ptr %18, align 8, !tbaa !20
  %42 = getelementptr inbounds i8, ptr %4, i64 32
  store i32 %41, ptr %42, align 8, !tbaa !33
  %43 = getelementptr inbounds i8, ptr %4, i64 36
  store i32 0, ptr %43, align 4, !tbaa !34
  %44 = load ptr, ptr %0, align 8, !tbaa !35
  store ptr %44, ptr %4, align 8, !tbaa !44
  %45 = getelementptr inbounds i8, ptr %0, i64 33696
  %46 = load ptr, ptr %45, align 8, !tbaa !45
  %47 = getelementptr inbounds i8, ptr %4, i64 56
  store ptr %46, ptr %47, align 8, !tbaa !46
  %48 = icmp ugt i32 %41, %29
  br i1 %48, label %49, label %50

49:                                               ; preds = %24
  store i32 %29, ptr %42, align 8, !tbaa !33
  br label %50

50:                                               ; preds = %49, %24
  %51 = call i32 @randomx_argon2_initialize(ptr noundef nonnull %4, ptr noundef nonnull %5)
  %52 = call i32 @randomx_argon2_fill_memory_blocks(ptr noundef nonnull %4)
  %53 = getelementptr inbounds i8, ptr %0, i64 33640
  call void @_ZNSt6vectorImSaImEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %53) #6
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %6) #6
  call void @_ZN7randomx15Blake2GeneratorC1EPKvmi(ptr noundef nonnull align 8 dereferenceable(72) %6, ptr noundef %1, i64 noundef %2, i32 noundef 0)
  %54 = getelementptr inbounds i8, ptr %0, i64 40
  call void @_ZN7randomx19generateSuperscalarERNS_18SuperscalarProgramERNS_15Blake2GeneratorE(ptr noundef nonnull align 8 dereferenceable(4200) %54, ptr noundef nonnull align 8 dereferenceable(72) %6)
  %55 = call noundef i32 @_ZN7randomx18SuperscalarProgram7getSizeEv(ptr noundef nonnull align 8 dereferenceable(4200) %54)
  %.not = icmp eq i32 %55, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %162, %50
  %56 = getelementptr inbounds i8, ptr %0, i64 4240
  call void @_ZN7randomx19generateSuperscalarERNS_18SuperscalarProgramERNS_15Blake2GeneratorE(ptr noundef nonnull align 8 dereferenceable(4200) %56, ptr noundef nonnull align 8 dereferenceable(72) %6)
  %57 = call noundef i32 @_ZN7randomx18SuperscalarProgram7getSizeEv(ptr noundef nonnull align 8 dereferenceable(4200) %56)
  %.not.1 = icmp eq i32 %57, 0
  br i1 %.not.1, label %._crit_edge.1, label %.lr.ph.1

.lr.ph.1:                                         ; preds = %._crit_edge, %66
  %.02729.1 = phi i32 [ %67, %66 ], [ 0, %._crit_edge ]
  %58 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN7randomx18SuperscalarProgramclEi(ptr noundef nonnull align 8 dereferenceable(4200) %56, i32 noundef %.02729.1)
  %59 = load i8, ptr %58, align 4, !tbaa !47
  %60 = icmp eq i8 %59, 13
  br i1 %60, label %61, label %66

61:                                               ; preds = %.lr.ph.1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %62 = call noundef i32 @_ZNK7randomx11Instruction8getImm32Ev(ptr noundef nonnull align 4 dereferenceable(8) %58)
  %63 = call i64 @randomx_reciprocal(i32 noundef %62)
  store i64 %63, ptr %7, align 8, !tbaa !49
  %64 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %53) #6
  %65 = trunc i64 %64 to i32
  call void @_ZN7randomx11Instruction8setImm32Ej(ptr noundef nonnull align 4 dereferenceable(8) %58, i32 noundef %65)
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %53, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %66

66:                                               ; preds = %61, %.lr.ph.1
  %67 = add nuw i32 %.02729.1, 1
  %68 = call noundef i32 @_ZN7randomx18SuperscalarProgram7getSizeEv(ptr noundef nonnull align 8 dereferenceable(4200) %56)
  %69 = icmp ult i32 %67, %68
  br i1 %69, label %.lr.ph.1, label %._crit_edge.1, !llvm.loop !50

._crit_edge.1:                                    ; preds = %66, %._crit_edge
  %70 = getelementptr inbounds i8, ptr %0, i64 8440
  call void @_ZN7randomx19generateSuperscalarERNS_18SuperscalarProgramERNS_15Blake2GeneratorE(ptr noundef nonnull align 8 dereferenceable(4200) %70, ptr noundef nonnull align 8 dereferenceable(72) %6)
  %71 = call noundef i32 @_ZN7randomx18SuperscalarProgram7getSizeEv(ptr noundef nonnull align 8 dereferenceable(4200) %70)
  %.not.2 = icmp eq i32 %71, 0
  br i1 %.not.2, label %._crit_edge.2, label %.lr.ph.2

.lr.ph.2:                                         ; preds = %._crit_edge.1, %80
  %.02729.2 = phi i32 [ %81, %80 ], [ 0, %._crit_edge.1 ]
  %72 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN7randomx18SuperscalarProgramclEi(ptr noundef nonnull align 8 dereferenceable(4200) %70, i32 noundef %.02729.2)
  %73 = load i8, ptr %72, align 4, !tbaa !47
  %74 = icmp eq i8 %73, 13
  br i1 %74, label %75, label %80

75:                                               ; preds = %.lr.ph.2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %76 = call noundef i32 @_ZNK7randomx11Instruction8getImm32Ev(ptr noundef nonnull align 4 dereferenceable(8) %72)
  %77 = call i64 @randomx_reciprocal(i32 noundef %76)
  store i64 %77, ptr %7, align 8, !tbaa !49
  %78 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %53) #6
  %79 = trunc i64 %78 to i32
  call void @_ZN7randomx11Instruction8setImm32Ej(ptr noundef nonnull align 4 dereferenceable(8) %72, i32 noundef %79)
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %53, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %80

80:                                               ; preds = %75, %.lr.ph.2
  %81 = add nuw i32 %.02729.2, 1
  %82 = call noundef i32 @_ZN7randomx18SuperscalarProgram7getSizeEv(ptr noundef nonnull align 8 dereferenceable(4200) %70)
  %83 = icmp ult i32 %81, %82
  br i1 %83, label %.lr.ph.2, label %._crit_edge.2, !llvm.loop !50

._crit_edge.2:                                    ; preds = %80, %._crit_edge.1
  %84 = getelementptr inbounds i8, ptr %0, i64 12640
  call void @_ZN7randomx19generateSuperscalarERNS_18SuperscalarProgramERNS_15Blake2GeneratorE(ptr noundef nonnull align 8 dereferenceable(4200) %84, ptr noundef nonnull align 8 dereferenceable(72) %6)
  %85 = call noundef i32 @_ZN7randomx18SuperscalarProgram7getSizeEv(ptr noundef nonnull align 8 dereferenceable(4200) %84)
  %.not.3 = icmp eq i32 %85, 0
  br i1 %.not.3, label %._crit_edge.3, label %.lr.ph.3

.lr.ph.3:                                         ; preds = %._crit_edge.2, %94
  %.02729.3 = phi i32 [ %95, %94 ], [ 0, %._crit_edge.2 ]
  %86 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN7randomx18SuperscalarProgramclEi(ptr noundef nonnull align 8 dereferenceable(4200) %84, i32 noundef %.02729.3)
  %87 = load i8, ptr %86, align 4, !tbaa !47
  %88 = icmp eq i8 %87, 13
  br i1 %88, label %89, label %94

89:                                               ; preds = %.lr.ph.3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %90 = call noundef i32 @_ZNK7randomx11Instruction8getImm32Ev(ptr noundef nonnull align 4 dereferenceable(8) %86)
  %91 = call i64 @randomx_reciprocal(i32 noundef %90)
  store i64 %91, ptr %7, align 8, !tbaa !49
  %92 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %53) #6
  %93 = trunc i64 %92 to i32
  call void @_ZN7randomx11Instruction8setImm32Ej(ptr noundef nonnull align 4 dereferenceable(8) %86, i32 noundef %93)
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %53, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %94

94:                                               ; preds = %89, %.lr.ph.3
  %95 = add nuw i32 %.02729.3, 1
  %96 = call noundef i32 @_ZN7randomx18SuperscalarProgram7getSizeEv(ptr noundef nonnull align 8 dereferenceable(4200) %84)
  %97 = icmp ult i32 %95, %96
  br i1 %97, label %.lr.ph.3, label %._crit_edge.3, !llvm.loop !50

._crit_edge.3:                                    ; preds = %94, %._crit_edge.2
  %98 = getelementptr inbounds i8, ptr %0, i64 16840
  call void @_ZN7randomx19generateSuperscalarERNS_18SuperscalarProgramERNS_15Blake2GeneratorE(ptr noundef nonnull align 8 dereferenceable(4200) %98, ptr noundef nonnull align 8 dereferenceable(72) %6)
  %99 = call noundef i32 @_ZN7randomx18SuperscalarProgram7getSizeEv(ptr noundef nonnull align 8 dereferenceable(4200) %98)
  %.not.4 = icmp eq i32 %99, 0
  br i1 %.not.4, label %._crit_edge.4, label %.lr.ph.4

.lr.ph.4:                                         ; preds = %._crit_edge.3, %108
  %.02729.4 = phi i32 [ %109, %108 ], [ 0, %._crit_edge.3 ]
  %100 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN7randomx18SuperscalarProgramclEi(ptr noundef nonnull align 8 dereferenceable(4200) %98, i32 noundef %.02729.4)
  %101 = load i8, ptr %100, align 4, !tbaa !47
  %102 = icmp eq i8 %101, 13
  br i1 %102, label %103, label %108

103:                                              ; preds = %.lr.ph.4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %104 = call noundef i32 @_ZNK7randomx11Instruction8getImm32Ev(ptr noundef nonnull align 4 dereferenceable(8) %100)
  %105 = call i64 @randomx_reciprocal(i32 noundef %104)
  store i64 %105, ptr %7, align 8, !tbaa !49
  %106 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %53) #6
  %107 = trunc i64 %106 to i32
  call void @_ZN7randomx11Instruction8setImm32Ej(ptr noundef nonnull align 4 dereferenceable(8) %100, i32 noundef %107)
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %53, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %108

108:                                              ; preds = %103, %.lr.ph.4
  %109 = add nuw i32 %.02729.4, 1
  %110 = call noundef i32 @_ZN7randomx18SuperscalarProgram7getSizeEv(ptr noundef nonnull align 8 dereferenceable(4200) %98)
  %111 = icmp ult i32 %109, %110
  br i1 %111, label %.lr.ph.4, label %._crit_edge.4, !llvm.loop !50

._crit_edge.4:                                    ; preds = %108, %._crit_edge.3
  %112 = getelementptr inbounds i8, ptr %0, i64 21040
  call void @_ZN7randomx19generateSuperscalarERNS_18SuperscalarProgramERNS_15Blake2GeneratorE(ptr noundef nonnull align 8 dereferenceable(4200) %112, ptr noundef nonnull align 8 dereferenceable(72) %6)
  %113 = call noundef i32 @_ZN7randomx18SuperscalarProgram7getSizeEv(ptr noundef nonnull align 8 dereferenceable(4200) %112)
  %.not.5 = icmp eq i32 %113, 0
  br i1 %.not.5, label %._crit_edge.5, label %.lr.ph.5

.lr.ph.5:                                         ; preds = %._crit_edge.4, %122
  %.02729.5 = phi i32 [ %123, %122 ], [ 0, %._crit_edge.4 ]
  %114 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN7randomx18SuperscalarProgramclEi(ptr noundef nonnull align 8 dereferenceable(4200) %112, i32 noundef %.02729.5)
  %115 = load i8, ptr %114, align 4, !tbaa !47
  %116 = icmp eq i8 %115, 13
  br i1 %116, label %117, label %122

117:                                              ; preds = %.lr.ph.5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %118 = call noundef i32 @_ZNK7randomx11Instruction8getImm32Ev(ptr noundef nonnull align 4 dereferenceable(8) %114)
  %119 = call i64 @randomx_reciprocal(i32 noundef %118)
  store i64 %119, ptr %7, align 8, !tbaa !49
  %120 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %53) #6
  %121 = trunc i64 %120 to i32
  call void @_ZN7randomx11Instruction8setImm32Ej(ptr noundef nonnull align 4 dereferenceable(8) %114, i32 noundef %121)
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %53, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %122

122:                                              ; preds = %117, %.lr.ph.5
  %123 = add nuw i32 %.02729.5, 1
  %124 = call noundef i32 @_ZN7randomx18SuperscalarProgram7getSizeEv(ptr noundef nonnull align 8 dereferenceable(4200) %112)
  %125 = icmp ult i32 %123, %124
  br i1 %125, label %.lr.ph.5, label %._crit_edge.5, !llvm.loop !50

._crit_edge.5:                                    ; preds = %122, %._crit_edge.4
  %126 = getelementptr inbounds i8, ptr %0, i64 25240
  call void @_ZN7randomx19generateSuperscalarERNS_18SuperscalarProgramERNS_15Blake2GeneratorE(ptr noundef nonnull align 8 dereferenceable(4200) %126, ptr noundef nonnull align 8 dereferenceable(72) %6)
  %127 = call noundef i32 @_ZN7randomx18SuperscalarProgram7getSizeEv(ptr noundef nonnull align 8 dereferenceable(4200) %126)
  %.not.6 = icmp eq i32 %127, 0
  br i1 %.not.6, label %._crit_edge.6, label %.lr.ph.6

.lr.ph.6:                                         ; preds = %._crit_edge.5, %136
  %.02729.6 = phi i32 [ %137, %136 ], [ 0, %._crit_edge.5 ]
  %128 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN7randomx18SuperscalarProgramclEi(ptr noundef nonnull align 8 dereferenceable(4200) %126, i32 noundef %.02729.6)
  %129 = load i8, ptr %128, align 4, !tbaa !47
  %130 = icmp eq i8 %129, 13
  br i1 %130, label %131, label %136

131:                                              ; preds = %.lr.ph.6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %132 = call noundef i32 @_ZNK7randomx11Instruction8getImm32Ev(ptr noundef nonnull align 4 dereferenceable(8) %128)
  %133 = call i64 @randomx_reciprocal(i32 noundef %132)
  store i64 %133, ptr %7, align 8, !tbaa !49
  %134 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %53) #6
  %135 = trunc i64 %134 to i32
  call void @_ZN7randomx11Instruction8setImm32Ej(ptr noundef nonnull align 4 dereferenceable(8) %128, i32 noundef %135)
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %53, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %136

136:                                              ; preds = %131, %.lr.ph.6
  %137 = add nuw i32 %.02729.6, 1
  %138 = call noundef i32 @_ZN7randomx18SuperscalarProgram7getSizeEv(ptr noundef nonnull align 8 dereferenceable(4200) %126)
  %139 = icmp ult i32 %137, %138
  br i1 %139, label %.lr.ph.6, label %._crit_edge.6, !llvm.loop !50

._crit_edge.6:                                    ; preds = %136, %._crit_edge.5
  %140 = getelementptr inbounds i8, ptr %0, i64 29440
  call void @_ZN7randomx19generateSuperscalarERNS_18SuperscalarProgramERNS_15Blake2GeneratorE(ptr noundef nonnull align 8 dereferenceable(4200) %140, ptr noundef nonnull align 8 dereferenceable(72) %6)
  %141 = call noundef i32 @_ZN7randomx18SuperscalarProgram7getSizeEv(ptr noundef nonnull align 8 dereferenceable(4200) %140)
  %.not.7 = icmp eq i32 %141, 0
  br i1 %.not.7, label %._crit_edge.7, label %.lr.ph.7

.lr.ph.7:                                         ; preds = %._crit_edge.6, %150
  %.02729.7 = phi i32 [ %151, %150 ], [ 0, %._crit_edge.6 ]
  %142 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN7randomx18SuperscalarProgramclEi(ptr noundef nonnull align 8 dereferenceable(4200) %140, i32 noundef %.02729.7)
  %143 = load i8, ptr %142, align 4, !tbaa !47
  %144 = icmp eq i8 %143, 13
  br i1 %144, label %145, label %150

145:                                              ; preds = %.lr.ph.7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %146 = call noundef i32 @_ZNK7randomx11Instruction8getImm32Ev(ptr noundef nonnull align 4 dereferenceable(8) %142)
  %147 = call i64 @randomx_reciprocal(i32 noundef %146)
  store i64 %147, ptr %7, align 8, !tbaa !49
  %148 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %53) #6
  %149 = trunc i64 %148 to i32
  call void @_ZN7randomx11Instruction8setImm32Ej(ptr noundef nonnull align 4 dereferenceable(8) %142, i32 noundef %149)
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %53, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %150

150:                                              ; preds = %145, %.lr.ph.7
  %151 = add nuw i32 %.02729.7, 1
  %152 = call noundef i32 @_ZN7randomx18SuperscalarProgram7getSizeEv(ptr noundef nonnull align 8 dereferenceable(4200) %140)
  %153 = icmp ult i32 %151, %152
  br i1 %153, label %.lr.ph.7, label %._crit_edge.7, !llvm.loop !50

._crit_edge.7:                                    ; preds = %150, %._crit_edge.6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #6
  ret void

.lr.ph:                                           ; preds = %50, %162
  %.02729 = phi i32 [ %163, %162 ], [ 0, %50 ]
  %154 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZN7randomx18SuperscalarProgramclEi(ptr noundef nonnull align 8 dereferenceable(4200) %54, i32 noundef %.02729)
  %155 = load i8, ptr %154, align 4, !tbaa !47
  %156 = icmp eq i8 %155, 13
  br i1 %156, label %157, label %162

157:                                              ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %158 = call noundef i32 @_ZNK7randomx11Instruction8getImm32Ev(ptr noundef nonnull align 4 dereferenceable(8) %154)
  %159 = call i64 @randomx_reciprocal(i32 noundef %158)
  store i64 %159, ptr %7, align 8, !tbaa !49
  %160 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %53) #6
  %161 = trunc i64 %160 to i32
  call void @_ZN7randomx11Instruction8setImm32Ej(ptr noundef nonnull align 4 dereferenceable(8) %154, i32 noundef %161)
  call void @_ZNSt6vectorImSaImEE9push_backERKm(ptr noundef nonnull align 8 dereferenceable(24) %53, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %162

162:                                              ; preds = %157, %.lr.ph
  %163 = add nuw i32 %.02729, 1
  %164 = call noundef i32 @_ZN7randomx18SuperscalarProgram7getSizeEv(ptr noundef nonnull align 8 dereferenceable(4200) %54)
  %165 = icmp ult i32 %163, %164
  br i1 %165, label %.lr.ph, label %._crit_edge, !llvm.loop !50
}

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

declare i32 @randomx_argon2_validate_inputs(ptr noundef) local_unnamed_addr #2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

declare i32 @randomx_argon2_initialize(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @randomx_argon2_fill_memory_blocks(ptr noundef) local_unnamed_addr #2

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

declare void @_ZN7randomx15Blake2GeneratorC1EPKvmi(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef, i64 noundef, i32 noundef) unnamed_addr #2

declare void @_ZN7randomx19generateSuperscalarERNS_18SuperscalarProgramERNS_15Blake2GeneratorE(ptr noundef nonnull align 8 dereferenceable(4200), ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZN7randomx18SuperscalarProgramclEi(ptr noundef nonnull align 8 dereferenceable(4200), i32 noundef) local_unnamed_addr #4 align 2

declare i64 @randomx_reciprocal(i32 noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTS14Argon2_Context", !7, i64 0, !10, i64 8, !7, i64 16, !10, i64 24, !7, i64 32, !10, i64 40, !7, i64 48, !10, i64 56, !7, i64 64, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !7, i64 96, !7, i64 104, !10, i64 112}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!6, !10, i64 8}
!12 = !{!6, !7, i64 16}
!13 = !{!6, !10, i64 24}
!14 = !{!6, !7, i64 32}
!15 = !{!6, !10, i64 40}
!16 = !{!6, !7, i64 48}
!17 = !{!6, !10, i64 56}
!18 = !{!6, !7, i64 64}
!19 = !{!10, !10, i64 0}
!20 = !{!6, !10, i64 88}
!21 = !{!6, !10, i64 92}
!22 = !{!6, !10, i64 80}
!23 = !{!6, !10, i64 84}
!24 = !{!25, !10, i64 8}
!25 = !{!"_ZTS17Argon2_instance_t", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !26, i64 36, !10, i64 40, !7, i64 48, !7, i64 56}
!26 = !{!"_ZTS11Argon2_type", !8, i64 0}
!27 = !{!6, !10, i64 76}
!28 = !{!25, !10, i64 12}
!29 = !{!25, !10, i64 16}
!30 = !{!25, !10, i64 20}
!31 = !{!25, !10, i64 24}
!32 = !{!25, !10, i64 28}
!33 = !{!25, !10, i64 32}
!34 = !{!25, !26, i64 36}
!35 = !{!36, !7, i64 0}
!36 = !{!"_ZTS13randomx_cache", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !8, i64 40, !37, i64 33640, !41, i64 33664, !7, i64 33696}
!37 = !{!"_ZTSSt6vectorImSaImEE", !38, i64 0}
!38 = !{!"_ZTSSt12_Vector_baseImSaImEE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseImSaImEE12_Vector_implE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseImSaImEE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!41 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !42, i64 0, !43, i64 8, !8, i64 16}
!42 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !7, i64 0}
!43 = !{!"long", !8, i64 0}
!44 = !{!25, !7, i64 0}
!45 = !{!36, !7, i64 33696}
!46 = !{!25, !7, i64 56}
!47 = !{!48, !8, i64 0}
!48 = !{!"_ZTSN7randomx11InstructionE", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !10, i64 4}
!49 = !{!43, !43, i64 0}
!50 = distinct !{!50, !51}
!51 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass