; LLVM IR from ARMmbed/mbed-crypto :: library (hkdf)

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

@.str = external hidden unnamed_addr constant [1 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: nounwind uwtable
define dso_local i32 @mbedtls_hkdf_expand(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4, ptr noundef %5, i64 noundef %6) #1 {
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  %22 = alloca %struct.mbedtls_md_context_t, align 8
  %23 = alloca [64 x i8], align 16
  %24 = alloca i32, align 4
  %25 = alloca i64, align 8
  %26 = alloca i8, align 1
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store i64 %2, ptr %11, align 8, !tbaa !9
  store ptr %3, ptr %12, align 8, !tbaa !5
  store i64 %4, ptr %13, align 8, !tbaa !9
  store ptr %5, ptr %14, align 8, !tbaa !5
  store i64 %6, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  store i64 0, ptr %17, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  store i64 0, ptr %19, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  store i32 0, ptr %21, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %23) #4
  %27 = load ptr, ptr %14, align 8, !tbaa !5
  %28 = icmp eq ptr %27, null
  br i1 %28, label %29, label %30

29:                                               ; preds = %7
  store i32 -24448, ptr %8, align 4
  store i32 1, ptr %24, align 4
  br label %136

30:                                               ; preds = %7
  %31 = load ptr, ptr %9, align 8, !tbaa !5
  %32 = call zeroext i8 @mbedtls_md_get_size(ptr noundef %31)
  %33 = zext i8 %32 to i64
  store i64 %33, ptr %16, align 8, !tbaa !9
  %34 = load i64, ptr %11, align 8, !tbaa !9
  %35 = load i64, ptr %16, align 8, !tbaa !9
  %36 = icmp ult i64 %34, %35
  br i1 %36, label %40, label %37

37:                                               ; preds = %30
  %38 = load i64, ptr %16, align 8, !tbaa !9
  %39 = icmp eq i64 %38, 0
  br i1 %39, label %40, label %41

40:                                               ; preds = %37, %30
  store i32 -24448, ptr %8, align 4
  store i32 1, ptr %24, align 4
  br label %136

41:                                               ; preds = %37
  %42 = load ptr, ptr %12, align 8, !tbaa !5
  %43 = icmp eq ptr %42, null
  br i1 %43, label %44, label %45

44:                                               ; preds = %41
  store ptr @.str, ptr %12, align 8, !tbaa !5
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %45

45:                                               ; preds = %44, %41
  %46 = load i64, ptr %15, align 8, !tbaa !9
  %47 = load i64, ptr %16, align 8, !tbaa !9
  %48 = udiv i64 %46, %47
  store i64 %48, ptr %18, align 8, !tbaa !9
  %49 = load i64, ptr %15, align 8, !tbaa !9
  %50 = load i64, ptr %16, align 8, !tbaa !9
  %51 = urem i64 %49, %50
  %52 = icmp ne i64 %51, 0
  br i1 %52, label %53, label %56

53:                                               ; preds = %45
  %54 = load i64, ptr %18, align 8, !tbaa !9
  %55 = add i64 %54, 1
  store i64 %55, ptr %18, align 8, !tbaa !9
  br label %56

56:                                               ; preds = %53, %45
  %57 = load i64, ptr %18, align 8, !tbaa !9
  %58 = icmp ugt i64 %57, 255
  br i1 %58, label %59, label %60

59:                                               ; preds = %56
  store i32 -24448, ptr %8, align 4
  store i32 1, ptr %24, align 4
  br label %136

60:                                               ; preds = %56
  call void @mbedtls_md_init(ptr noundef %22)
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  %62 = call i32 @mbedtls_md_setup(ptr noundef %22, ptr noundef %61, i32 noundef 1)
  store i32 %62, ptr %21, align 4, !tbaa !11
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %64, label %65

64:                                               ; preds = %60
  br label %133

65:                                               ; preds = %60
  store i64 1, ptr %20, align 8, !tbaa !9
  br label %66

66:                                               ; preds = %129, %65
  %67 = load i64, ptr %20, align 8, !tbaa !9
  %68 = load i64, ptr %18, align 8, !tbaa !9
  %69 = icmp ule i64 %67, %68
  br i1 %69, label %70, label %132

70:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #4
  %71 = load i64, ptr %20, align 8, !tbaa !9
  %72 = and i64 %71, 255
  %73 = trunc i64 %72 to i8
  store i8 %73, ptr %26, align 1, !tbaa !13
  %74 = load ptr, ptr %10, align 8, !tbaa !5
  %75 = load i64, ptr %11, align 8, !tbaa !9
  %76 = call i32 @mbedtls_md_hmac_starts(ptr noundef %22, ptr noundef %74, i64 noundef %75)
  store i32 %76, ptr %21, align 4, !tbaa !11
  %77 = load i32, ptr %21, align 4, !tbaa !11
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %79, label %80

79:                                               ; preds = %70
  store i32 2, ptr %24, align 4
  br label %126

80:                                               ; preds = %70
  %81 = getelementptr inbounds [64 x i8], ptr %23, i64 0, i64 0
  %82 = load i64, ptr %19, align 8, !tbaa !9
  %83 = call i32 @mbedtls_md_hmac_update(ptr noundef %22, ptr noundef %81, i64 noundef %82)
  store i32 %83, ptr %21, align 4, !tbaa !11
  %84 = load i32, ptr %21, align 4, !tbaa !11
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %86, label %87

86:                                               ; preds = %80
  store i32 2, ptr %24, align 4
  br label %126

87:                                               ; preds = %80
  %88 = load ptr, ptr %12, align 8, !tbaa !5
  %89 = load i64, ptr %13, align 8, !tbaa !9
  %90 = call i32 @mbedtls_md_hmac_update(ptr noundef %22, ptr noundef %88, i64 noundef %89)
  store i32 %90, ptr %21, align 4, !tbaa !11
  %91 = load i32, ptr %21, align 4, !tbaa !11
  %92 = icmp ne i32 %91, 0
  br i1 %92, label %93, label %94

93:                                               ; preds = %87
  store i32 2, ptr %24, align 4
  br label %126

94:                                               ; preds = %87
  %95 = call i32 @mbedtls_md_hmac_update(ptr noundef %22, ptr noundef %26, i64 noundef 1)
  store i32 %95, ptr %21, align 4, !tbaa !11
  %96 = load i32, ptr %21, align 4, !tbaa !11
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %98, label %99

98:                                               ; preds = %94
  store i32 2, ptr %24, align 4
  br label %126

99:                                               ; preds = %94
  %100 = getelementptr inbounds [64 x i8], ptr %23, i64 0, i64 0
  %101 = call i32 @mbedtls_md_hmac_finish(ptr noundef %22, ptr noundef %100)
  store i32 %101, ptr %21, align 4, !tbaa !11
  %102 = load i32, ptr %21, align 4, !tbaa !11
  %103 = icmp ne i32 %102, 0
  br i1 %103, label %104, label %105

104:                                              ; preds = %99
  store i32 2, ptr %24, align 4
  br label %126

105:                                              ; preds = %99
  %106 = load i64, ptr %20, align 8, !tbaa !9
  %107 = load i64, ptr %18, align 8, !tbaa !9
  %108 = icmp ne i64 %106, %107
  br i1 %108, label %109, label %111

109:                                              ; preds = %105
  %110 = load i64, ptr %16, align 8, !tbaa !9
  br label %115

111:                                              ; preds = %105
  %112 = load i64, ptr %15, align 8, !tbaa !9
  %113 = load i64, ptr %17, align 8, !tbaa !9
  %114 = sub i64 %112, %113
  br label %115

115:                                              ; preds = %111, %109
  %116 = phi i64 [ %110, %109 ], [ %114, %111 ]
  store i64 %116, ptr %25, align 8, !tbaa !9
  %117 = load ptr, ptr %14, align 8, !tbaa !5
  %118 = load i64, ptr %17, align 8, !tbaa !9
  %119 = getelementptr inbounds i8, ptr %117, i64 %118
  %120 = getelementptr inbounds [64 x i8], ptr %23, i64 0, i64 0
  %121 = load i64, ptr %25, align 8, !tbaa !9
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %119, ptr align 16 %120, i64 %121, i1 false)
  %122 = load i64, ptr %16, align 8, !tbaa !9
  %123 = load i64, ptr %17, align 8, !tbaa !9
  %124 = add i64 %123, %122
  store i64 %124, ptr %17, align 8, !tbaa !9
  %125 = load i64, ptr %16, align 8, !tbaa !9
  store i64 %125, ptr %19, align 8, !tbaa !9
  store i32 0, ptr %24, align 4
  br label %126

126:                                              ; preds = %115, %104, %98, %93, %86, %79
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  %127 = load i32, ptr %24, align 4
  switch i32 %127, label %136 [
    i32 0, label %128
    i32 2, label %133
  ]

128:                                              ; preds = %126
  br label %129

129:                                              ; preds = %128
  %130 = load i64, ptr %20, align 8, !tbaa !9
  %131 = add i64 %130, 1
  store i64 %131, ptr %20, align 8, !tbaa !9
  br label %66, !llvm.loop !14

132:                                              ; preds = %66
  br label %133

133:                                              ; preds = %132, %126, %64
  call void @mbedtls_md_free(ptr noundef %22)
  %134 = getelementptr inbounds [64 x i8], ptr %23, i64 0, i64 0
  call void @mbedtls_platform_zeroize(ptr noundef %134, i64 noundef 64)
  %135 = load i32, ptr %21, align 4, !tbaa !11
  store i32 %135, ptr %8, align 4
  store i32 1, ptr %24, align 4
  br label %136

136:                                              ; preds = %133, %126, %59, %40, %29
  call void @llvm.lifetime.end.p0(i64 64, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  %137 = load i32, ptr %8, align 4
  ret i32 %137
}

declare zeroext i8 @mbedtls_md_get_size(ptr noundef) #2

declare void @mbedtls_platform_zeroize(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) #0

declare void @mbedtls_md_init(ptr noundef) #2

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

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

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

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

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

declare void @mbedtls_md_free(ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !15}
!15 = !{!"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"

%struct.mbedtls_md_context_t = type { ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [1 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: nounwind uwtable
define dso_local i32 @mbedtls_hkdf_expand(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4, ptr noundef writeonly %5, i64 noundef %6) local_unnamed_addr #1 {
  %8 = alloca %struct.mbedtls_md_context_t, align 8
  %9 = alloca [64 x i8], align 16
  %10 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %9) #4
  %11 = icmp eq ptr %5, null
  br i1 %11, label %52, label %12

12:                                               ; preds = %7
  %13 = tail call zeroext i8 @mbedtls_md_get_size(ptr noundef %0) #4
  %14 = zext i8 %13 to i64
  %15 = icmp ugt i64 %14, %2
  %16 = icmp eq i8 %13, 0
  %or.cond = or i1 %16, %15
  br i1 %or.cond, label %52, label %17

17:                                               ; preds = %12
  %18 = icmp eq ptr %3, null
  %spec.select = select i1 %18, i64 0, i64 %4
  %spec.select71 = select i1 %18, ptr @.str, ptr %3
  %19 = udiv i64 %6, %14
  %20 = urem i64 %6, %14
  %.not = icmp ne i64 %20, 0
  %21 = zext i1 %.not to i64
  %.046 = add i64 %19, %21
  %22 = icmp ugt i64 %.046, 255
  br i1 %22, label %52, label %23

23:                                               ; preds = %17
  call void @mbedtls_md_init(ptr noundef nonnull %8) #4
  %24 = call i32 @mbedtls_md_setup(ptr noundef nonnull %8, ptr noundef %0, i32 noundef 1) #4
  %.not63 = icmp eq i32 %24, 0
  br i1 %.not63, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %23
  %.not6478 = icmp eq i64 %.046, 0
  br i1 %.not6478, label %.loopexit, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %.preheader
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #4
  store i8 1, ptr %10, align 1, !tbaa !5
  %25 = call i32 @mbedtls_md_hmac_starts(ptr noundef nonnull %8, ptr noundef %1, i64 noundef %2) #4
  %.not65.peel = icmp eq i32 %25, 0
  br i1 %.not65.peel, label %26, label %.thread

26:                                               ; preds = %.lr.ph.preheader
  %27 = call i32 @mbedtls_md_hmac_update(ptr noundef nonnull %8, ptr noundef nonnull %9, i64 noundef 0) #4
  %.not66.peel = icmp eq i32 %27, 0
  br i1 %.not66.peel, label %28, label %.thread

28:                                               ; preds = %26
  %29 = call i32 @mbedtls_md_hmac_update(ptr noundef nonnull %8, ptr noundef nonnull %spec.select71, i64 noundef %spec.select) #4
  %.not67.peel = icmp eq i32 %29, 0
  br i1 %.not67.peel, label %30, label %.thread

30:                                               ; preds = %28
  %31 = call i32 @mbedtls_md_hmac_update(ptr noundef nonnull %8, ptr noundef nonnull %10, i64 noundef 1) #4
  %.not68.peel = icmp eq i32 %31, 0
  br i1 %.not68.peel, label %32, label %.thread

32:                                               ; preds = %30
  %33 = call i32 @mbedtls_md_hmac_finish(ptr noundef nonnull %8, ptr noundef nonnull %9) #4
  %.not69.peel = icmp eq i32 %33, 0
  br i1 %.not69.peel, label %34, label %.thread

34:                                               ; preds = %32
  %.not70.peel = icmp eq i64 %.046, 1
  %35 = select i1 %.not70.peel, i64 %6, i64 %14
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %5, ptr nonnull align 16 %9, i64 %35, i1 false)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #4
  %.not64.not.peel.not = icmp eq i64 %.046, 1
  br i1 %.not64.not.peel.not, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %34, %46
  %.04381 = phi i64 [ %51, %46 ], [ 2, %34 ]
  %.04779 = phi i64 [ %50, %46 ], [ %14, %34 ]
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %10) #4
  %36 = trunc i64 %.04381 to i8
  store i8 %36, ptr %10, align 1, !tbaa !5
  %37 = call i32 @mbedtls_md_hmac_starts(ptr noundef nonnull %8, ptr noundef %1, i64 noundef %2) #4
  %.not65 = icmp eq i32 %37, 0
  br i1 %.not65, label %38, label %.thread

38:                                               ; preds = %.lr.ph
  %39 = call i32 @mbedtls_md_hmac_update(ptr noundef nonnull %8, ptr noundef nonnull %9, i64 noundef %14) #4
  %.not66 = icmp eq i32 %39, 0
  br i1 %.not66, label %40, label %.thread

40:                                               ; preds = %38
  %41 = call i32 @mbedtls_md_hmac_update(ptr noundef nonnull %8, ptr noundef nonnull %spec.select71, i64 noundef %spec.select) #4
  %.not67 = icmp eq i32 %41, 0
  br i1 %.not67, label %42, label %.thread

42:                                               ; preds = %40
  %43 = call i32 @mbedtls_md_hmac_update(ptr noundef nonnull %8, ptr noundef nonnull %10, i64 noundef 1) #4
  %.not68 = icmp eq i32 %43, 0
  br i1 %.not68, label %44, label %.thread

44:                                               ; preds = %42
  %45 = call i32 @mbedtls_md_hmac_finish(ptr noundef nonnull %8, ptr noundef nonnull %9) #4
  %.not69 = icmp eq i32 %45, 0
  br i1 %.not69, label %46, label %.thread

.thread:                                          ; preds = %.lr.ph, %38, %40, %42, %44, %32, %30, %28, %26, %.lr.ph.preheader
  %.1.ph = phi i32 [ %25, %.lr.ph.preheader ], [ %27, %26 ], [ %29, %28 ], [ %31, %30 ], [ %33, %32 ], [ %45, %44 ], [ %43, %42 ], [ %41, %40 ], [ %39, %38 ], [ %37, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #4
  br label %.loopexit

46:                                               ; preds = %44
  %.not70 = icmp eq i64 %.04381, %.046
  %47 = sub i64 %6, %.04779
  %48 = select i1 %.not70, i64 %47, i64 %14
  %49 = getelementptr inbounds i8, ptr %5, i64 %.04779
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %49, ptr nonnull align 16 %9, i64 %48, i1 false)
  %50 = add i64 %.04779, %14
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %10) #4
  %51 = add nuw nsw i64 %.04381, 1
  %.not64.not = icmp ult i64 %.04381, %.046
  br i1 %.not64.not, label %.lr.ph, label %.loopexit, !llvm.loop !8

.loopexit:                                        ; preds = %46, %34, %.preheader, %.thread, %23
  %.2 = phi i32 [ %24, %23 ], [ %.1.ph, %.thread ], [ 0, %.preheader ], [ 0, %34 ], [ 0, %46 ]
  call void @mbedtls_md_free(ptr noundef nonnull %8) #4
  call void @mbedtls_platform_zeroize(ptr noundef nonnull %9, i64 noundef 64) #4
  br label %52

52:                                               ; preds = %17, %12, %7, %.loopexit
  %.0 = phi i32 [ %.2, %.loopexit ], [ -24448, %7 ], [ -24448, %12 ], [ -24448, %17 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #4
  ret i32 %.0
}

declare zeroext i8 @mbedtls_md_get_size(ptr noundef) local_unnamed_addr #2

declare void @mbedtls_platform_zeroize(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) #0

declare void @mbedtls_md_init(ptr noundef) local_unnamed_addr #2

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

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

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

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

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

declare void @mbedtls_md_free(ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = distinct !{!8, !9, !10}
!9 = !{!"llvm.loop.mustprogress"}
!10 = !{!"llvm.loop.peeled.count", i32 1}


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