; LLVM IR from openssl/openssl :: crypto/slh_dsa (slh_wots)

; 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.wpacket_st = type { ptr, ptr, i64, i64, i64, ptr, i8 }
%struct.slh_dsa_hash_ctx_st = type { ptr, ptr, ptr, ptr, i32 }
%struct.slh_dsa_key_st = type { [128 x i8], ptr, ptr, ptr, i32, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.slh_dsa_params_st = type { ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i64 }
%struct.slh_hash_func_st = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct.slh_adrs_func_st = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

; Function Attrs: nounwind uwtable
define dso_local i32 @ossl_slh_wots_pk_gen(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i64 noundef %5) #0 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca [32 x i8], align 16
  %20 = alloca [2144 x i8], align 16
  %21 = alloca %struct.wpacket_st, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i64, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca [32 x i8], align 16
  %29 = alloca [32 x i8], align 16
  %30 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store i64 %5, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  store i32 0, ptr %14, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.slh_dsa_hash_ctx_st, ptr %31, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8, !tbaa !13
  store ptr %33, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %34 = load ptr, ptr %15, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.slh_dsa_key_st, ptr %34, i32 0, i32 5
  %36 = load ptr, ptr %35, align 8, !tbaa !15
  %37 = getelementptr inbounds %struct.slh_dsa_params_st, ptr %36, i32 0, i32 3
  %38 = load i32, ptr %37, align 8, !tbaa !17
  %39 = zext i32 %38 to i64
  store i64 %39, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %40 = load i64, ptr %16, align 8, !tbaa !9
  %41 = mul i64 2, %40
  %42 = add i64 %41, 3
  store i64 %42, ptr %18, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 2144, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 56, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  store ptr %21, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  store i64 0, ptr %23, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #3
  %43 = load ptr, ptr %15, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.slh_dsa_key_st, ptr %43, i32 0, i32 7
  %45 = load ptr, ptr %44, align 8, !tbaa !19
  store ptr %45, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #3
  %46 = load ptr, ptr %15, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.slh_dsa_key_st, ptr %46, i32 0, i32 6
  %48 = load ptr, ptr %47, align 8, !tbaa !20
  store ptr %48, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #3
  %49 = load ptr, ptr %24, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.slh_hash_func_st, ptr %49, i32 0, i32 1
  %51 = load ptr, ptr %50, align 8, !tbaa !21
  store ptr %51, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #3
  %52 = load ptr, ptr %25, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.slh_adrs_func_st, ptr %52, i32 0, i32 5
  %54 = load ptr, ptr %53, align 8, !tbaa !23
  store ptr %54, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %28) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr %29) #3
  %55 = load ptr, ptr %22, align 8, !tbaa !5
  %56 = getelementptr inbounds [2144 x i8], ptr %20, i64 0, i64 0
  %57 = call i32 @WPACKET_init_static_len(ptr noundef %55, ptr noundef %56, i64 noundef 2144, i64 noundef 0)
  %58 = icmp ne i32 %57, 0
  br i1 %58, label %60, label %59

59:                                               ; preds = %6
  store i32 0, ptr %7, align 4
  store i32 1, ptr %30, align 4
  br label %148

60:                                               ; preds = %6
  %61 = load ptr, ptr %25, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.slh_adrs_func_st, ptr %61, i32 0, i32 10
  %63 = load ptr, ptr %62, align 8, !tbaa !25
  %64 = getelementptr inbounds [32 x i8], ptr %28, i64 0, i64 0
  %65 = load ptr, ptr %11, align 8, !tbaa !5
  call void %63(ptr noundef %64, ptr noundef %65)
  %66 = load ptr, ptr %25, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.slh_adrs_func_st, ptr %66, i32 0, i32 2
  %68 = load ptr, ptr %67, align 8, !tbaa !26
  %69 = getelementptr inbounds [32 x i8], ptr %28, i64 0, i64 0
  call void %68(ptr noundef %69, i32 noundef 5)
  %70 = load ptr, ptr %25, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.slh_adrs_func_st, ptr %70, i32 0, i32 4
  %72 = load ptr, ptr %71, align 8, !tbaa !27
  %73 = getelementptr inbounds [32 x i8], ptr %28, i64 0, i64 0
  %74 = load ptr, ptr %11, align 8, !tbaa !5
  call void %72(ptr noundef %73, ptr noundef %74)
  store i64 0, ptr %17, align 8, !tbaa !9
  br label %75

75:                                               ; preds = %107, %60
  %76 = load i64, ptr %17, align 8, !tbaa !9
  %77 = load i64, ptr %18, align 8, !tbaa !9
  %78 = icmp ult i64 %76, %77
  br i1 %78, label %79, label %110

79:                                               ; preds = %75
  %80 = load ptr, ptr %27, align 8, !tbaa !5
  %81 = getelementptr inbounds [32 x i8], ptr %28, i64 0, i64 0
  %82 = load i64, ptr %17, align 8, !tbaa !9
  %83 = trunc i64 %82 to i32
  call void %80(ptr noundef %81, i32 noundef %83)
  %84 = load ptr, ptr %26, align 8, !tbaa !5
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = load ptr, ptr %10, align 8, !tbaa !5
  %87 = load ptr, ptr %9, align 8, !tbaa !5
  %88 = getelementptr inbounds [32 x i8], ptr %28, i64 0, i64 0
  %89 = getelementptr inbounds [32 x i8], ptr %19, i64 0, i64 0
  %90 = call i32 %84(ptr noundef %85, ptr noundef %86, ptr noundef %87, ptr noundef %88, ptr noundef %89, i64 noundef 32)
  %91 = icmp ne i32 %90, 0
  br i1 %91, label %93, label %92

92:                                               ; preds = %79
  br label %141

93:                                               ; preds = %79
  %94 = load ptr, ptr %27, align 8, !tbaa !5
  %95 = load ptr, ptr %11, align 8, !tbaa !5
  %96 = load i64, ptr %17, align 8, !tbaa !9
  %97 = trunc i64 %96 to i32
  call void %94(ptr noundef %95, i32 noundef %97)
  %98 = load ptr, ptr %8, align 8, !tbaa !5
  %99 = getelementptr inbounds [32 x i8], ptr %19, i64 0, i64 0
  %100 = load ptr, ptr %10, align 8, !tbaa !5
  %101 = load ptr, ptr %11, align 8, !tbaa !5
  %102 = load ptr, ptr %22, align 8, !tbaa !5
  %103 = call i32 @slh_wots_chain(ptr noundef %98, ptr noundef %99, i8 noundef zeroext 0, i8 noundef zeroext 15, ptr noundef %100, ptr noundef %101, ptr noundef %102)
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %106, label %105

105:                                              ; preds = %93
  br label %141

106:                                              ; preds = %93
  br label %107

107:                                              ; preds = %106
  %108 = load i64, ptr %17, align 8, !tbaa !9
  %109 = add i64 %108, 1
  store i64 %109, ptr %17, align 8, !tbaa !9
  br label %75, !llvm.loop !28

110:                                              ; preds = %75
  %111 = load ptr, ptr %22, align 8, !tbaa !5
  %112 = call i32 @WPACKET_get_total_written(ptr noundef %111, ptr noundef %23)
  %113 = icmp ne i32 %112, 0
  br i1 %113, label %115, label %114

114:                                              ; preds = %110
  br label %141

115:                                              ; preds = %110
  %116 = load ptr, ptr %25, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.slh_adrs_func_st, ptr %116, i32 0, i32 10
  %118 = load ptr, ptr %117, align 8, !tbaa !25
  %119 = getelementptr inbounds [32 x i8], ptr %29, i64 0, i64 0
  %120 = load ptr, ptr %11, align 8, !tbaa !5
  call void %118(ptr noundef %119, ptr noundef %120)
  %121 = load ptr, ptr %25, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.slh_adrs_func_st, ptr %121, i32 0, i32 2
  %123 = load ptr, ptr %122, align 8, !tbaa !26
  %124 = getelementptr inbounds [32 x i8], ptr %29, i64 0, i64 0
  call void %123(ptr noundef %124, i32 noundef 1)
  %125 = load ptr, ptr %25, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.slh_adrs_func_st, ptr %125, i32 0, i32 4
  %127 = load ptr, ptr %126, align 8, !tbaa !27
  %128 = getelementptr inbounds [32 x i8], ptr %29, i64 0, i64 0
  %129 = load ptr, ptr %11, align 8, !tbaa !5
  call void %127(ptr noundef %128, ptr noundef %129)
  %130 = load ptr, ptr %24, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.slh_hash_func_st, ptr %130, i32 0, i32 5
  %132 = load ptr, ptr %131, align 8, !tbaa !30
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = load ptr, ptr %10, align 8, !tbaa !5
  %135 = getelementptr inbounds [32 x i8], ptr %29, i64 0, i64 0
  %136 = getelementptr inbounds [2144 x i8], ptr %20, i64 0, i64 0
  %137 = load i64, ptr %23, align 8, !tbaa !9
  %138 = load ptr, ptr %12, align 8, !tbaa !5
  %139 = load i64, ptr %13, align 8, !tbaa !9
  %140 = call i32 %132(ptr noundef %133, ptr noundef %134, ptr noundef %135, ptr noundef %136, i64 noundef %137, ptr noundef %138, i64 noundef %139)
  store i32 %140, ptr %14, align 4, !tbaa !11
  br label %141

141:                                              ; preds = %115, %114, %105, %92
  %142 = load ptr, ptr %22, align 8, !tbaa !5
  %143 = call i32 @WPACKET_finish(ptr noundef %142)
  %144 = getelementptr inbounds [2144 x i8], ptr %20, i64 0, i64 0
  call void @OPENSSL_cleanse(ptr noundef %144, i64 noundef 2144)
  %145 = getelementptr inbounds [32 x i8], ptr %19, i64 0, i64 0
  %146 = load i64, ptr %16, align 8, !tbaa !9
  call void @OPENSSL_cleanse(ptr noundef %145, i64 noundef %146)
  %147 = load i32, ptr %14, align 4, !tbaa !11
  store i32 %147, ptr %7, align 4
  store i32 1, ptr %30, align 4
  br label %148

148:                                              ; preds = %141, %59
  call void @llvm.lifetime.end.p0(i64 32, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 56, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 2144, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  %149 = load i32, ptr %7, align 4
  ret i32 %149
}

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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @slh_wots_chain(ptr noundef, ptr noundef, i8 noundef zeroext, i8 noundef zeroext, ptr noundef, ptr noundef, ptr noundef) #0

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

declare i32 @WPACKET_finish(ptr noundef) #2

declare void @OPENSSL_cleanse(ptr noundef, i64 noundef) #2

; 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 = { "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 = { 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"slh_dsa_hash_ctx_st", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !12, i64 32}
!15 = !{!16, !6, i64 160}
!16 = !{!"slh_dsa_key_st", !7, i64 0, !6, i64 128, !6, i64 136, !6, i64 144, !12, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200}
!17 = !{!18, !12, i64 16}
!18 = !{!"slh_dsa_params_st", !6, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !12, i64 48, !12, i64 52, !10, i64 56}
!19 = !{!16, !6, i64 176}
!20 = !{!16, !6, i64 168}
!21 = !{!22, !6, i64 8}
!22 = !{!"slh_hash_func_st", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!23 = !{!24, !6, i64 40}
!24 = !{!"slh_adrs_func_st", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80}
!25 = !{!24, !6, i64 80}
!26 = !{!24, !6, i64 16}
!27 = !{!24, !6, i64 32}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!22, !6, i64 40}


; 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.wpacket_st = type { ptr, ptr, i64, i64, i64, ptr, i8 }

; Function Attrs: nounwind uwtable
define dso_local i32 @ossl_slh_wots_pk_gen(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i64 noundef %5) local_unnamed_addr #0 {
  %7 = alloca [32 x i8], align 16
  %8 = alloca [2144 x i8], align 16
  %9 = alloca %struct.wpacket_st, align 8
  %10 = alloca i64, align 8
  %11 = alloca [32 x i8], align 16
  %12 = alloca [32 x i8], align 16
  %13 = load ptr, ptr %0, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %13, i64 160
  %15 = load ptr, ptr %14, align 8, !tbaa !11
  %16 = getelementptr inbounds i8, ptr %15, i64 16
  %17 = load i32, ptr %16, align 8, !tbaa !13
  %18 = zext i32 %17 to i64
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 2144, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #3
  store i64 0, ptr %10, align 8, !tbaa !16
  %19 = getelementptr inbounds i8, ptr %13, i64 176
  %20 = load ptr, ptr %19, align 8, !tbaa !17
  %21 = getelementptr inbounds i8, ptr %13, i64 168
  %22 = load ptr, ptr %21, align 8, !tbaa !18
  %23 = getelementptr inbounds i8, ptr %20, i64 8
  %24 = load ptr, ptr %23, align 8, !tbaa !19
  %25 = getelementptr inbounds i8, ptr %22, i64 40
  %26 = load ptr, ptr %25, align 8, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #3
  %27 = call i32 @WPACKET_init_static_len(ptr noundef nonnull %9, ptr noundef nonnull %8, i64 noundef 2144, i64 noundef 0) #3
  %.not = icmp eq i32 %27, 0
  br i1 %.not, label %55, label %28

28:                                               ; preds = %6
  %29 = shl nuw nsw i64 %18, 1
  %30 = getelementptr inbounds i8, ptr %22, i64 80
  %31 = load ptr, ptr %30, align 8, !tbaa !23
  call void %31(ptr noundef nonnull %11, ptr noundef %3) #3
  %32 = getelementptr inbounds i8, ptr %22, i64 16
  %33 = load ptr, ptr %32, align 8, !tbaa !24
  call void %33(ptr noundef nonnull %11, i32 noundef 5) #3
  %34 = getelementptr inbounds i8, ptr %22, i64 32
  %35 = load ptr, ptr %34, align 8, !tbaa !25
  call void %35(ptr noundef nonnull %11, ptr noundef %3) #3
  %36 = add nuw nsw i64 %29, 2
  br label %39

37:                                               ; preds = %42
  %38 = add nuw nsw i64 %.04448, 1
  %exitcond.not = icmp eq i64 %.04448, %36
  br i1 %exitcond.not, label %44, label %39, !llvm.loop !26

39:                                               ; preds = %28, %37
  %.04448 = phi i64 [ 0, %28 ], [ %38, %37 ]
  %40 = trunc i64 %.04448 to i32
  call void %26(ptr noundef nonnull %11, i32 noundef %40) #3
  %41 = call i32 %24(ptr noundef nonnull %0, ptr noundef %2, ptr noundef %1, ptr noundef nonnull %11, ptr noundef nonnull %7, i64 noundef 32) #3
  %.not46 = icmp eq i32 %41, 0
  br i1 %.not46, label %.loopexit, label %42

42:                                               ; preds = %39
  call void %26(ptr noundef %3, i32 noundef %40) #3
  %43 = call i32 @slh_wots_chain(ptr noundef nonnull %0, ptr noundef nonnull %7, i8 noundef zeroext 0, i8 noundef zeroext 15, ptr noundef %2, ptr noundef %3, ptr noundef nonnull %9)
  %.not47 = icmp eq i32 %43, 0
  br i1 %.not47, label %.loopexit, label %37

44:                                               ; preds = %37
  %45 = call i32 @WPACKET_get_total_written(ptr noundef nonnull %9, ptr noundef nonnull %10) #3
  %.not45 = icmp eq i32 %45, 0
  br i1 %.not45, label %.loopexit, label %46

46:                                               ; preds = %44
  %47 = load ptr, ptr %30, align 8, !tbaa !23
  call void %47(ptr noundef nonnull %12, ptr noundef %3) #3
  %48 = load ptr, ptr %32, align 8, !tbaa !24
  call void %48(ptr noundef nonnull %12, i32 noundef 1) #3
  %49 = load ptr, ptr %34, align 8, !tbaa !25
  call void %49(ptr noundef nonnull %12, ptr noundef %3) #3
  %50 = getelementptr inbounds i8, ptr %20, i64 40
  %51 = load ptr, ptr %50, align 8, !tbaa !28
  %52 = load i64, ptr %10, align 8, !tbaa !16
  %53 = call i32 %51(ptr noundef nonnull %0, ptr noundef %2, ptr noundef nonnull %12, ptr noundef nonnull %8, i64 noundef %52, ptr noundef %4, i64 noundef %5) #3
  br label %.loopexit

.loopexit:                                        ; preds = %42, %39, %44, %46
  %.043 = phi i32 [ %53, %46 ], [ 0, %44 ], [ 0, %39 ], [ 0, %42 ]
  %54 = call i32 @WPACKET_finish(ptr noundef nonnull %9) #3
  call void @OPENSSL_cleanse(ptr noundef nonnull %8, i64 noundef 2144) #3
  call void @OPENSSL_cleanse(ptr noundef nonnull %7, i64 noundef %18) #3
  br label %55

55:                                               ; preds = %6, %.loopexit
  %.0 = phi i32 [ %.043, %.loopexit ], [ 0, %6 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #3
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 2144, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #3
  ret i32 %.0
}

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

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

; Function Attrs: nounwind uwtable
declare hidden i32 @slh_wots_chain(ptr noundef, ptr noundef, i8 noundef zeroext, i8 noundef zeroext, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

declare i32 @WPACKET_finish(ptr noundef) local_unnamed_addr #2

declare void @OPENSSL_cleanse(ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress 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 = { 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 = { 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 = !{!"slh_dsa_hash_ctx_st", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!12, !7, i64 160}
!12 = !{!"slh_dsa_key_st", !8, i64 0, !7, i64 128, !7, i64 136, !7, i64 144, !10, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !7, i64 184, !7, i64 192, !7, i64 200}
!13 = !{!14, !10, i64 16}
!14 = !{!"slh_dsa_params_st", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !15, i64 56}
!15 = !{!"long", !8, i64 0}
!16 = !{!15, !15, i64 0}
!17 = !{!12, !7, i64 176}
!18 = !{!12, !7, i64 168}
!19 = !{!20, !7, i64 8}
!20 = !{!"slh_hash_func_st", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40}
!21 = !{!22, !7, i64 40}
!22 = !{!"slh_adrs_func_st", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80}
!23 = !{!22, !7, i64 80}
!24 = !{!22, !7, i64 16}
!25 = !{!22, !7, i64 32}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = !{!20, !7, i64 40}


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