; LLVM IR from intel/cryptography-primitives :: sources/ippcp (pcpprng_gen)

; 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._cpPRNG = type { i32, i32, [3 x i64], [3 x i64], [8 x i64], [8 x i64] }

; Function Attrs: nounwind uwtable
define dso_local i32 @cpPRNGen(ptr noundef %0, i32 noundef %1, ptr noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca [8 x i64], align 16
  %8 = alloca [8 x i64], align 16
  %9 = alloca [64 x i8], align 16
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i64, align 8
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct._cpPRNG, ptr %21, i32 0, i32 1
  %23 = load i32, ptr %22, align 4, !tbaa !11
  %24 = add nsw i32 %23, 64
  %25 = sub nsw i32 %24, 1
  %26 = sdiv i32 %25, 64
  store i32 %26, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct._cpPRNG, ptr %27, i32 0, i32 1
  %29 = load i32, ptr %28, align 4, !tbaa !11
  %30 = add nsw i32 %29, 7
  %31 = ashr i32 %30, 3
  store i32 %31, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct._cpPRNG, ptr %32, i32 0, i32 1
  %34 = load i32, ptr %33, align 4, !tbaa !11
  %35 = and i32 %34, 63
  %36 = sub nsw i32 64, %35
  %37 = and i32 %36, 63
  %38 = zext i32 %37 to i64
  %39 = lshr i64 -1, %38
  store i64 %39, ptr %12, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %40 = load i32, ptr %5, align 4, !tbaa !9
  %41 = add nsw i32 %40, 31
  %42 = ashr i32 %41, 5
  store i32 %42, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %43

43:                                               ; preds = %50, %3
  %44 = load i32, ptr %14, align 4, !tbaa !9
  %45 = icmp slt i32 %44, 8
  br i1 %45, label %46, label %53

46:                                               ; preds = %43
  %47 = load i32, ptr %14, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [8 x i64], ptr %7, i64 0, i64 %48
  store i64 0, ptr %49, align 8, !tbaa !13
  br label %50

50:                                               ; preds = %46
  %51 = load i32, ptr %14, align 4, !tbaa !9
  %52 = add nsw i32 %51, 1
  store i32 %52, ptr %14, align 4, !tbaa !9
  br label %43, !llvm.loop !15

53:                                               ; preds = %43
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %54

54:                                               ; preds = %61, %53
  %55 = load i32, ptr %15, align 4, !tbaa !9
  %56 = icmp slt i32 %55, 8
  br i1 %56, label %57, label %64

57:                                               ; preds = %54
  %58 = load i32, ptr %15, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds [8 x i64], ptr %8, i64 0, i64 %59
  store i64 0, ptr %60, align 8, !tbaa !13
  br label %61

61:                                               ; preds = %57
  %62 = load i32, ptr %15, align 4, !tbaa !9
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr %15, align 4, !tbaa !9
  br label %54, !llvm.loop !17

64:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %65

65:                                               ; preds = %174, %64
  %66 = load i32, ptr %13, align 4, !tbaa !9
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %68, label %183

68:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %69 = getelementptr inbounds [8 x i64], ptr %8, i64 0, i64 0
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct._cpPRNG, ptr %70, i32 0, i32 5
  %72 = getelementptr inbounds [8 x i64], ptr %71, i64 0, i64 0
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct._cpPRNG, ptr %73, i32 0, i32 4
  %75 = getelementptr inbounds [8 x i64], ptr %74, i64 0, i64 0
  %76 = load i32, ptr %10, align 4, !tbaa !9
  %77 = call i64 @cpAdd_BNU(ptr noundef %69, ptr noundef %72, ptr noundef %75, i32 noundef %76)
  store i64 %77, ptr %17, align 8, !tbaa !13
  %78 = load i64, ptr %12, align 8, !tbaa !13
  %79 = load i32, ptr %10, align 4, !tbaa !9
  %80 = sub nsw i32 %79, 1
  %81 = sext i32 %80 to i64
  %82 = getelementptr inbounds [8 x i64], ptr %8, i64 0, i64 %81
  %83 = load i64, ptr %82, align 8, !tbaa !13
  %84 = and i64 %83, %78
  store i64 %84, ptr %82, align 8, !tbaa !13
  %85 = getelementptr inbounds [64 x i8], ptr %9, i64 0, i64 0
  %86 = load i32, ptr %11, align 4, !tbaa !9
  %87 = getelementptr inbounds [8 x i64], ptr %8, i64 0, i64 0
  %88 = load i32, ptr %10, align 4, !tbaa !9
  %89 = call i32 @cpToOctStr_BNU(ptr noundef %85, i32 noundef %86, ptr noundef %87, i32 noundef %88)
  %90 = getelementptr inbounds [8 x i64], ptr %7, i64 0, i64 0
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct._cpPRNG, ptr %91, i32 0, i32 3
  %93 = getelementptr inbounds [3 x i64], ptr %92, i64 0, i64 0
  %94 = getelementptr inbounds [64 x i8], ptr %9, i64 0, i64 0
  %95 = load i32, ptr %11, align 4, !tbaa !9
  call void @SHA1_G(ptr noundef %90, ptr noundef %93, ptr noundef %94, i32 noundef %95)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 3, ptr %18, align 4, !tbaa !9
  %96 = getelementptr inbounds [8 x i64], ptr %7, i64 0, i64 0
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct._cpPRNG, ptr %97, i32 0, i32 2
  %99 = getelementptr inbounds [3 x i64], ptr %98, i64 0, i64 0
  %100 = call i32 @cpCmp_BNU(ptr noundef %96, i32 noundef 3, ptr noundef %99, i32 noundef 3)
  %101 = icmp sle i32 0, %100
  br i1 %101, label %102, label %108

102:                                              ; preds = %68
  %103 = getelementptr inbounds [8 x i64], ptr %7, i64 0, i64 0
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct._cpPRNG, ptr %104, i32 0, i32 2
  %106 = getelementptr inbounds [3 x i64], ptr %105, i64 0, i64 0
  %107 = call i32 @cpMod_BNU(ptr noundef %103, i32 noundef 3, ptr noundef %106, i32 noundef 3)
  store i32 %107, ptr %18, align 4, !tbaa !9
  br label %108

108:                                              ; preds = %102, %68
  %109 = getelementptr inbounds [8 x i64], ptr %7, i64 0, i64 0
  %110 = load i32, ptr %18, align 4, !tbaa !9
  %111 = call i32 @cpFix_BNU(ptr noundef %109, i32 noundef %110)
  store i32 %111, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  %112 = load i32, ptr %18, align 4, !tbaa !9
  store i32 %112, ptr %19, align 4, !tbaa !9
  br label %113

113:                                              ; preds = %120, %108
  %114 = load i32, ptr %19, align 4, !tbaa !9
  %115 = icmp slt i32 %114, 8
  br i1 %115, label %116, label %123

116:                                              ; preds = %113
  %117 = load i32, ptr %19, align 4, !tbaa !9
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds [8 x i64], ptr %7, i64 0, i64 %118
  store i64 0, ptr %119, align 8, !tbaa !13
  br label %120

120:                                              ; preds = %116
  %121 = load i32, ptr %19, align 4, !tbaa !9
  %122 = add nsw i32 %121, 1
  store i32 %122, ptr %19, align 4, !tbaa !9
  br label %113, !llvm.loop !18

123:                                              ; preds = %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  %124 = load ptr, ptr %6, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct._cpPRNG, ptr %124, i32 0, i32 5
  %126 = getelementptr inbounds [8 x i64], ptr %125, i64 0, i64 0
  %127 = load ptr, ptr %6, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct._cpPRNG, ptr %127, i32 0, i32 5
  %129 = getelementptr inbounds [8 x i64], ptr %128, i64 0, i64 0
  %130 = load i32, ptr %10, align 4, !tbaa !9
  %131 = call i64 @cpInc_BNU(ptr noundef %126, ptr noundef %129, i32 noundef %130, i64 noundef 1)
  %132 = load ptr, ptr %6, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct._cpPRNG, ptr %132, i32 0, i32 5
  %134 = getelementptr inbounds [8 x i64], ptr %133, i64 0, i64 0
  %135 = load ptr, ptr %6, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct._cpPRNG, ptr %135, i32 0, i32 5
  %137 = getelementptr inbounds [8 x i64], ptr %136, i64 0, i64 0
  %138 = getelementptr inbounds [8 x i64], ptr %7, i64 0, i64 0
  %139 = load i32, ptr %10, align 4, !tbaa !9
  %140 = call i64 @cpAdd_BNU(ptr noundef %134, ptr noundef %137, ptr noundef %138, i32 noundef %139)
  store i64 %140, ptr %17, align 8, !tbaa !13
  %141 = load i64, ptr %12, align 8, !tbaa !13
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct._cpPRNG, ptr %142, i32 0, i32 5
  %144 = load i32, ptr %10, align 4, !tbaa !9
  %145 = sub nsw i32 %144, 1
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds [8 x i64], ptr %143, i64 0, i64 %146
  %148 = load i64, ptr %147, align 8, !tbaa !13
  %149 = and i64 %148, %141
  store i64 %149, ptr %147, align 8, !tbaa !13
  %150 = load i32, ptr %13, align 4, !tbaa !9
  %151 = icmp slt i32 %150, 5
  br i1 %151, label %152, label %154

152:                                              ; preds = %123
  %153 = load i32, ptr %13, align 4, !tbaa !9
  br label %155

154:                                              ; preds = %123
  br label %155

155:                                              ; preds = %154, %152
  %156 = phi i32 [ %153, %152 ], [ 5, %154 ]
  store i32 %156, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  store i32 0, ptr %20, align 4, !tbaa !9
  br label %157

157:                                              ; preds = %171, %155
  %158 = load i32, ptr %20, align 4, !tbaa !9
  %159 = load i32, ptr %16, align 4, !tbaa !9
  %160 = icmp slt i32 %158, %159
  br i1 %160, label %161, label %174

161:                                              ; preds = %157
  %162 = getelementptr inbounds [8 x i64], ptr %7, i64 0, i64 0
  %163 = load i32, ptr %20, align 4, !tbaa !9
  %164 = sext i32 %163 to i64
  %165 = getelementptr inbounds i32, ptr %162, i64 %164
  %166 = load i32, ptr %165, align 4, !tbaa !9
  %167 = load ptr, ptr %4, align 8, !tbaa !5
  %168 = load i32, ptr %20, align 4, !tbaa !9
  %169 = sext i32 %168 to i64
  %170 = getelementptr inbounds i32, ptr %167, i64 %169
  store i32 %166, ptr %170, align 4, !tbaa !9
  br label %171

171:                                              ; preds = %161
  %172 = load i32, ptr %20, align 4, !tbaa !9
  %173 = add nsw i32 %172, 1
  store i32 %173, ptr %20, align 4, !tbaa !9
  br label %157, !llvm.loop !19

174:                                              ; preds = %157
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  %175 = load i32, ptr %16, align 4, !tbaa !9
  %176 = load ptr, ptr %4, align 8, !tbaa !5
  %177 = sext i32 %175 to i64
  %178 = getelementptr inbounds i32, ptr %176, i64 %177
  store ptr %178, ptr %4, align 8, !tbaa !5
  %179 = load i32, ptr %16, align 4, !tbaa !9
  %180 = load i32, ptr %13, align 4, !tbaa !9
  %181 = sub nsw i32 %180, %179
  store i32 %181, ptr %13, align 4, !tbaa !9
  %182 = load i64, ptr %17, align 8, !tbaa !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  br label %65, !llvm.loop !20

183:                                              ; preds = %65
  %184 = load i32, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %7) #4
  ret i32 %184
}

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

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

declare i64 @cpAdd_BNU(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #2

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

; Function Attrs: nounwind uwtable
declare hidden void @SHA1_G(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @cpCmp_BNU(ptr noundef, i32 noundef, ptr noundef, i32 noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @cpMod_BNU(ptr noundef, i32 noundef, ptr noundef, i32 noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @cpFix_BNU(ptr noundef, i32 noundef) #3

declare i64 @cpInc_BNU(ptr noundef, ptr noundef, i32 noundef, i64 noundef) #2

attributes #0 = { 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 #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 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 4}
!12 = !{!"_cpPRNG", !10, i64 0, !10, i64 4, !7, i64 8, !7, i64 32, !7, i64 56, !7, i64 120}
!13 = !{!14, !14, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16}


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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @cpPRNGen(ptr nocapture noundef writeonly %0, i32 noundef returned %1, ptr noundef %2) local_unnamed_addr #0 {
.preheader56.preheader:
  %3 = alloca [8 x i64], align 16
  %4 = alloca [8 x i64], align 16
  %5 = alloca [64 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #7
  %6 = getelementptr inbounds i8, ptr %2, i64 4
  %7 = load i32, ptr %6, align 4, !tbaa !5
  %8 = add nsw i32 %7, 63
  %9 = add nsw i32 %7, 7
  %10 = sub i32 0, %7
  %11 = and i32 %10, 63
  %12 = zext nneg i32 %11 to i64
  %13 = add nsw i32 %1, 31
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %3, i8 0, i64 64, i1 false), !tbaa !10
  %14 = sdiv i32 %8, 64
  %15 = lshr i64 -1, %12
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(64) %4, i8 0, i64 64, i1 false), !tbaa !10
  %16 = ashr i32 %9, 3
  %.not64 = icmp ult i32 %13, 32
  br i1 %.not64, label %._crit_edge68, label %.lr.ph67

.lr.ph67:                                         ; preds = %.preheader56.preheader
  %17 = ashr i32 %13, 5
  %18 = getelementptr inbounds i8, ptr %2, i64 120
  %19 = getelementptr inbounds i8, ptr %2, i64 56
  %20 = add nsw i32 %14, -1
  %21 = sext i32 %20 to i64
  %22 = getelementptr inbounds [8 x i64], ptr %4, i64 0, i64 %21
  %23 = getelementptr inbounds i8, ptr %2, i64 32
  %24 = getelementptr inbounds i8, ptr %2, i64 8
  %25 = getelementptr inbounds [8 x i64], ptr %18, i64 0, i64 %21
  br label %26

26:                                               ; preds = %.lr.ph67, %._crit_edge63
  %.05166 = phi ptr [ %0, %.lr.ph67 ], [ %55, %._crit_edge63 ]
  %.05465 = phi i32 [ %17, %.lr.ph67 ], [ %56, %._crit_edge63 ]
  %27 = call i64 @cpAdd_BNU(ptr noundef nonnull %4, ptr noundef nonnull %18, ptr noundef nonnull %19, i32 noundef %14) #7
  %28 = load i64, ptr %22, align 8, !tbaa !10
  %29 = and i64 %28, %15
  store i64 %29, ptr %22, align 8, !tbaa !10
  %30 = call i32 @cpToOctStr_BNU(ptr noundef nonnull %5, i32 noundef %16, ptr noundef nonnull %4, i32 noundef %14) #7
  call void @SHA1_G(ptr noundef nonnull %3, ptr noundef nonnull %23, ptr noundef nonnull %5, i32 noundef %16)
  %31 = call i32 @cpCmp_BNU(ptr noundef nonnull %3, i32 noundef 3, ptr noundef nonnull %24, i32 noundef 3)
  %32 = icmp sgt i32 %31, -1
  br i1 %32, label %33, label %35

33:                                               ; preds = %26
  %34 = call i32 @cpMod_BNU(ptr noundef nonnull %3, i32 noundef 3, ptr noundef nonnull %24, i32 noundef 3)
  br label %35

35:                                               ; preds = %33, %26
  %.050 = phi i32 [ %34, %33 ], [ 3, %26 ]
  %36 = call i32 @cpFix_BNU(ptr noundef nonnull %3, i32 noundef %.050)
  %37 = icmp slt i32 %36, 8
  br i1 %37, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %35
  %38 = sext i32 %36 to i64
  %39 = shl nsw i64 %38, 3
  %scevgep = getelementptr i8, ptr %3, i64 %39
  %40 = sub i32 7, %36
  %41 = zext i32 %40 to i64
  %42 = shl nuw nsw i64 %41, 3
  %43 = add nuw nsw i64 %42, 8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %scevgep, i8 0, i64 %43, i1 false), !tbaa !10
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph.preheader, %35
  %44 = call i64 @cpInc_BNU(ptr noundef nonnull %18, ptr noundef nonnull %18, i32 noundef %14, i64 noundef 1) #7
  %45 = call i64 @cpAdd_BNU(ptr noundef nonnull %18, ptr noundef nonnull %18, ptr noundef nonnull %3, i32 noundef %14) #7
  %46 = load i64, ptr %25, align 8, !tbaa !10
  %47 = and i64 %46, %15
  store i64 %47, ptr %25, align 8, !tbaa !10
  %48 = call i32 @llvm.smin.i32(i32 %.05465, i32 5)
  %49 = icmp sgt i32 %.05465, 0
  br i1 %49, label %.lr.ph62.preheader, label %._crit_edge63

.lr.ph62.preheader:                               ; preds = %._crit_edge
  %50 = add nsw i32 %48, -1
  %51 = zext i32 %50 to i64
  %52 = shl nuw nsw i64 %51, 2
  %53 = add nuw nsw i64 %52, 4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %.05166, ptr noundef nonnull align 16 dereferenceable(1) %3, i64 %53, i1 false), !tbaa !12
  br label %._crit_edge63

._crit_edge63:                                    ; preds = %.lr.ph62.preheader, %._crit_edge
  %54 = sext i32 %48 to i64
  %55 = getelementptr inbounds i32, ptr %.05166, i64 %54
  %56 = sub nsw i32 %.05465, %48
  %.not = icmp eq i32 %56, 0
  br i1 %.not, label %._crit_edge68, label %26, !llvm.loop !13

._crit_edge68:                                    ; preds = %._crit_edge63, %.preheader56.preheader
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %3) #7
  ret i32 %1
}

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

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

declare i64 @cpAdd_BNU(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
declare hidden void @SHA1_G(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @cpCmp_BNU(ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @cpMod_BNU(ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @cpFix_BNU(ptr noundef, i32 noundef) local_unnamed_addr #3

declare i64 @cpInc_BNU(ptr noundef, ptr noundef, i32 noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #4

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6

attributes #0 = { 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 #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 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #7 = { 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 4}
!6 = !{!"_cpPRNG", !7, i64 0, !7, i64 4, !8, i64 8, !8, i64 32, !8, i64 56, !8, i64 120}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"long long", !8, i64 0}
!12 = !{!7, !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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