; LLVM IR from guanzhi/GmSSL :: src (sm3_xmss)

; 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.SM3_XMSS_KEY = type { i32, [32 x i8], [32 x i8], [32 x i8], [32 x i8], i32, ptr }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [62 x i8], align 1
@__FUNCTION__.sm3_xmss_key_from_bytes = external hidden unnamed_addr constant [24 x i8], align 1

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

; 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) #1

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

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #3

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #4

; Function Attrs: nounwind uwtable
define dso_local i32 @sm3_xmss_key_from_bytes(ptr noundef %0, ptr noundef %1, i64 noundef %2) #2 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i64 %2, ptr %7, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %12 = load i64, ptr %7, align 8, !tbaa !9
  %13 = icmp ult i64 %12, 4
  br i1 %13, label %14, label %20

14:                                               ; preds = %3
  br label %15

15:                                               ; preds = %14
  %16 = load ptr, ptr @stderr, align 8, !tbaa !5
  %17 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %16, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 593, ptr noundef @__FUNCTION__.sm3_xmss_key_from_bytes) #5
  br label %18

18:                                               ; preds = %15
  br label %19

19:                                               ; preds = %18
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %157

20:                                               ; preds = %3
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %21, ptr %10, align 8, !tbaa !5
  %22 = load ptr, ptr %10, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %22, i64 0
  %24 = load i8, ptr %23, align 1, !tbaa !11
  %25 = zext i8 %24 to i32
  %26 = shl i32 %25, 24
  %27 = load ptr, ptr %10, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %27, i64 1
  %29 = load i8, ptr %28, align 1, !tbaa !11
  %30 = zext i8 %29 to i32
  %31 = shl i32 %30, 16
  %32 = or i32 %26, %31
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  %34 = getelementptr inbounds i8, ptr %33, i64 2
  %35 = load i8, ptr %34, align 1, !tbaa !11
  %36 = zext i8 %35 to i32
  %37 = shl i32 %36, 8
  %38 = or i32 %32, %37
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %39, i64 3
  %41 = load i8, ptr %40, align 1, !tbaa !11
  %42 = zext i8 %41 to i32
  %43 = or i32 %38, %42
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.SM3_XMSS_KEY, ptr %44, i32 0, i32 0
  store i32 %43, ptr %45, align 8, !tbaa !12
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %46, i64 4
  store ptr %47, ptr %10, align 8, !tbaa !5
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.SM3_XMSS_KEY, ptr %48, i32 0, i32 0
  %50 = load i32, ptr %49, align 8, !tbaa !12
  %51 = call i32 @sm3_xmss_height_from_oid(ptr noundef %8, i32 noundef %50)
  %52 = icmp ne i32 %51, 1
  br i1 %52, label %53, label %59

53:                                               ; preds = %20
  br label %54

54:                                               ; preds = %53
  %55 = load ptr, ptr @stderr, align 8, !tbaa !5
  %56 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %55, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 600, ptr noundef @__FUNCTION__.sm3_xmss_key_from_bytes) #5
  br label %57

57:                                               ; preds = %54
  br label %58

58:                                               ; preds = %57
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %157

59:                                               ; preds = %20
  %60 = load i32, ptr %8, align 4, !tbaa !15
  %61 = add i32 %60, 1
  %62 = shl i32 1, %61
  %63 = sub nsw i32 %62, 1
  %64 = mul nsw i32 32, %63
  %65 = sext i32 %64 to i64
  store i64 %65, ptr %9, align 8, !tbaa !9
  %66 = load i64, ptr %7, align 8, !tbaa !9
  %67 = load i64, ptr %9, align 8, !tbaa !9
  %68 = add i64 136, %67
  %69 = icmp ne i64 %66, %68
  br i1 %69, label %70, label %76

70:                                               ; preds = %59
  br label %71

71:                                               ; preds = %70
  %72 = load ptr, ptr @stderr, align 8, !tbaa !5
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 605, ptr noundef @__FUNCTION__.sm3_xmss_key_from_bytes) #5
  br label %74

74:                                               ; preds = %71
  br label %75

75:                                               ; preds = %74
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %157

76:                                               ; preds = %59
  %77 = load ptr, ptr %5, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.SM3_XMSS_KEY, ptr %77, i32 0, i32 1
  %79 = getelementptr inbounds [32 x i8], ptr %78, i64 0, i64 0
  %80 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %79, ptr align 1 %80, i64 32, i1 false)
  %81 = load ptr, ptr %10, align 8, !tbaa !5
  %82 = getelementptr inbounds i8, ptr %81, i64 32
  store ptr %82, ptr %10, align 8, !tbaa !5
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.SM3_XMSS_KEY, ptr %83, i32 0, i32 2
  %85 = getelementptr inbounds [32 x i8], ptr %84, i64 0, i64 0
  %86 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %85, ptr align 1 %86, i64 32, i1 false)
  %87 = load ptr, ptr %10, align 8, !tbaa !5
  %88 = getelementptr inbounds i8, ptr %87, i64 32
  store ptr %88, ptr %10, align 8, !tbaa !5
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.SM3_XMSS_KEY, ptr %89, i32 0, i32 3
  %91 = getelementptr inbounds [32 x i8], ptr %90, i64 0, i64 0
  %92 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %91, ptr align 1 %92, i64 32, i1 false)
  %93 = load ptr, ptr %10, align 8, !tbaa !5
  %94 = getelementptr inbounds i8, ptr %93, i64 32
  store ptr %94, ptr %10, align 8, !tbaa !5
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.SM3_XMSS_KEY, ptr %95, i32 0, i32 4
  %97 = getelementptr inbounds [32 x i8], ptr %96, i64 0, i64 0
  %98 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %97, ptr align 1 %98, i64 32, i1 false)
  %99 = load ptr, ptr %10, align 8, !tbaa !5
  %100 = getelementptr inbounds i8, ptr %99, i64 32
  store ptr %100, ptr %10, align 8, !tbaa !5
  %101 = load ptr, ptr %10, align 8, !tbaa !5
  %102 = getelementptr inbounds i8, ptr %101, i64 0
  %103 = load i8, ptr %102, align 1, !tbaa !11
  %104 = zext i8 %103 to i32
  %105 = shl i32 %104, 24
  %106 = load ptr, ptr %10, align 8, !tbaa !5
  %107 = getelementptr inbounds i8, ptr %106, i64 1
  %108 = load i8, ptr %107, align 1, !tbaa !11
  %109 = zext i8 %108 to i32
  %110 = shl i32 %109, 16
  %111 = or i32 %105, %110
  %112 = load ptr, ptr %10, align 8, !tbaa !5
  %113 = getelementptr inbounds i8, ptr %112, i64 2
  %114 = load i8, ptr %113, align 1, !tbaa !11
  %115 = zext i8 %114 to i32
  %116 = shl i32 %115, 8
  %117 = or i32 %111, %116
  %118 = load ptr, ptr %10, align 8, !tbaa !5
  %119 = getelementptr inbounds i8, ptr %118, i64 3
  %120 = load i8, ptr %119, align 1, !tbaa !11
  %121 = zext i8 %120 to i32
  %122 = or i32 %117, %121
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.SM3_XMSS_KEY, ptr %123, i32 0, i32 5
  store i32 %122, ptr %124, align 4, !tbaa !16
  %125 = load ptr, ptr %10, align 8, !tbaa !5
  %126 = getelementptr inbounds i8, ptr %125, i64 4
  store ptr %126, ptr %10, align 8, !tbaa !5
  %127 = load ptr, ptr %5, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.SM3_XMSS_KEY, ptr %127, i32 0, i32 5
  %129 = load i32, ptr %128, align 4, !tbaa !16
  %130 = load i32, ptr %8, align 4, !tbaa !15
  %131 = shl i32 1, %130
  %132 = icmp uge i32 %129, %131
  br i1 %132, label %133, label %139

133:                                              ; preds = %76
  br label %134

134:                                              ; preds = %133
  %135 = load ptr, ptr @stderr, align 8, !tbaa !5
  %136 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %135, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 615, ptr noundef @__FUNCTION__.sm3_xmss_key_from_bytes) #5
  br label %137

137:                                              ; preds = %134
  br label %138

138:                                              ; preds = %137
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %157

139:                                              ; preds = %76
  %140 = load i64, ptr %9, align 8, !tbaa !9
  %141 = call noalias ptr @malloc(i64 noundef %140) #6
  %142 = load ptr, ptr %5, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.SM3_XMSS_KEY, ptr %142, i32 0, i32 6
  store ptr %141, ptr %143, align 8, !tbaa !17
  %144 = icmp ne ptr %141, null
  br i1 %144, label %151, label %145

145:                                              ; preds = %139
  br label %146

146:                                              ; preds = %145
  %147 = load ptr, ptr @stderr, align 8, !tbaa !5
  %148 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %147, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 620, ptr noundef @__FUNCTION__.sm3_xmss_key_from_bytes) #5
  br label %149

149:                                              ; preds = %146
  br label %150

150:                                              ; preds = %149
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %157

151:                                              ; preds = %139
  %152 = load ptr, ptr %5, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.SM3_XMSS_KEY, ptr %152, i32 0, i32 6
  %154 = load ptr, ptr %153, align 8, !tbaa !17
  %155 = load ptr, ptr %10, align 8, !tbaa !5
  %156 = load i64, ptr %9, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %154, ptr align 1 %155, i64 %156, i1 false)
  store i32 1, ptr %4, align 4
  store i32 1, ptr %11, align 4
  br label %157

157:                                              ; preds = %151, %150, %138, %75, %58, %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  %158 = load i32, ptr %4, align 4
  ret i32 %158
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { nounwind allocsize(0) }

!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 = !{!7, !7, i64 0}
!12 = !{!13, !14, i64 0}
!13 = !{!"", !14, i64 0, !7, i64 4, !7, i64 36, !7, i64 68, !7, i64 100, !14, i64 132, !6, i64 136}
!14 = !{!"int", !7, i64 0}
!15 = !{!14, !14, i64 0}
!16 = !{!13, !14, i64 132}
!17 = !{!13, !6, i64 136}


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

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [62 x i8], align 1
@__FUNCTION__.sm3_xmss_key_from_bytes = external hidden unnamed_addr constant [24 x i8], align 1

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

; Function Attrs: mustprogress 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) #1

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

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

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 2) i32 @sm3_xmss_key_from_bytes(ptr nocapture noundef writeonly %0, ptr nocapture noundef readonly %1, i64 noundef %2) local_unnamed_addr #2 {
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  %5 = icmp ult i64 %2, 4
  br i1 %5, label %6, label %9

6:                                                ; preds = %3
  %7 = load ptr, ptr @stderr, align 8, !tbaa !5
  %8 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %7, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 593, ptr noundef nonnull @__FUNCTION__.sm3_xmss_key_from_bytes) #6
  br label %80

9:                                                ; preds = %3
  %10 = load i8, ptr %1, align 1, !tbaa !9
  %11 = zext i8 %10 to i32
  %12 = shl nuw i32 %11, 24
  %13 = getelementptr inbounds i8, ptr %1, i64 1
  %14 = load i8, ptr %13, align 1, !tbaa !9
  %15 = zext i8 %14 to i32
  %16 = shl nuw nsw i32 %15, 16
  %17 = or disjoint i32 %16, %12
  %18 = getelementptr inbounds i8, ptr %1, i64 2
  %19 = load i8, ptr %18, align 1, !tbaa !9
  %20 = zext i8 %19 to i32
  %21 = shl nuw nsw i32 %20, 8
  %22 = or disjoint i32 %17, %21
  %23 = getelementptr inbounds i8, ptr %1, i64 3
  %24 = load i8, ptr %23, align 1, !tbaa !9
  %25 = zext i8 %24 to i32
  %26 = or disjoint i32 %22, %25
  store i32 %26, ptr %0, align 8, !tbaa !10
  %27 = getelementptr inbounds i8, ptr %1, i64 4
  %28 = call i32 @sm3_xmss_height_from_oid(ptr noundef nonnull %4, i32 noundef %26)
  %.not = icmp eq i32 %28, 1
  br i1 %.not, label %32, label %29

29:                                               ; preds = %9
  %30 = load ptr, ptr @stderr, align 8, !tbaa !5
  %31 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %30, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 600, ptr noundef nonnull @__FUNCTION__.sm3_xmss_key_from_bytes) #6
  br label %80

32:                                               ; preds = %9
  %33 = load i32, ptr %4, align 4, !tbaa !13
  %34 = add i32 %33, 1
  %notmask = shl nsw i32 -1, %34
  %35 = xor i32 %notmask, -1
  %36 = shl nsw i32 %35, 5
  %37 = zext nneg i32 %36 to i64
  %38 = add nuw nsw i64 %37, 136
  %.not37 = icmp eq i64 %38, %2
  br i1 %.not37, label %42, label %39

39:                                               ; preds = %32
  %40 = load ptr, ptr @stderr, align 8, !tbaa !5
  %41 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %40, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 605, ptr noundef nonnull @__FUNCTION__.sm3_xmss_key_from_bytes) #6
  br label %80

42:                                               ; preds = %32
  %43 = getelementptr inbounds i8, ptr %0, i64 4
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(32) %43, ptr noundef nonnull align 1 dereferenceable(32) %27, i64 32, i1 false)
  %44 = getelementptr inbounds i8, ptr %1, i64 36
  %45 = getelementptr inbounds i8, ptr %0, i64 36
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(32) %45, ptr noundef nonnull align 1 dereferenceable(32) %44, i64 32, i1 false)
  %46 = getelementptr inbounds i8, ptr %1, i64 68
  %47 = getelementptr inbounds i8, ptr %0, i64 68
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(32) %47, ptr noundef nonnull align 1 dereferenceable(32) %46, i64 32, i1 false)
  %48 = getelementptr inbounds i8, ptr %1, i64 100
  %49 = getelementptr inbounds i8, ptr %0, i64 100
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(32) %49, ptr noundef nonnull align 1 dereferenceable(32) %48, i64 32, i1 false)
  %50 = getelementptr inbounds i8, ptr %1, i64 132
  %51 = load i8, ptr %50, align 1, !tbaa !9
  %52 = zext i8 %51 to i32
  %53 = shl nuw i32 %52, 24
  %54 = getelementptr inbounds i8, ptr %1, i64 133
  %55 = load i8, ptr %54, align 1, !tbaa !9
  %56 = zext i8 %55 to i32
  %57 = shl nuw nsw i32 %56, 16
  %58 = or disjoint i32 %57, %53
  %59 = getelementptr inbounds i8, ptr %1, i64 134
  %60 = load i8, ptr %59, align 1, !tbaa !9
  %61 = zext i8 %60 to i32
  %62 = shl nuw nsw i32 %61, 8
  %63 = or disjoint i32 %58, %62
  %64 = getelementptr inbounds i8, ptr %1, i64 135
  %65 = load i8, ptr %64, align 1, !tbaa !9
  %66 = zext i8 %65 to i32
  %67 = or disjoint i32 %63, %66
  %68 = getelementptr inbounds i8, ptr %0, i64 132
  store i32 %67, ptr %68, align 4, !tbaa !14
  %69 = getelementptr inbounds i8, ptr %1, i64 136
  %.highbits = lshr i32 %67, %33
  %.not38 = icmp eq i32 %.highbits, 0
  br i1 %.not38, label %73, label %70

70:                                               ; preds = %42
  %71 = load ptr, ptr @stderr, align 8, !tbaa !5
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %71, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 615, ptr noundef nonnull @__FUNCTION__.sm3_xmss_key_from_bytes) #6
  br label %80

73:                                               ; preds = %42
  %74 = call noalias ptr @malloc(i64 noundef %37) #7
  %75 = getelementptr inbounds i8, ptr %0, i64 136
  store ptr %74, ptr %75, align 8, !tbaa !15
  %.not39 = icmp eq ptr %74, null
  br i1 %.not39, label %76, label %79

76:                                               ; preds = %73
  %77 = load ptr, ptr @stderr, align 8, !tbaa !5
  %78 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %77, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 620, ptr noundef nonnull @__FUNCTION__.sm3_xmss_key_from_bytes) #6
  br label %80

79:                                               ; preds = %73
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %74, ptr nonnull align 1 %69, i64 %37, i1 false)
  br label %80

80:                                               ; preds = %79, %76, %70, %39, %29, %6
  %.0 = phi i32 [ -1, %6 ], [ -1, %29 ], [ -1, %39 ], [ -1, %70 ], [ 1, %79 ], [ -1, %76 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  ret i32 %.0
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { cold nounwind }
attributes #7 = { nounwind allocsize(0) }

!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 = !{!7, !7, i64 0}
!10 = !{!11, !12, i64 0}
!11 = !{!"", !12, i64 0, !7, i64 4, !7, i64 36, !7, i64 68, !7, i64 100, !12, i64 132, !6, i64 136}
!12 = !{!"int", !7, i64 0}
!13 = !{!12, !12, i64 0}
!14 = !{!11, !12, i64 132}
!15 = !{!11, !6, i64 136}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass