; LLVM IR from albertobsd/keyhunt :: sha3 (sha3)

; 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.SHA3_224_CTX = type { %struct.sha3 }
%struct.sha3 = type { [25 x i64], i32 }
%struct.SHA3_256_CTX = type { %struct.sha3 }
%struct.SHA3_384_CTX = type { %struct.sha3 }
%struct.SHA3_512_CTX = type { %struct.sha3 }
%struct.SHAKE128_CTX = type { %struct.sha3 }
%struct.SHAKE256_CTX = type { %struct.sha3 }

@__const.SHA3_Selftest.d224_0 = external hidden unnamed_addr constant [28 x i8], align 16
@__const.SHA3_Selftest.d256_0 = external hidden unnamed_addr constant [32 x i8], align 16
@__const.SHA3_Selftest.d384_0 = external hidden unnamed_addr constant [48 x i8], align 16
@__const.SHA3_Selftest.d512_0 = external hidden unnamed_addr constant [64 x i8], align 16
@__const.SHA3_Selftest.shake128_0_41 = external hidden unnamed_addr constant [41 x i8], align 16
@__const.SHA3_Selftest.shake256_0_73 = external hidden unnamed_addr constant [73 x i8], align 16
@__const.SHA3_Selftest.d224_1600 = external hidden unnamed_addr constant [28 x i8], align 16
@__const.SHA3_Selftest.d256_1600 = external hidden unnamed_addr constant [32 x i8], align 16
@__const.SHA3_Selftest.d384_1600 = external hidden unnamed_addr constant [48 x i8], align 16
@__const.SHA3_Selftest.d512_1600 = external hidden unnamed_addr constant [64 x i8], align 16
@__const.SHA3_Selftest.shake128_1600_41 = external hidden unnamed_addr constant [41 x i8], align 16
@__const.SHA3_Selftest.shake256_1600_73 = external hidden unnamed_addr constant [73 x i8], align 16
@__const.SHA3_Selftest.d0 = external hidden unnamed_addr constant [64 x i8], align 16
@__const.SHA3_Selftest.mlen = external hidden unnamed_addr constant [6 x i32], align 16

; Function Attrs: nounwind uwtable
declare dso_local void @SHA3_224_Init(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHA3_224_Update(ptr noundef, ptr noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHA3_224_Final(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHA3_256_Init(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHA3_256_Update(ptr noundef, ptr noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHA3_256_Final(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHA3_384_Init(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHA3_384_Update(ptr noundef, ptr noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHA3_384_Final(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHA3_512_Init(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHA3_512_Update(ptr noundef, ptr noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHA3_512_Final(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHAKE128_Init(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHAKE128_Update(ptr noundef, ptr noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHAKE128_Final(ptr noundef, i64 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHAKE256_Init(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHAKE256_Update(ptr noundef, ptr noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHAKE256_Final(ptr noundef, i64 noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
define dso_local i32 @SHA3_Selftest() #0 {
  %1 = alloca i32, align 4
  %2 = alloca [28 x i8], align 16
  %3 = alloca [32 x i8], align 16
  %4 = alloca [48 x i8], align 16
  %5 = alloca [64 x i8], align 16
  %6 = alloca [41 x i8], align 16
  %7 = alloca [73 x i8], align 16
  %8 = alloca [28 x i8], align 16
  %9 = alloca [32 x i8], align 16
  %10 = alloca [48 x i8], align 16
  %11 = alloca [64 x i8], align 16
  %12 = alloca [41 x i8], align 16
  %13 = alloca [73 x i8], align 16
  %14 = alloca [64 x i8], align 16
  %15 = alloca [6 x i32], align 16
  %16 = alloca [1024 x i8], align 16
  %17 = alloca [73 x i8], align 16
  %18 = alloca %struct.SHA3_224_CTX, align 8
  %19 = alloca %struct.SHA3_256_CTX, align 8
  %20 = alloca %struct.SHA3_384_CTX, align 8
  %21 = alloca %struct.SHA3_512_CTX, align 8
  %22 = alloca %struct.SHAKE128_CTX, align 8
  %23 = alloca %struct.SHAKE256_CTX, align 8
  %24 = alloca %struct.SHA3_512_CTX, align 8
  %25 = alloca i32, align 4
  %26 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 28, ptr %2) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %2, ptr align 16 @__const.SHA3_Selftest.d224_0, i64 28, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr %3) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %3, ptr align 16 @__const.SHA3_Selftest.d256_0, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 48, ptr %4) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %4, ptr align 16 @__const.SHA3_Selftest.d384_0, i64 48, i1 false)
  call void @llvm.lifetime.start.p0(i64 64, ptr %5) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %5, ptr align 16 @__const.SHA3_Selftest.d512_0, i64 64, i1 false)
  call void @llvm.lifetime.start.p0(i64 41, ptr %6) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %6, ptr align 16 @__const.SHA3_Selftest.shake128_0_41, i64 41, i1 false)
  call void @llvm.lifetime.start.p0(i64 73, ptr %7) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %7, ptr align 16 @__const.SHA3_Selftest.shake256_0_73, i64 73, i1 false)
  call void @llvm.lifetime.start.p0(i64 28, ptr %8) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %8, ptr align 16 @__const.SHA3_Selftest.d224_1600, i64 28, i1 false)
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %9, ptr align 16 @__const.SHA3_Selftest.d256_1600, i64 32, i1 false)
  call void @llvm.lifetime.start.p0(i64 48, ptr %10) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %10, ptr align 16 @__const.SHA3_Selftest.d384_1600, i64 48, i1 false)
  call void @llvm.lifetime.start.p0(i64 64, ptr %11) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %11, ptr align 16 @__const.SHA3_Selftest.d512_1600, i64 64, i1 false)
  call void @llvm.lifetime.start.p0(i64 41, ptr %12) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %12, ptr align 16 @__const.SHA3_Selftest.shake128_1600_41, i64 41, i1 false)
  call void @llvm.lifetime.start.p0(i64 73, ptr %13) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %13, ptr align 16 @__const.SHA3_Selftest.shake256_1600_73, i64 73, i1 false)
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %14, ptr align 16 @__const.SHA3_Selftest.d0, i64 64, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %15, ptr align 16 @__const.SHA3_Selftest.mlen, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 1024, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 73, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 208, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 208, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 208, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 208, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 208, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 208, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 208, ptr %24) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #5
  call void @SHA3_224_Init(ptr noundef %18)
  %27 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  call void @SHA3_224_Final(ptr noundef %27, ptr noundef %18)
  %28 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  %29 = getelementptr inbounds [28 x i8], ptr %2, i64 0, i64 0
  %30 = call i32 @memcmp(ptr noundef %28, ptr noundef %29, i64 noundef 28) #6
  %31 = icmp ne i32 %30, 0
  br i1 %31, label %32, label %33

32:                                               ; preds = %0
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %26, align 4
  br label %233

33:                                               ; preds = %0
  call void @SHA3_256_Init(ptr noundef %19)
  %34 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  call void @SHA3_256_Final(ptr noundef %34, ptr noundef %19)
  %35 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  %36 = getelementptr inbounds [32 x i8], ptr %3, i64 0, i64 0
  %37 = call i32 @memcmp(ptr noundef %35, ptr noundef %36, i64 noundef 32) #6
  %38 = icmp ne i32 %37, 0
  br i1 %38, label %39, label %40

39:                                               ; preds = %33
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %26, align 4
  br label %233

40:                                               ; preds = %33
  call void @SHA3_384_Init(ptr noundef %20)
  %41 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  call void @SHA3_384_Final(ptr noundef %41, ptr noundef %20)
  %42 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  %43 = getelementptr inbounds [48 x i8], ptr %4, i64 0, i64 0
  %44 = call i32 @memcmp(ptr noundef %42, ptr noundef %43, i64 noundef 48) #6
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %46, label %47

46:                                               ; preds = %40
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %26, align 4
  br label %233

47:                                               ; preds = %40
  call void @SHA3_512_Init(ptr noundef %21)
  %48 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  call void @SHA3_512_Final(ptr noundef %48, ptr noundef %21)
  %49 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  %50 = getelementptr inbounds [64 x i8], ptr %5, i64 0, i64 0
  %51 = call i32 @memcmp(ptr noundef %49, ptr noundef %50, i64 noundef 64) #6
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %54

53:                                               ; preds = %47
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %26, align 4
  br label %233

54:                                               ; preds = %47
  call void @SHAKE128_Init(ptr noundef %22)
  %55 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  call void @SHAKE128_Final(ptr noundef %55, i64 noundef 41, ptr noundef %22)
  %56 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  %57 = getelementptr inbounds [41 x i8], ptr %6, i64 0, i64 0
  %58 = call i32 @memcmp(ptr noundef %56, ptr noundef %57, i64 noundef 41) #6
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %60, label %61

60:                                               ; preds = %54
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %26, align 4
  br label %233

61:                                               ; preds = %54
  call void @SHAKE256_Init(ptr noundef %23)
  %62 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  call void @SHAKE256_Final(ptr noundef %62, i64 noundef 73, ptr noundef %23)
  %63 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  %64 = getelementptr inbounds [73 x i8], ptr %7, i64 0, i64 0
  %65 = call i32 @memcmp(ptr noundef %63, ptr noundef %64, i64 noundef 73) #6
  %66 = icmp ne i32 %65, 0
  br i1 %66, label %67, label %68

67:                                               ; preds = %61
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %26, align 4
  br label %233

68:                                               ; preds = %61
  %69 = getelementptr inbounds [1024 x i8], ptr %16, i64 0, i64 0
  call void @llvm.memset.p0.i64(ptr align 16 %69, i8 -93, i64 200, i1 false)
  call void @SHA3_224_Init(ptr noundef %18)
  %70 = getelementptr inbounds [1024 x i8], ptr %16, i64 0, i64 0
  call void @SHA3_224_Update(ptr noundef %18, ptr noundef %70, i64 noundef 200)
  %71 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  call void @SHA3_224_Final(ptr noundef %71, ptr noundef %18)
  %72 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  %73 = getelementptr inbounds [28 x i8], ptr %8, i64 0, i64 0
  %74 = call i32 @memcmp(ptr noundef %72, ptr noundef %73, i64 noundef 28) #6
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %76, label %77

76:                                               ; preds = %68
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %26, align 4
  br label %233

77:                                               ; preds = %68
  call void @SHA3_256_Init(ptr noundef %19)
  %78 = getelementptr inbounds [1024 x i8], ptr %16, i64 0, i64 0
  call void @SHA3_256_Update(ptr noundef %19, ptr noundef %78, i64 noundef 200)
  %79 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  call void @SHA3_256_Final(ptr noundef %79, ptr noundef %19)
  %80 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  %81 = getelementptr inbounds [32 x i8], ptr %9, i64 0, i64 0
  %82 = call i32 @memcmp(ptr noundef %80, ptr noundef %81, i64 noundef 32) #6
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %85

84:                                               ; preds = %77
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %26, align 4
  br label %233

85:                                               ; preds = %77
  call void @SHA3_384_Init(ptr noundef %20)
  %86 = getelementptr inbounds [1024 x i8], ptr %16, i64 0, i64 0
  call void @SHA3_384_Update(ptr noundef %20, ptr noundef %86, i64 noundef 200)
  %87 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  call void @SHA3_384_Final(ptr noundef %87, ptr noundef %20)
  %88 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  %89 = getelementptr inbounds [48 x i8], ptr %10, i64 0, i64 0
  %90 = call i32 @memcmp(ptr noundef %88, ptr noundef %89, i64 noundef 48) #6
  %91 = icmp ne i32 %90, 0
  br i1 %91, label %92, label %93

92:                                               ; preds = %85
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %26, align 4
  br label %233

93:                                               ; preds = %85
  call void @SHA3_512_Init(ptr noundef %21)
  %94 = getelementptr inbounds [1024 x i8], ptr %16, i64 0, i64 0
  call void @SHA3_512_Update(ptr noundef %21, ptr noundef %94, i64 noundef 200)
  %95 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  call void @SHA3_512_Final(ptr noundef %95, ptr noundef %21)
  %96 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  %97 = getelementptr inbounds [64 x i8], ptr %11, i64 0, i64 0
  %98 = call i32 @memcmp(ptr noundef %96, ptr noundef %97, i64 noundef 64) #6
  %99 = icmp ne i32 %98, 0
  br i1 %99, label %100, label %101

100:                                              ; preds = %93
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %26, align 4
  br label %233

101:                                              ; preds = %93
  call void @SHAKE128_Init(ptr noundef %22)
  %102 = getelementptr inbounds [1024 x i8], ptr %16, i64 0, i64 0
  call void @SHAKE128_Update(ptr noundef %22, ptr noundef %102, i64 noundef 200)
  %103 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  call void @SHAKE128_Final(ptr noundef %103, i64 noundef 41, ptr noundef %22)
  %104 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  %105 = getelementptr inbounds [41 x i8], ptr %12, i64 0, i64 0
  %106 = call i32 @memcmp(ptr noundef %104, ptr noundef %105, i64 noundef 41) #6
  %107 = icmp ne i32 %106, 0
  br i1 %107, label %108, label %109

108:                                              ; preds = %101
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %26, align 4
  br label %233

109:                                              ; preds = %101
  call void @SHAKE256_Init(ptr noundef %23)
  %110 = getelementptr inbounds [1024 x i8], ptr %16, i64 0, i64 0
  call void @SHAKE256_Update(ptr noundef %23, ptr noundef %110, i64 noundef 200)
  %111 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  call void @SHAKE256_Final(ptr noundef %111, i64 noundef 73, ptr noundef %23)
  %112 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  %113 = getelementptr inbounds [73 x i8], ptr %13, i64 0, i64 0
  %114 = call i32 @memcmp(ptr noundef %112, ptr noundef %113, i64 noundef 73) #6
  %115 = icmp ne i32 %114, 0
  br i1 %115, label %116, label %117

116:                                              ; preds = %109
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %26, align 4
  br label %233

117:                                              ; preds = %109
  call void @SHA3_512_Init(ptr noundef %24)
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %118

118:                                              ; preds = %141, %117
  %119 = load i32, ptr %25, align 4, !tbaa !5
  %120 = icmp ult i32 %119, 6
  br i1 %120, label %121, label %144

121:                                              ; preds = %118
  %122 = getelementptr inbounds [1024 x i8], ptr %16, i64 0, i64 0
  %123 = load i32, ptr %25, align 4, !tbaa !5
  %124 = zext i32 %123 to i64
  %125 = getelementptr inbounds [6 x i32], ptr %15, i64 0, i64 %124
  %126 = load i32, ptr %125, align 4, !tbaa !5
  %127 = zext i32 %126 to i64
  %128 = load i32, ptr %25, align 4, !tbaa !5
  %129 = zext i32 %128 to i64
  %130 = getelementptr inbounds [6 x i32], ptr %15, i64 0, i64 %129
  %131 = load i32, ptr %130, align 4, !tbaa !5
  %132 = mul i32 28, %131
  call void @sha3_selftest_prng(ptr noundef %122, i64 noundef %127, i32 noundef %132)
  call void @SHA3_224_Init(ptr noundef %18)
  %133 = getelementptr inbounds [1024 x i8], ptr %16, i64 0, i64 0
  %134 = load i32, ptr %25, align 4, !tbaa !5
  %135 = zext i32 %134 to i64
  %136 = getelementptr inbounds [6 x i32], ptr %15, i64 0, i64 %135
  %137 = load i32, ptr %136, align 4, !tbaa !5
  %138 = zext i32 %137 to i64
  call void @SHA3_224_Update(ptr noundef %18, ptr noundef %133, i64 noundef %138)
  %139 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  call void @SHA3_224_Final(ptr noundef %139, ptr noundef %18)
  %140 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  call void @SHA3_512_Update(ptr noundef %24, ptr noundef %140, i64 noundef 28)
  br label %141

141:                                              ; preds = %121
  %142 = load i32, ptr %25, align 4, !tbaa !5
  %143 = add i32 %142, 1
  store i32 %143, ptr %25, align 4, !tbaa !5
  br label %118, !llvm.loop !9

144:                                              ; preds = %118
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %145

145:                                              ; preds = %168, %144
  %146 = load i32, ptr %25, align 4, !tbaa !5
  %147 = icmp ult i32 %146, 6
  br i1 %147, label %148, label %171

148:                                              ; preds = %145
  %149 = getelementptr inbounds [1024 x i8], ptr %16, i64 0, i64 0
  %150 = load i32, ptr %25, align 4, !tbaa !5
  %151 = zext i32 %150 to i64
  %152 = getelementptr inbounds [6 x i32], ptr %15, i64 0, i64 %151
  %153 = load i32, ptr %152, align 4, !tbaa !5
  %154 = zext i32 %153 to i64
  %155 = load i32, ptr %25, align 4, !tbaa !5
  %156 = zext i32 %155 to i64
  %157 = getelementptr inbounds [6 x i32], ptr %15, i64 0, i64 %156
  %158 = load i32, ptr %157, align 4, !tbaa !5
  %159 = mul i32 32, %158
  call void @sha3_selftest_prng(ptr noundef %149, i64 noundef %154, i32 noundef %159)
  call void @SHA3_256_Init(ptr noundef %19)
  %160 = getelementptr inbounds [1024 x i8], ptr %16, i64 0, i64 0
  %161 = load i32, ptr %25, align 4, !tbaa !5
  %162 = zext i32 %161 to i64
  %163 = getelementptr inbounds [6 x i32], ptr %15, i64 0, i64 %162
  %164 = load i32, ptr %163, align 4, !tbaa !5
  %165 = zext i32 %164 to i64
  call void @SHA3_256_Update(ptr noundef %19, ptr noundef %160, i64 noundef %165)
  %166 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  call void @SHA3_256_Final(ptr noundef %166, ptr noundef %19)
  %167 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  call void @SHA3_512_Update(ptr noundef %24, ptr noundef %167, i64 noundef 32)
  br label %168

168:                                              ; preds = %148
  %169 = load i32, ptr %25, align 4, !tbaa !5
  %170 = add i32 %169, 1
  store i32 %170, ptr %25, align 4, !tbaa !5
  br label %145, !llvm.loop !11

171:                                              ; preds = %145
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %172

172:                                              ; preds = %195, %171
  %173 = load i32, ptr %25, align 4, !tbaa !5
  %174 = icmp ult i32 %173, 6
  br i1 %174, label %175, label %198

175:                                              ; preds = %172
  %176 = getelementptr inbounds [1024 x i8], ptr %16, i64 0, i64 0
  %177 = load i32, ptr %25, align 4, !tbaa !5
  %178 = zext i32 %177 to i64
  %179 = getelementptr inbounds [6 x i32], ptr %15, i64 0, i64 %178
  %180 = load i32, ptr %179, align 4, !tbaa !5
  %181 = zext i32 %180 to i64
  %182 = load i32, ptr %25, align 4, !tbaa !5
  %183 = zext i32 %182 to i64
  %184 = getelementptr inbounds [6 x i32], ptr %15, i64 0, i64 %183
  %185 = load i32, ptr %184, align 4, !tbaa !5
  %186 = mul i32 48, %185
  call void @sha3_selftest_prng(ptr noundef %176, i64 noundef %181, i32 noundef %186)
  call void @SHA3_384_Init(ptr noundef %20)
  %187 = getelementptr inbounds [1024 x i8], ptr %16, i64 0, i64 0
  %188 = load i32, ptr %25, align 4, !tbaa !5
  %189 = zext i32 %188 to i64
  %190 = getelementptr inbounds [6 x i32], ptr %15, i64 0, i64 %189
  %191 = load i32, ptr %190, align 4, !tbaa !5
  %192 = zext i32 %191 to i64
  call void @SHA3_384_Update(ptr noundef %20, ptr noundef %187, i64 noundef %192)
  %193 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  call void @SHA3_384_Final(ptr noundef %193, ptr noundef %20)
  %194 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  call void @SHA3_512_Update(ptr noundef %24, ptr noundef %194, i64 noundef 48)
  br label %195

195:                                              ; preds = %175
  %196 = load i32, ptr %25, align 4, !tbaa !5
  %197 = add i32 %196, 1
  store i32 %197, ptr %25, align 4, !tbaa !5
  br label %172, !llvm.loop !12

198:                                              ; preds = %172
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %199

199:                                              ; preds = %222, %198
  %200 = load i32, ptr %25, align 4, !tbaa !5
  %201 = icmp ult i32 %200, 6
  br i1 %201, label %202, label %225

202:                                              ; preds = %199
  %203 = getelementptr inbounds [1024 x i8], ptr %16, i64 0, i64 0
  %204 = load i32, ptr %25, align 4, !tbaa !5
  %205 = zext i32 %204 to i64
  %206 = getelementptr inbounds [6 x i32], ptr %15, i64 0, i64 %205
  %207 = load i32, ptr %206, align 4, !tbaa !5
  %208 = zext i32 %207 to i64
  %209 = load i32, ptr %25, align 4, !tbaa !5
  %210 = zext i32 %209 to i64
  %211 = getelementptr inbounds [6 x i32], ptr %15, i64 0, i64 %210
  %212 = load i32, ptr %211, align 4, !tbaa !5
  %213 = mul i32 64, %212
  call void @sha3_selftest_prng(ptr noundef %203, i64 noundef %208, i32 noundef %213)
  call void @SHA3_512_Init(ptr noundef %21)
  %214 = getelementptr inbounds [1024 x i8], ptr %16, i64 0, i64 0
  %215 = load i32, ptr %25, align 4, !tbaa !5
  %216 = zext i32 %215 to i64
  %217 = getelementptr inbounds [6 x i32], ptr %15, i64 0, i64 %216
  %218 = load i32, ptr %217, align 4, !tbaa !5
  %219 = zext i32 %218 to i64
  call void @SHA3_512_Update(ptr noundef %21, ptr noundef %214, i64 noundef %219)
  %220 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  call void @SHA3_512_Final(ptr noundef %220, ptr noundef %21)
  %221 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  call void @SHA3_512_Update(ptr noundef %24, ptr noundef %221, i64 noundef 64)
  br label %222

222:                                              ; preds = %202
  %223 = load i32, ptr %25, align 4, !tbaa !5
  %224 = add i32 %223, 1
  store i32 %224, ptr %25, align 4, !tbaa !5
  br label %199, !llvm.loop !13

225:                                              ; preds = %199
  %226 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  call void @SHA3_512_Final(ptr noundef %226, ptr noundef %24)
  %227 = getelementptr inbounds [73 x i8], ptr %17, i64 0, i64 0
  %228 = getelementptr inbounds [64 x i8], ptr %14, i64 0, i64 0
  %229 = call i32 @memcmp(ptr noundef %227, ptr noundef %228, i64 noundef 64) #6
  %230 = icmp ne i32 %229, 0
  br i1 %230, label %231, label %232

231:                                              ; preds = %225
  store i32 -1, ptr %1, align 4
  store i32 1, ptr %26, align 4
  br label %233

232:                                              ; preds = %225
  store i32 0, ptr %1, align 4
  store i32 1, ptr %26, align 4
  br label %233

233:                                              ; preds = %232, %231, %116, %108, %100, %92, %84, %76, %67, %60, %53, %46, %39, %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 208, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 208, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 208, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 208, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 208, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 208, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 208, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 73, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 1024, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 73, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 41, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 28, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 73, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 41, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 64, ptr %5) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %3) #5
  call void @llvm.lifetime.end.p0(i64 28, ptr %2) #5
  %234 = load i32, ptr %1, align 4
  ret i32 %234
}

; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}


; 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.SHA3_224_CTX = type { %struct.sha3 }
%struct.sha3 = type { [25 x i64], i32 }
%struct.SHA3_256_CTX = type { %struct.sha3 }
%struct.SHA3_384_CTX = type { %struct.sha3 }
%struct.SHA3_512_CTX = type { %struct.sha3 }
%struct.SHAKE128_CTX = type { %struct.sha3 }
%struct.SHAKE256_CTX = type { %struct.sha3 }

@__const.SHA3_Selftest.d224_0 = external hidden unnamed_addr constant [28 x i8], align 16
@__const.SHA3_Selftest.d256_0 = external hidden unnamed_addr constant [32 x i8], align 16
@__const.SHA3_Selftest.d384_0 = external hidden unnamed_addr constant [48 x i8], align 16
@__const.SHA3_Selftest.d512_0 = external hidden unnamed_addr constant [64 x i8], align 16
@__const.SHA3_Selftest.shake128_0_41 = external hidden unnamed_addr constant [41 x i8], align 16
@__const.SHA3_Selftest.shake256_0_73 = external hidden unnamed_addr constant [73 x i8], align 16
@__const.SHA3_Selftest.d224_1600 = external hidden unnamed_addr constant [28 x i8], align 16
@__const.SHA3_Selftest.d256_1600 = external hidden unnamed_addr constant [32 x i8], align 16
@__const.SHA3_Selftest.d384_1600 = external hidden unnamed_addr constant [48 x i8], align 16
@__const.SHA3_Selftest.d512_1600 = external hidden unnamed_addr constant [64 x i8], align 16
@__const.SHA3_Selftest.shake128_1600_41 = external hidden unnamed_addr constant [41 x i8], align 16
@__const.SHA3_Selftest.shake256_1600_73 = external hidden unnamed_addr constant [73 x i8], align 16
@__const.SHA3_Selftest.d0 = external hidden unnamed_addr constant [64 x i8], align 16
@__const.SHA3_Selftest.mlen = external hidden unnamed_addr constant [6 x i32], align 16

; Function Attrs: nounwind uwtable
declare dso_local void @SHA3_224_Init(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHA3_224_Update(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHA3_224_Final(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHA3_256_Init(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHA3_256_Update(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHA3_256_Final(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHA3_384_Init(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHA3_384_Update(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHA3_384_Final(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHA3_512_Init(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHA3_512_Update(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHA3_512_Final(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHAKE128_Init(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHAKE128_Update(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHAKE128_Final(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHAKE256_Init(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHAKE256_Update(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @SHAKE256_Final(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @SHA3_Selftest() local_unnamed_addr #0 {
  %1 = alloca [1024 x i8], align 16
  %2 = alloca [73 x i8], align 16
  %3 = alloca %struct.SHA3_224_CTX, align 8
  %4 = alloca %struct.SHA3_256_CTX, align 8
  %5 = alloca %struct.SHA3_384_CTX, align 8
  %6 = alloca %struct.SHA3_512_CTX, align 8
  %7 = alloca %struct.SHAKE128_CTX, align 8
  %8 = alloca %struct.SHAKE256_CTX, align 8
  %9 = alloca %struct.SHA3_512_CTX, align 8
  call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %1) #4
  call void @llvm.lifetime.start.p0(i64 73, ptr nonnull %2) #4
  call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %9) #4
  call void @SHA3_224_Init(ptr noundef nonnull %3)
  call void @SHA3_224_Final(ptr noundef nonnull %2, ptr noundef nonnull %3)
  %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(28) %2, ptr noundef nonnull dereferenceable(28) @__const.SHA3_Selftest.d224_0, i64 28)
  %.not = icmp eq i32 %bcmp, 0
  br i1 %.not, label %10, label %69

10:                                               ; preds = %0
  call void @SHA3_256_Init(ptr noundef nonnull %4)
  call void @SHA3_256_Final(ptr noundef nonnull %2, ptr noundef nonnull %4)
  %bcmp22 = call i32 @bcmp(ptr noundef nonnull dereferenceable(32) %2, ptr noundef nonnull dereferenceable(32) @__const.SHA3_Selftest.d256_0, i64 32)
  %.not23 = icmp eq i32 %bcmp22, 0
  br i1 %.not23, label %11, label %69

11:                                               ; preds = %10
  call void @SHA3_384_Init(ptr noundef nonnull %5)
  call void @SHA3_384_Final(ptr noundef nonnull %2, ptr noundef nonnull %5)
  %bcmp24 = call i32 @bcmp(ptr noundef nonnull dereferenceable(48) %2, ptr noundef nonnull dereferenceable(48) @__const.SHA3_Selftest.d384_0, i64 48)
  %.not25 = icmp eq i32 %bcmp24, 0
  br i1 %.not25, label %12, label %69

12:                                               ; preds = %11
  call void @SHA3_512_Init(ptr noundef nonnull %6)
  call void @SHA3_512_Final(ptr noundef nonnull %2, ptr noundef nonnull %6)
  %bcmp26 = call i32 @bcmp(ptr noundef nonnull dereferenceable(64) %2, ptr noundef nonnull dereferenceable(64) @__const.SHA3_Selftest.d512_0, i64 64)
  %.not27 = icmp eq i32 %bcmp26, 0
  br i1 %.not27, label %13, label %69

13:                                               ; preds = %12
  call void @SHAKE128_Init(ptr noundef nonnull %7)
  call void @SHAKE128_Final(ptr noundef nonnull %2, i64 noundef 41, ptr noundef nonnull %7)
  %bcmp28 = call i32 @bcmp(ptr noundef nonnull dereferenceable(41) %2, ptr noundef nonnull dereferenceable(41) @__const.SHA3_Selftest.shake128_0_41, i64 41)
  %.not29 = icmp eq i32 %bcmp28, 0
  br i1 %.not29, label %14, label %69

14:                                               ; preds = %13
  call void @SHAKE256_Init(ptr noundef nonnull %8)
  call void @SHAKE256_Final(ptr noundef nonnull %2, i64 noundef 73, ptr noundef nonnull %8)
  %bcmp30 = call i32 @bcmp(ptr noundef nonnull dereferenceable(73) %2, ptr noundef nonnull dereferenceable(73) @__const.SHA3_Selftest.shake256_0_73, i64 73)
  %.not31 = icmp eq i32 %bcmp30, 0
  br i1 %.not31, label %15, label %69

15:                                               ; preds = %14
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(200) %1, i8 -93, i64 200, i1 false)
  call void @SHA3_224_Init(ptr noundef nonnull %3)
  call void @SHA3_224_Update(ptr noundef nonnull %3, ptr noundef nonnull %1, i64 noundef 200)
  call void @SHA3_224_Final(ptr noundef nonnull %2, ptr noundef nonnull %3)
  %bcmp32 = call i32 @bcmp(ptr noundef nonnull dereferenceable(28) %2, ptr noundef nonnull dereferenceable(28) @__const.SHA3_Selftest.d224_1600, i64 28)
  %.not33 = icmp eq i32 %bcmp32, 0
  br i1 %.not33, label %16, label %69

16:                                               ; preds = %15
  call void @SHA3_256_Init(ptr noundef nonnull %4)
  call void @SHA3_256_Update(ptr noundef nonnull %4, ptr noundef nonnull %1, i64 noundef 200)
  call void @SHA3_256_Final(ptr noundef nonnull %2, ptr noundef nonnull %4)
  %bcmp34 = call i32 @bcmp(ptr noundef nonnull dereferenceable(32) %2, ptr noundef nonnull dereferenceable(32) @__const.SHA3_Selftest.d256_1600, i64 32)
  %.not35 = icmp eq i32 %bcmp34, 0
  br i1 %.not35, label %17, label %69

17:                                               ; preds = %16
  call void @SHA3_384_Init(ptr noundef nonnull %5)
  call void @SHA3_384_Update(ptr noundef nonnull %5, ptr noundef nonnull %1, i64 noundef 200)
  call void @SHA3_384_Final(ptr noundef nonnull %2, ptr noundef nonnull %5)
  %bcmp36 = call i32 @bcmp(ptr noundef nonnull dereferenceable(48) %2, ptr noundef nonnull dereferenceable(48) @__const.SHA3_Selftest.d384_1600, i64 48)
  %.not37 = icmp eq i32 %bcmp36, 0
  br i1 %.not37, label %18, label %69

18:                                               ; preds = %17
  call void @SHA3_512_Init(ptr noundef nonnull %6)
  call void @SHA3_512_Update(ptr noundef nonnull %6, ptr noundef nonnull %1, i64 noundef 200)
  call void @SHA3_512_Final(ptr noundef nonnull %2, ptr noundef nonnull %6)
  %bcmp38 = call i32 @bcmp(ptr noundef nonnull dereferenceable(64) %2, ptr noundef nonnull dereferenceable(64) @__const.SHA3_Selftest.d512_1600, i64 64)
  %.not39 = icmp eq i32 %bcmp38, 0
  br i1 %.not39, label %19, label %69

19:                                               ; preds = %18
  call void @SHAKE128_Init(ptr noundef nonnull %7)
  call void @SHAKE128_Update(ptr noundef nonnull %7, ptr noundef nonnull %1, i64 noundef 200)
  call void @SHAKE128_Final(ptr noundef nonnull %2, i64 noundef 41, ptr noundef nonnull %7)
  %bcmp40 = call i32 @bcmp(ptr noundef nonnull dereferenceable(41) %2, ptr noundef nonnull dereferenceable(41) @__const.SHA3_Selftest.shake128_1600_41, i64 41)
  %.not41 = icmp eq i32 %bcmp40, 0
  br i1 %.not41, label %20, label %69

20:                                               ; preds = %19
  call void @SHAKE256_Init(ptr noundef nonnull %8)
  call void @SHAKE256_Update(ptr noundef nonnull %8, ptr noundef nonnull %1, i64 noundef 200)
  call void @SHAKE256_Final(ptr noundef nonnull %2, i64 noundef 73, ptr noundef nonnull %8)
  %bcmp42 = call i32 @bcmp(ptr noundef nonnull dereferenceable(73) %2, ptr noundef nonnull dereferenceable(73) @__const.SHA3_Selftest.shake256_1600_73, i64 73)
  %.not43 = icmp eq i32 %bcmp42, 0
  br i1 %.not43, label %.preheader47.preheader, label %69

.preheader47.preheader:                           ; preds = %20
  call void @SHA3_512_Init(ptr noundef nonnull %9)
  %21 = load i32, ptr @__const.SHA3_Selftest.mlen, align 16, !tbaa !5
  %22 = zext i32 %21 to i64
  %23 = mul i32 %21, 28
  call void @sha3_selftest_prng(ptr noundef nonnull %1, i64 noundef %22, i32 noundef %23)
  call void @SHA3_224_Init(ptr noundef nonnull %3)
  call void @SHA3_224_Update(ptr noundef nonnull %3, ptr noundef nonnull %1, i64 noundef %22)
  call void @SHA3_224_Final(ptr noundef nonnull %2, ptr noundef nonnull %3)
  call void @SHA3_512_Update(ptr noundef nonnull %9, ptr noundef nonnull %2, i64 noundef 28)
  %24 = load i32, ptr getelementptr inbounds (i8, ptr @__const.SHA3_Selftest.mlen, i64 4), align 4, !tbaa !5
  %25 = zext i32 %24 to i64
  %26 = mul i32 %24, 28
  call void @sha3_selftest_prng(ptr noundef nonnull %1, i64 noundef %25, i32 noundef %26)
  call void @SHA3_224_Init(ptr noundef nonnull %3)
  call void @SHA3_224_Update(ptr noundef nonnull %3, ptr noundef nonnull %1, i64 noundef %25)
  call void @SHA3_224_Final(ptr noundef nonnull %2, ptr noundef nonnull %3)
  call void @SHA3_512_Update(ptr noundef nonnull %9, ptr noundef nonnull %2, i64 noundef 28)
  %27 = load i32, ptr getelementptr inbounds (i8, ptr @__const.SHA3_Selftest.mlen, i64 8), align 8, !tbaa !5
  %28 = zext i32 %27 to i64
  %29 = mul i32 %27, 28
  call void @sha3_selftest_prng(ptr noundef nonnull %1, i64 noundef %28, i32 noundef %29)
  call void @SHA3_224_Init(ptr noundef nonnull %3)
  call void @SHA3_224_Update(ptr noundef nonnull %3, ptr noundef nonnull %1, i64 noundef %28)
  call void @SHA3_224_Final(ptr noundef nonnull %2, ptr noundef nonnull %3)
  call void @SHA3_512_Update(ptr noundef nonnull %9, ptr noundef nonnull %2, i64 noundef 28)
  %30 = load i32, ptr getelementptr inbounds (i8, ptr @__const.SHA3_Selftest.mlen, i64 12), align 4, !tbaa !5
  %31 = zext i32 %30 to i64
  %32 = mul i32 %30, 28
  call void @sha3_selftest_prng(ptr noundef nonnull %1, i64 noundef %31, i32 noundef %32)
  call void @SHA3_224_Init(ptr noundef nonnull %3)
  call void @SHA3_224_Update(ptr noundef nonnull %3, ptr noundef nonnull %1, i64 noundef %31)
  call void @SHA3_224_Final(ptr noundef nonnull %2, ptr noundef nonnull %3)
  call void @SHA3_512_Update(ptr noundef nonnull %9, ptr noundef nonnull %2, i64 noundef 28)
  %33 = load i32, ptr getelementptr inbounds (i8, ptr @__const.SHA3_Selftest.mlen, i64 16), align 16, !tbaa !5
  %34 = zext i32 %33 to i64
  %35 = mul i32 %33, 28
  call void @sha3_selftest_prng(ptr noundef nonnull %1, i64 noundef %34, i32 noundef %35)
  call void @SHA3_224_Init(ptr noundef nonnull %3)
  call void @SHA3_224_Update(ptr noundef nonnull %3, ptr noundef nonnull %1, i64 noundef %34)
  call void @SHA3_224_Final(ptr noundef nonnull %2, ptr noundef nonnull %3)
  call void @SHA3_512_Update(ptr noundef nonnull %9, ptr noundef nonnull %2, i64 noundef 28)
  %36 = load i32, ptr getelementptr inbounds (i8, ptr @__const.SHA3_Selftest.mlen, i64 20), align 4, !tbaa !5
  %37 = zext i32 %36 to i64
  %38 = mul i32 %36, 28
  call void @sha3_selftest_prng(ptr noundef nonnull %1, i64 noundef %37, i32 noundef %38)
  call void @SHA3_224_Init(ptr noundef nonnull %3)
  call void @SHA3_224_Update(ptr noundef nonnull %3, ptr noundef nonnull %1, i64 noundef %37)
  call void @SHA3_224_Final(ptr noundef nonnull %2, ptr noundef nonnull %3)
  call void @SHA3_512_Update(ptr noundef nonnull %9, ptr noundef nonnull %2, i64 noundef 28)
  %39 = shl i32 %21, 5
  call void @sha3_selftest_prng(ptr noundef nonnull %1, i64 noundef %22, i32 noundef %39)
  call void @SHA3_256_Init(ptr noundef nonnull %4)
  call void @SHA3_256_Update(ptr noundef nonnull %4, ptr noundef nonnull %1, i64 noundef %22)
  call void @SHA3_256_Final(ptr noundef nonnull %2, ptr noundef nonnull %4)
  call void @SHA3_512_Update(ptr noundef nonnull %9, ptr noundef nonnull %2, i64 noundef 32)
  %40 = shl i32 %24, 5
  call void @sha3_selftest_prng(ptr noundef nonnull %1, i64 noundef %25, i32 noundef %40)
  call void @SHA3_256_Init(ptr noundef nonnull %4)
  call void @SHA3_256_Update(ptr noundef nonnull %4, ptr noundef nonnull %1, i64 noundef %25)
  call void @SHA3_256_Final(ptr noundef nonnull %2, ptr noundef nonnull %4)
  call void @SHA3_512_Update(ptr noundef nonnull %9, ptr noundef nonnull %2, i64 noundef 32)
  %41 = shl i32 %27, 5
  call void @sha3_selftest_prng(ptr noundef nonnull %1, i64 noundef %28, i32 noundef %41)
  call void @SHA3_256_Init(ptr noundef nonnull %4)
  call void @SHA3_256_Update(ptr noundef nonnull %4, ptr noundef nonnull %1, i64 noundef %28)
  call void @SHA3_256_Final(ptr noundef nonnull %2, ptr noundef nonnull %4)
  call void @SHA3_512_Update(ptr noundef nonnull %9, ptr noundef nonnull %2, i64 noundef 32)
  %42 = shl i32 %30, 5
  call void @sha3_selftest_prng(ptr noundef nonnull %1, i64 noundef %31, i32 noundef %42)
  call void @SHA3_256_Init(ptr noundef nonnull %4)
  call void @SHA3_256_Update(ptr noundef nonnull %4, ptr noundef nonnull %1, i64 noundef %31)
  call void @SHA3_256_Final(ptr noundef nonnull %2, ptr noundef nonnull %4)
  call void @SHA3_512_Update(ptr noundef nonnull %9, ptr noundef nonnull %2, i64 noundef 32)
  %43 = shl i32 %33, 5
  call void @sha3_selftest_prng(ptr noundef nonnull %1, i64 noundef %34, i32 noundef %43)
  call void @SHA3_256_Init(ptr noundef nonnull %4)
  call void @SHA3_256_Update(ptr noundef nonnull %4, ptr noundef nonnull %1, i64 noundef %34)
  call void @SHA3_256_Final(ptr noundef nonnull %2, ptr noundef nonnull %4)
  call void @SHA3_512_Update(ptr noundef nonnull %9, ptr noundef nonnull %2, i64 noundef 32)
  %44 = shl i32 %36, 5
  call void @sha3_selftest_prng(ptr noundef nonnull %1, i64 noundef %37, i32 noundef %44)
  call void @SHA3_256_Init(ptr noundef nonnull %4)
  call void @SHA3_256_Update(ptr noundef nonnull %4, ptr noundef nonnull %1, i64 noundef %37)
  call void @SHA3_256_Final(ptr noundef nonnull %2, ptr noundef nonnull %4)
  call void @SHA3_512_Update(ptr noundef nonnull %9, ptr noundef nonnull %2, i64 noundef 32)
  %45 = mul i32 %21, 48
  call void @sha3_selftest_prng(ptr noundef nonnull %1, i64 noundef %22, i32 noundef %45)
  call void @SHA3_384_Init(ptr noundef nonnull %5)
  call void @SHA3_384_Update(ptr noundef nonnull %5, ptr noundef nonnull %1, i64 noundef %22)
  call void @SHA3_384_Final(ptr noundef nonnull %2, ptr noundef nonnull %5)
  call void @SHA3_512_Update(ptr noundef nonnull %9, ptr noundef nonnull %2, i64 noundef 48)
  %46 = mul i32 %24, 48
  call void @sha3_selftest_prng(ptr noundef nonnull %1, i64 noundef %25, i32 noundef %46)
  call void @SHA3_384_Init(ptr noundef nonnull %5)
  call void @SHA3_384_Update(ptr noundef nonnull %5, ptr noundef nonnull %1, i64 noundef %25)
  call void @SHA3_384_Final(ptr noundef nonnull %2, ptr noundef nonnull %5)
  call void @SHA3_512_Update(ptr noundef nonnull %9, ptr noundef nonnull %2, i64 noundef 48)
  %47 = mul i32 %27, 48
  call void @sha3_selftest_prng(ptr noundef nonnull %1, i64 noundef %28, i32 noundef %47)
  call void @SHA3_384_Init(ptr noundef nonnull %5)
  call void @SHA3_384_Update(ptr noundef nonnull %5, ptr noundef nonnull %1, i64 noundef %28)
  call void @SHA3_384_Final(ptr noundef nonnull %2, ptr noundef nonnull %5)
  call void @SHA3_512_Update(ptr noundef nonnull %9, ptr noundef nonnull %2, i64 noundef 48)
  %48 = mul i32 %30, 48
  call void @sha3_selftest_prng(ptr noundef nonnull %1, i64 noundef %31, i32 noundef %48)
  call void @SHA3_384_Init(ptr noundef nonnull %5)
  call void @SHA3_384_Update(ptr noundef nonnull %5, ptr noundef nonnull %1, i64 noundef %31)
  call void @SHA3_384_Final(ptr noundef nonnull %2, ptr noundef nonnull %5)
  call void @SHA3_512_Update(ptr noundef nonnull %9, ptr noundef nonnull %2, i64 noundef 48)
  %49 = mul i32 %33, 48
  call void @sha3_selftest_prng(ptr noundef nonnull %1, i64 noundef %34, i32 noundef %49)
  call void @SHA3_384_Init(ptr noundef nonnull %5)
  call void @SHA3_384_Update(ptr noundef nonnull %5, ptr noundef nonnull %1, i64 noundef %34)
  call void @SHA3_384_Final(ptr noundef nonnull %2, ptr noundef nonnull %5)
  call void @SHA3_512_Update(ptr noundef nonnull %9, ptr noundef nonnull %2, i64 noundef 48)
  %50 = mul i32 %36, 48
  call void @sha3_selftest_prng(ptr noundef nonnull %1, i64 noundef %37, i32 noundef %50)
  call void @SHA3_384_Init(ptr noundef nonnull %5)
  call void @SHA3_384_Update(ptr noundef nonnull %5, ptr noundef nonnull %1, i64 noundef %37)
  call void @SHA3_384_Final(ptr noundef nonnull %2, ptr noundef nonnull %5)
  call void @SHA3_512_Update(ptr noundef nonnull %9, ptr noundef nonnull %2, i64 noundef 48)
  %51 = load i32, ptr @__const.SHA3_Selftest.mlen, align 16, !tbaa !5
  %52 = zext i32 %51 to i64
  %53 = shl i32 %51, 6
  call void @sha3_selftest_prng(ptr noundef nonnull %1, i64 noundef %52, i32 noundef %53)
  call void @SHA3_512_Init(ptr noundef nonnull %6)
  call void @SHA3_512_Update(ptr noundef nonnull %6, ptr noundef nonnull %1, i64 noundef %52)
  call void @SHA3_512_Final(ptr noundef nonnull %2, ptr noundef nonnull %6)
  call void @SHA3_512_Update(ptr noundef nonnull %9, ptr noundef nonnull %2, i64 noundef 64)
  %54 = load i32, ptr getelementptr inbounds (i8, ptr @__const.SHA3_Selftest.mlen, i64 4), align 4, !tbaa !5
  %55 = zext i32 %54 to i64
  %56 = shl i32 %54, 6
  call void @sha3_selftest_prng(ptr noundef nonnull %1, i64 noundef %55, i32 noundef %56)
  call void @SHA3_512_Init(ptr noundef nonnull %6)
  call void @SHA3_512_Update(ptr noundef nonnull %6, ptr noundef nonnull %1, i64 noundef %55)
  call void @SHA3_512_Final(ptr noundef nonnull %2, ptr noundef nonnull %6)
  call void @SHA3_512_Update(ptr noundef nonnull %9, ptr noundef nonnull %2, i64 noundef 64)
  %57 = load i32, ptr getelementptr inbounds (i8, ptr @__const.SHA3_Selftest.mlen, i64 8), align 8, !tbaa !5
  %58 = zext i32 %57 to i64
  %59 = shl i32 %57, 6
  call void @sha3_selftest_prng(ptr noundef nonnull %1, i64 noundef %58, i32 noundef %59)
  call void @SHA3_512_Init(ptr noundef nonnull %6)
  call void @SHA3_512_Update(ptr noundef nonnull %6, ptr noundef nonnull %1, i64 noundef %58)
  call void @SHA3_512_Final(ptr noundef nonnull %2, ptr noundef nonnull %6)
  call void @SHA3_512_Update(ptr noundef nonnull %9, ptr noundef nonnull %2, i64 noundef 64)
  %60 = load i32, ptr getelementptr inbounds (i8, ptr @__const.SHA3_Selftest.mlen, i64 12), align 4, !tbaa !5
  %61 = zext i32 %60 to i64
  %62 = shl i32 %60, 6
  call void @sha3_selftest_prng(ptr noundef nonnull %1, i64 noundef %61, i32 noundef %62)
  call void @SHA3_512_Init(ptr noundef nonnull %6)
  call void @SHA3_512_Update(ptr noundef nonnull %6, ptr noundef nonnull %1, i64 noundef %61)
  call void @SHA3_512_Final(ptr noundef nonnull %2, ptr noundef nonnull %6)
  call void @SHA3_512_Update(ptr noundef nonnull %9, ptr noundef nonnull %2, i64 noundef 64)
  %63 = load i32, ptr getelementptr inbounds (i8, ptr @__const.SHA3_Selftest.mlen, i64 16), align 16, !tbaa !5
  %64 = zext i32 %63 to i64
  %65 = shl i32 %63, 6
  call void @sha3_selftest_prng(ptr noundef nonnull %1, i64 noundef %64, i32 noundef %65)
  call void @SHA3_512_Init(ptr noundef nonnull %6)
  call void @SHA3_512_Update(ptr noundef nonnull %6, ptr noundef nonnull %1, i64 noundef %64)
  call void @SHA3_512_Final(ptr noundef nonnull %2, ptr noundef nonnull %6)
  call void @SHA3_512_Update(ptr noundef nonnull %9, ptr noundef nonnull %2, i64 noundef 64)
  %66 = load i32, ptr getelementptr inbounds (i8, ptr @__const.SHA3_Selftest.mlen, i64 20), align 4, !tbaa !5
  %67 = zext i32 %66 to i64
  %68 = shl i32 %66, 6
  call void @sha3_selftest_prng(ptr noundef nonnull %1, i64 noundef %67, i32 noundef %68)
  call void @SHA3_512_Init(ptr noundef nonnull %6)
  call void @SHA3_512_Update(ptr noundef nonnull %6, ptr noundef nonnull %1, i64 noundef %67)
  call void @SHA3_512_Final(ptr noundef nonnull %2, ptr noundef nonnull %6)
  call void @SHA3_512_Update(ptr noundef nonnull %9, ptr noundef nonnull %2, i64 noundef 64)
  call void @SHA3_512_Final(ptr noundef nonnull %2, ptr noundef nonnull %9)
  %bcmp44 = call i32 @bcmp(ptr noundef nonnull dereferenceable(64) %2, ptr noundef nonnull dereferenceable(64) @__const.SHA3_Selftest.d0, i64 64)
  %.not45 = icmp ne i32 %bcmp44, 0
  %. = sext i1 %.not45 to i32
  br label %69

69:                                               ; preds = %.preheader47.preheader, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %0
  %.021 = phi i32 [ -1, %0 ], [ -1, %10 ], [ -1, %11 ], [ -1, %12 ], [ -1, %13 ], [ -1, %14 ], [ -1, %15 ], [ -1, %16 ], [ -1, %17 ], [ -1, %18 ], [ -1, %19 ], [ -1, %20 ], [ %., %.preheader47.preheader ]
  call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %3) #4
  call void @llvm.lifetime.end.p0(i64 73, ptr nonnull %2) #4
  call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %1) #4
  ret i32 %.021
}

; 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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

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

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

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nofree nounwind willreturn memory(argmem: read) }
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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyPass,SROAPass,SimplifyCFGPass