; LLVM IR from specinfo-ua/UAPKI :: library/uapkic/src (hmac)

; 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.ByteArray_st = type { ptr, i64 }
%struct.HmacCtx_st = type { ptr, ptr, i64, ptr }

@.str = external hidden unnamed_addr constant [14 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

declare void @stacktrace_create(ptr noundef, i64 noundef, i32 noundef, ptr noundef) #1

declare void @stacktrace_add(ptr noundef, i64 noundef, i32 noundef) #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
define dso_local i32 @hmac_init(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  store ptr null, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %8

8:                                                ; preds = %2
  %9 = load ptr, ptr %3, align 8, !tbaa !5
  %10 = icmp ne ptr %9, null
  br i1 %10, label %13, label %11

11:                                               ; preds = %8
  store i32 2, ptr %7, align 4, !tbaa !9
  %12 = load i32, ptr %7, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 114, i32 noundef %12, ptr noundef null)
  br label %168

13:                                               ; preds = %8
  br label %14

14:                                               ; preds = %13
  br label %15

15:                                               ; preds = %14
  br label %16

16:                                               ; preds = %15
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = icmp ne ptr %17, null
  br i1 %18, label %21, label %19

19:                                               ; preds = %16
  store i32 2, ptr %7, align 4, !tbaa !9
  %20 = load i32, ptr %7, align 4, !tbaa !9
  call void @stacktrace_create(ptr noundef @.str, i64 noundef 115, i32 noundef %20, ptr noundef null)
  br label %168

21:                                               ; preds = %16
  br label %22

22:                                               ; preds = %21
  br label %23

23:                                               ; preds = %22
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.ByteArray_st, ptr %24, i32 0, i32 1
  %26 = load i64, ptr %25, align 8, !tbaa !11
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.HmacCtx_st, ptr %27, i32 0, i32 2
  %29 = load i64, ptr %28, align 8, !tbaa !14
  %30 = icmp ugt i64 %26, %29
  br i1 %30, label %31, label %57

31:                                               ; preds = %23
  br label %32

32:                                               ; preds = %31
  %33 = load ptr, ptr %3, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.HmacCtx_st, ptr %33, i32 0, i32 3
  %35 = load ptr, ptr %34, align 8, !tbaa !16
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = call i32 @hash_update(ptr noundef %35, ptr noundef %36)
  store i32 %37, ptr %7, align 4, !tbaa !9
  %38 = load i32, ptr %7, align 4, !tbaa !9
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %40, label %42

40:                                               ; preds = %32
  %41 = load i32, ptr %7, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 118, i32 noundef %41)
  br label %168

42:                                               ; preds = %32
  br label %43

43:                                               ; preds = %42
  br label %44

44:                                               ; preds = %43
  br label %45

45:                                               ; preds = %44
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.HmacCtx_st, ptr %46, i32 0, i32 3
  %48 = load ptr, ptr %47, align 8, !tbaa !16
  %49 = call i32 @hash_final(ptr noundef %48, ptr noundef %5)
  store i32 %49, ptr %7, align 4, !tbaa !9
  %50 = load i32, ptr %7, align 4, !tbaa !9
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %52, label %54

52:                                               ; preds = %45
  %53 = load i32, ptr %7, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 119, i32 noundef %53)
  br label %168

54:                                               ; preds = %45
  br label %55

55:                                               ; preds = %54
  br label %56

56:                                               ; preds = %55
  br label %67

57:                                               ; preds = %23
  br label %58

58:                                               ; preds = %57
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = call ptr @ba_copy_with_alloc(ptr noundef %59, i64 noundef 0, i64 noundef 0)
  store ptr %60, ptr %5, align 8, !tbaa !5
  %61 = icmp eq ptr null, %60
  br i1 %61, label %62, label %64

62:                                               ; preds = %58
  store i32 2, ptr %7, align 4, !tbaa !9
  %63 = load i32, ptr %7, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 121, i32 noundef %63)
  br label %168

64:                                               ; preds = %58
  br label %65

65:                                               ; preds = %64
  br label %66

66:                                               ; preds = %65
  br label %67

67:                                               ; preds = %66, %56
  %68 = load ptr, ptr %3, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.HmacCtx_st, ptr %68, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8, !tbaa !17
  %71 = getelementptr inbounds %struct.ByteArray_st, ptr %70, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8, !tbaa !18
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.HmacCtx_st, ptr %73, i32 0, i32 2
  %75 = load i64, ptr %74, align 8, !tbaa !14
  call void @llvm.memset.p0.i64(ptr align 1 %72, i8 0, i64 %75, i1 false)
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.HmacCtx_st, ptr %76, i32 0, i32 1
  %78 = load ptr, ptr %77, align 8, !tbaa !19
  %79 = getelementptr inbounds %struct.ByteArray_st, ptr %78, i32 0, i32 0
  %80 = load ptr, ptr %79, align 8, !tbaa !18
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.HmacCtx_st, ptr %81, i32 0, i32 2
  %83 = load i64, ptr %82, align 8, !tbaa !14
  call void @llvm.memset.p0.i64(ptr align 1 %80, i8 0, i64 %83, i1 false)
  br label %84

84:                                               ; preds = %67
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = load ptr, ptr %3, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.HmacCtx_st, ptr %86, i32 0, i32 0
  %88 = load ptr, ptr %87, align 8, !tbaa !17
  %89 = getelementptr inbounds %struct.ByteArray_st, ptr %88, i32 0, i32 0
  %90 = load ptr, ptr %89, align 8, !tbaa !18
  %91 = load ptr, ptr %5, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.ByteArray_st, ptr %91, i32 0, i32 1
  %93 = load i64, ptr %92, align 8, !tbaa !11
  %94 = call i32 @ba_to_uint8(ptr noundef %85, ptr noundef %90, i64 noundef %93)
  store i32 %94, ptr %7, align 4, !tbaa !9
  %95 = load i32, ptr %7, align 4, !tbaa !9
  %96 = icmp ne i32 %95, 0
  br i1 %96, label %97, label %99

97:                                               ; preds = %84
  %98 = load i32, ptr %7, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 127, i32 noundef %98)
  br label %168

99:                                               ; preds = %84
  br label %100

100:                                              ; preds = %99
  br label %101

101:                                              ; preds = %100
  br label %102

102:                                              ; preds = %101
  %103 = load ptr, ptr %5, align 8, !tbaa !5
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.HmacCtx_st, ptr %104, i32 0, i32 1
  %106 = load ptr, ptr %105, align 8, !tbaa !19
  %107 = getelementptr inbounds %struct.ByteArray_st, ptr %106, i32 0, i32 0
  %108 = load ptr, ptr %107, align 8, !tbaa !18
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.ByteArray_st, ptr %109, i32 0, i32 1
  %111 = load i64, ptr %110, align 8, !tbaa !11
  %112 = call i32 @ba_to_uint8(ptr noundef %103, ptr noundef %108, i64 noundef %111)
  store i32 %112, ptr %7, align 4, !tbaa !9
  %113 = load i32, ptr %7, align 4, !tbaa !9
  %114 = icmp ne i32 %113, 0
  br i1 %114, label %115, label %117

115:                                              ; preds = %102
  %116 = load i32, ptr %7, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 128, i32 noundef %116)
  br label %168

117:                                              ; preds = %102
  br label %118

118:                                              ; preds = %117
  br label %119

119:                                              ; preds = %118
  store i64 0, ptr %6, align 8, !tbaa !20
  br label %120

120:                                              ; preds = %149, %119
  %121 = load i64, ptr %6, align 8, !tbaa !20
  %122 = load ptr, ptr %3, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.HmacCtx_st, ptr %122, i32 0, i32 2
  %124 = load i64, ptr %123, align 8, !tbaa !14
  %125 = icmp ult i64 %121, %124
  br i1 %125, label %126, label %152

126:                                              ; preds = %120
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.HmacCtx_st, ptr %127, i32 0, i32 0
  %129 = load ptr, ptr %128, align 8, !tbaa !17
  %130 = getelementptr inbounds %struct.ByteArray_st, ptr %129, i32 0, i32 0
  %131 = load ptr, ptr %130, align 8, !tbaa !18
  %132 = load i64, ptr %6, align 8, !tbaa !20
  %133 = getelementptr inbounds i8, ptr %131, i64 %132
  %134 = load i8, ptr %133, align 1, !tbaa !21
  %135 = zext i8 %134 to i32
  %136 = xor i32 %135, 54
  %137 = trunc i32 %136 to i8
  store i8 %137, ptr %133, align 1, !tbaa !21
  %138 = load ptr, ptr %3, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.HmacCtx_st, ptr %138, i32 0, i32 1
  %140 = load ptr, ptr %139, align 8, !tbaa !19
  %141 = getelementptr inbounds %struct.ByteArray_st, ptr %140, i32 0, i32 0
  %142 = load ptr, ptr %141, align 8, !tbaa !18
  %143 = load i64, ptr %6, align 8, !tbaa !20
  %144 = getelementptr inbounds i8, ptr %142, i64 %143
  %145 = load i8, ptr %144, align 1, !tbaa !21
  %146 = zext i8 %145 to i32
  %147 = xor i32 %146, 92
  %148 = trunc i32 %147 to i8
  store i8 %148, ptr %144, align 1, !tbaa !21
  br label %149

149:                                              ; preds = %126
  %150 = load i64, ptr %6, align 8, !tbaa !20
  %151 = add i64 %150, 1
  store i64 %151, ptr %6, align 8, !tbaa !20
  br label %120, !llvm.loop !22

152:                                              ; preds = %120
  br label %153

153:                                              ; preds = %152
  %154 = load ptr, ptr %3, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.HmacCtx_st, ptr %154, i32 0, i32 3
  %156 = load ptr, ptr %155, align 8, !tbaa !16
  %157 = load ptr, ptr %3, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.HmacCtx_st, ptr %157, i32 0, i32 0
  %159 = load ptr, ptr %158, align 8, !tbaa !17
  %160 = call i32 @hash_update(ptr noundef %156, ptr noundef %159)
  store i32 %160, ptr %7, align 4, !tbaa !9
  %161 = load i32, ptr %7, align 4, !tbaa !9
  %162 = icmp ne i32 %161, 0
  br i1 %162, label %163, label %165

163:                                              ; preds = %153
  %164 = load i32, ptr %7, align 4, !tbaa !9
  call void @stacktrace_add(ptr noundef @.str, i64 noundef 136, i32 noundef %164)
  br label %168

165:                                              ; preds = %153
  br label %166

166:                                              ; preds = %165
  br label %167

167:                                              ; preds = %166
  br label %168

168:                                              ; preds = %167, %163, %115, %97, %62, %52, %40, %19, %11
  %169 = load ptr, ptr %5, align 8, !tbaa !5
  call void @ba_free_private(ptr noundef %169)
  %170 = load i32, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  ret i32 %170
}

declare i32 @hash_update(ptr noundef, ptr noundef) #1

declare i32 @hash_final(ptr noundef, ptr noundef) #1

declare ptr @ba_copy_with_alloc(ptr noundef, i64 noundef, i64 noundef) #1

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

declare i32 @ba_to_uint8(ptr noundef, ptr noundef, i64 noundef) #1

declare void @ba_free_private(ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 #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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 8}
!12 = !{!"ByteArray_st", !6, i64 0, !13, i64 8}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !13, i64 16}
!15 = !{!"HmacCtx_st", !6, i64 0, !6, i64 8, !13, i64 16, !6, i64 24}
!16 = !{!15, !6, i64 24}
!17 = !{!15, !6, i64 0}
!18 = !{!12, !6, i64 0}
!19 = !{!15, !6, i64 8}
!20 = !{!13, !13, i64 0}
!21 = !{!7, !7, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}


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

@.str = external hidden unnamed_addr constant [14 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

declare void @stacktrace_create(ptr noundef, i64 noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare void @stacktrace_add(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #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
define dso_local i32 @hmac_init(ptr noundef readonly %0, ptr noundef %1) local_unnamed_addr #2 {
  %3 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  store ptr null, ptr %3, align 8, !tbaa !5
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %4, label %5

4:                                                ; preds = %2
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 114, i32 noundef 2, ptr noundef null) #4
  br label %68

5:                                                ; preds = %2
  %.not44 = icmp eq ptr %1, null
  br i1 %.not44, label %6, label %7

6:                                                ; preds = %5
  tail call void @stacktrace_create(ptr noundef nonnull @.str, i64 noundef 115, i32 noundef 2, ptr noundef null) #4
  br label %68

7:                                                ; preds = %5
  %8 = getelementptr inbounds i8, ptr %1, i64 8
  %9 = load i64, ptr %8, align 8, !tbaa !9
  %10 = getelementptr inbounds i8, ptr %0, i64 16
  %11 = load i64, ptr %10, align 8, !tbaa !12
  %12 = icmp ugt i64 %9, %11
  br i1 %12, label %13, label %22

13:                                               ; preds = %7
  %14 = getelementptr inbounds i8, ptr %0, i64 24
  %15 = load ptr, ptr %14, align 8, !tbaa !14
  %16 = tail call i32 @hash_update(ptr noundef %15, ptr noundef nonnull %1) #4
  %.not45 = icmp eq i32 %16, 0
  br i1 %.not45, label %18, label %17

17:                                               ; preds = %13
  tail call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 118, i32 noundef %16) #4
  br label %68

18:                                               ; preds = %13
  %19 = load ptr, ptr %14, align 8, !tbaa !14
  %20 = call i32 @hash_final(ptr noundef %19, ptr noundef nonnull %3) #4
  %.not46 = icmp eq i32 %20, 0
  br i1 %.not46, label %26, label %21

21:                                               ; preds = %18
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 119, i32 noundef %20) #4
  br label %68

22:                                               ; preds = %7
  %23 = tail call ptr @ba_copy_with_alloc(ptr noundef nonnull %1, i64 noundef 0, i64 noundef 0) #4
  store ptr %23, ptr %3, align 8, !tbaa !5
  %24 = icmp eq ptr %23, null
  br i1 %24, label %25, label %26

25:                                               ; preds = %22
  tail call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 121, i32 noundef 2) #4
  br label %68

26:                                               ; preds = %22, %18
  %27 = load ptr, ptr %0, align 8, !tbaa !15
  %28 = load ptr, ptr %27, align 8, !tbaa !16
  %29 = load i64, ptr %10, align 8, !tbaa !12
  call void @llvm.memset.p0.i64(ptr align 1 %28, i8 0, i64 %29, i1 false)
  %30 = getelementptr inbounds i8, ptr %0, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !17
  %32 = load ptr, ptr %31, align 8, !tbaa !16
  %33 = load i64, ptr %10, align 8, !tbaa !12
  call void @llvm.memset.p0.i64(ptr align 1 %32, i8 0, i64 %33, i1 false)
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  %35 = load ptr, ptr %0, align 8, !tbaa !15
  %36 = load ptr, ptr %35, align 8, !tbaa !16
  %37 = getelementptr inbounds i8, ptr %34, i64 8
  %38 = load i64, ptr %37, align 8, !tbaa !9
  %39 = call i32 @ba_to_uint8(ptr noundef %34, ptr noundef %36, i64 noundef %38) #4
  %.not47 = icmp eq i32 %39, 0
  br i1 %.not47, label %41, label %40

40:                                               ; preds = %26
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 127, i32 noundef %39) #4
  br label %68

41:                                               ; preds = %26
  %42 = load ptr, ptr %3, align 8, !tbaa !5
  %43 = load ptr, ptr %30, align 8, !tbaa !17
  %44 = load ptr, ptr %43, align 8, !tbaa !16
  %45 = getelementptr inbounds i8, ptr %42, i64 8
  %46 = load i64, ptr %45, align 8, !tbaa !9
  %47 = call i32 @ba_to_uint8(ptr noundef %42, ptr noundef %44, i64 noundef %46) #4
  %.not48 = icmp eq i32 %47, 0
  br i1 %.not48, label %.preheader, label %49

.preheader:                                       ; preds = %41
  %48 = load i64, ptr %10, align 8, !tbaa !12
  %.not51 = icmp eq i64 %48, 0
  br i1 %.not51, label %._crit_edge, label %.lr.ph

49:                                               ; preds = %41
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 128, i32 noundef %47) #4
  br label %68

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %.03650 = phi i64 [ %60, %.lr.ph ], [ 0, %.preheader ]
  %50 = load ptr, ptr %0, align 8, !tbaa !15
  %51 = load ptr, ptr %50, align 8, !tbaa !16
  %52 = getelementptr inbounds i8, ptr %51, i64 %.03650
  %53 = load i8, ptr %52, align 1, !tbaa !18
  %54 = xor i8 %53, 54
  store i8 %54, ptr %52, align 1, !tbaa !18
  %55 = load ptr, ptr %30, align 8, !tbaa !17
  %56 = load ptr, ptr %55, align 8, !tbaa !16
  %57 = getelementptr inbounds i8, ptr %56, i64 %.03650
  %58 = load i8, ptr %57, align 1, !tbaa !18
  %59 = xor i8 %58, 92
  store i8 %59, ptr %57, align 1, !tbaa !18
  %60 = add nuw i64 %.03650, 1
  %61 = load i64, ptr %10, align 8, !tbaa !12
  %62 = icmp ult i64 %60, %61
  br i1 %62, label %.lr.ph, label %._crit_edge, !llvm.loop !19

._crit_edge:                                      ; preds = %.lr.ph, %.preheader
  %63 = getelementptr inbounds i8, ptr %0, i64 24
  %64 = load ptr, ptr %63, align 8, !tbaa !14
  %65 = load ptr, ptr %0, align 8, !tbaa !15
  %66 = call i32 @hash_update(ptr noundef %64, ptr noundef %65) #4
  %.not49 = icmp eq i32 %66, 0
  br i1 %.not49, label %68, label %67

67:                                               ; preds = %._crit_edge
  call void @stacktrace_add(ptr noundef nonnull @.str, i64 noundef 136, i32 noundef %66) #4
  br label %68

68:                                               ; preds = %._crit_edge, %67, %49, %40, %25, %21, %17, %6, %4
  %.0 = phi i32 [ %16, %17 ], [ %20, %21 ], [ %39, %40 ], [ %47, %49 ], [ %66, %67 ], [ 0, %._crit_edge ], [ 2, %25 ], [ 2, %6 ], [ 2, %4 ]
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  call void @ba_free_private(ptr noundef %69) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  ret i32 %.0
}

declare i32 @hash_update(ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @hash_final(ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @ba_copy_with_alloc(ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #1

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

declare i32 @ba_to_uint8(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

declare void @ba_free_private(ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 #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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 8}
!10 = !{!"ByteArray_st", !6, i64 0, !11, i64 8}
!11 = !{!"long", !7, i64 0}
!12 = !{!13, !11, i64 16}
!13 = !{!"HmacCtx_st", !6, i64 0, !6, i64 8, !11, i64 16, !6, i64 24}
!14 = !{!13, !6, i64 24}
!15 = !{!13, !6, i64 0}
!16 = !{!10, !6, i64 0}
!17 = !{!13, !6, i64 8}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass