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

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

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [59 x i8], align 1
@__FUNCTION__.tls_record_get_handshake_server_key_exchange_ecdhe = external hidden unnamed_addr constant [51 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
declare i32 @fprintf(ptr noundef, ptr 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 @tls_record_get_handshake_server_key_exchange_ecdhe(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #2 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i8, align 1
  %16 = alloca i16, align 2
  %17 = alloca ptr, align 8
  %18 = alloca i64, align 8
  %19 = alloca i16, align 2
  %20 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 2, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 2, ptr %19) #4
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = icmp ne ptr %21, null
  br i1 %22, label %23, label %35

23:                                               ; preds = %5
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %26, label %35

26:                                               ; preds = %23
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %35

29:                                               ; preds = %26
  %30 = load ptr, ptr %10, align 8, !tbaa !5
  %31 = icmp ne ptr %30, null
  br i1 %31, label %32, label %35

32:                                               ; preds = %29
  %33 = load ptr, ptr %11, align 8, !tbaa !5
  %34 = icmp ne ptr %33, null
  br i1 %34, label %41, label %35

35:                                               ; preds = %32, %29, %26, %23, %5
  br label %36

36:                                               ; preds = %35
  %37 = load ptr, ptr @stderr, align 8, !tbaa !5
  %38 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 84, ptr noundef @__FUNCTION__.tls_record_get_handshake_server_key_exchange_ecdhe) #4
  br label %39

39:                                               ; preds = %36
  br label %40

40:                                               ; preds = %39
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %130

41:                                               ; preds = %32
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = call i32 @tls_record_get_handshake(ptr noundef %42, ptr noundef %12, ptr noundef %13, ptr noundef %14)
  %44 = icmp ne i32 %43, 1
  br i1 %44, label %48, label %45

45:                                               ; preds = %41
  %46 = load i32, ptr %12, align 4, !tbaa !9
  %47 = icmp ne i32 %46, 12
  br i1 %47, label %48, label %54

48:                                               ; preds = %45, %41
  br label %49

49:                                               ; preds = %48
  %50 = load ptr, ptr @stderr, align 8, !tbaa !5
  %51 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %50, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 89, ptr noundef @__FUNCTION__.tls_record_get_handshake_server_key_exchange_ecdhe) #4
  br label %52

52:                                               ; preds = %49
  br label %53

53:                                               ; preds = %52
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %130

54:                                               ; preds = %45
  %55 = call i32 @tls_uint8_from_bytes(ptr noundef %15, ptr noundef %13, ptr noundef %14)
  %56 = icmp ne i32 %55, 1
  br i1 %56, label %75, label %57

57:                                               ; preds = %54
  %58 = call i32 @tls_uint16_from_bytes(ptr noundef %16, ptr noundef %13, ptr noundef %14)
  %59 = icmp ne i32 %58, 1
  br i1 %59, label %75, label %60

60:                                               ; preds = %57
  %61 = call i32 @tls_uint8array_from_bytes(ptr noundef %17, ptr noundef %18, ptr noundef %13, ptr noundef %14)
  %62 = icmp ne i32 %61, 1
  br i1 %62, label %75, label %63

63:                                               ; preds = %60
  %64 = call i32 @tls_uint16_from_bytes(ptr noundef %19, ptr noundef %13, ptr noundef %14)
  %65 = icmp ne i32 %64, 1
  br i1 %65, label %75, label %66

66:                                               ; preds = %63
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  %68 = load ptr, ptr %11, align 8, !tbaa !5
  %69 = call i32 @tls_uint16array_from_bytes(ptr noundef %67, ptr noundef %68, ptr noundef %13, ptr noundef %14)
  %70 = icmp ne i32 %69, 1
  br i1 %70, label %75, label %71

71:                                               ; preds = %66
  %72 = load i64, ptr %14, align 8, !tbaa !11
  %73 = call i32 @tls_length_is_zero(i64 noundef %72)
  %74 = icmp ne i32 %73, 1
  br i1 %74, label %75, label %81

75:                                               ; preds = %71, %66, %63, %60, %57, %54
  br label %76

76:                                               ; preds = %75
  %77 = load ptr, ptr @stderr, align 8, !tbaa !5
  %78 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %77, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 98, ptr noundef @__FUNCTION__.tls_record_get_handshake_server_key_exchange_ecdhe) #4
  br label %79

79:                                               ; preds = %76
  br label %80

80:                                               ; preds = %79
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %130

81:                                               ; preds = %71
  %82 = load i8, ptr %15, align 1, !tbaa !13
  %83 = zext i8 %82 to i32
  %84 = icmp ne i32 %83, 3
  br i1 %84, label %85, label %91

85:                                               ; preds = %81
  br label %86

86:                                               ; preds = %85
  %87 = load ptr, ptr @stderr, align 8, !tbaa !5
  %88 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %87, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 102, ptr noundef @__FUNCTION__.tls_record_get_handshake_server_key_exchange_ecdhe) #4
  br label %89

89:                                               ; preds = %86
  br label %90

90:                                               ; preds = %89
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %130

91:                                               ; preds = %81
  %92 = load i16, ptr %16, align 2, !tbaa !14
  %93 = zext i16 %92 to i32
  %94 = icmp ne i32 %93, 41
  br i1 %94, label %95, label %101

95:                                               ; preds = %91
  br label %96

96:                                               ; preds = %95
  %97 = load ptr, ptr @stderr, align 8, !tbaa !5
  %98 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %97, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 106, ptr noundef @__FUNCTION__.tls_record_get_handshake_server_key_exchange_ecdhe) #4
  br label %99

99:                                               ; preds = %96
  br label %100

100:                                              ; preds = %99
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %130

101:                                              ; preds = %91
  %102 = load i16, ptr %16, align 2, !tbaa !14
  %103 = zext i16 %102 to i32
  %104 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %103, ptr %104, align 4, !tbaa !9
  %105 = load i64, ptr %18, align 8, !tbaa !11
  %106 = icmp ne i64 %105, 65
  br i1 %106, label %113, label %107

107:                                              ; preds = %101
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  %109 = load ptr, ptr %17, align 8, !tbaa !5
  %110 = load i64, ptr %18, align 8, !tbaa !11
  %111 = call i32 @sm2_z256_point_from_octets(ptr noundef %108, ptr noundef %109, i64 noundef %110)
  %112 = icmp ne i32 %111, 1
  br i1 %112, label %113, label %119

113:                                              ; preds = %107, %101
  br label %114

114:                                              ; preds = %113
  %115 = load ptr, ptr @stderr, align 8, !tbaa !5
  %116 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %115, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 112, ptr noundef @__FUNCTION__.tls_record_get_handshake_server_key_exchange_ecdhe) #4
  br label %117

117:                                              ; preds = %114
  br label %118

118:                                              ; preds = %117
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %130

119:                                              ; preds = %107
  %120 = load i16, ptr %19, align 2, !tbaa !14
  %121 = zext i16 %120 to i32
  %122 = icmp ne i32 %121, 1800
  br i1 %122, label %123, label %129

123:                                              ; preds = %119
  br label %124

124:                                              ; preds = %123
  %125 = load ptr, ptr @stderr, align 8, !tbaa !5
  %126 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %125, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 116, ptr noundef @__FUNCTION__.tls_record_get_handshake_server_key_exchange_ecdhe) #4
  br label %127

127:                                              ; preds = %124
  br label %128

128:                                              ; preds = %127
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %130

129:                                              ; preds = %119
  store i32 1, ptr %6, align 4
  store i32 1, ptr %20, align 4
  br label %130

130:                                              ; preds = %129, %128, %118, %100, %90, %80, %53, %40
  call void @llvm.lifetime.end.p0(i64 2, 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 2, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  %131 = load i32, ptr %6, align 4
  ret i32 %131
}

declare i32 @tls_record_get_handshake(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @tls_uint8_from_bytes(ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @tls_uint16_from_bytes(ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @tls_uint8array_from_bytes(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @tls_uint16array_from_bytes(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @tls_length_is_zero(i64 noundef) #3

declare i32 @sm2_z256_point_from_octets(ptr noundef, ptr noundef, i64 noundef) #3

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

!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, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"short", !7, i64 0}


; 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 [59 x i8], align 1
@__FUNCTION__.tls_record_get_handshake_server_key_exchange_ecdhe = external hidden unnamed_addr constant [51 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: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) 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 range(i32 -1, 2) i32 @tls_record_get_handshake_server_key_exchange_ecdhe(ptr noundef %0, ptr noundef writeonly %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #2 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i8, align 1
  %10 = alloca i16, align 2
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i16, align 2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %13) #4
  %14 = insertelement <4 x ptr> poison, ptr %0, i64 0
  %15 = insertelement <4 x ptr> %14, ptr %1, i64 1
  %16 = insertelement <4 x ptr> %15, ptr %2, i64 2
  %17 = insertelement <4 x ptr> %16, ptr %3, i64 3
  %18 = icmp ne ptr %4, null
  %19 = icmp eq <4 x ptr> %17, zeroinitializer
  %20 = bitcast <4 x i1> %19 to i4
  %21 = icmp eq i4 %20, 0
  %op.rdx = and i1 %21, %18
  br i1 %op.rdx, label %25, label %22

22:                                               ; preds = %5
  %23 = load ptr, ptr @stderr, align 8, !tbaa !5
  %24 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 84, ptr noundef nonnull @__FUNCTION__.tls_record_get_handshake_server_key_exchange_ecdhe) #5
  br label %72

25:                                               ; preds = %5
  %26 = call i32 @tls_record_get_handshake(ptr noundef nonnull %0, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8) #4
  %27 = icmp ne i32 %26, 1
  %28 = load i32, ptr %6, align 4
  %29 = icmp ne i32 %28, 12
  %or.cond9 = select i1 %27, i1 true, i1 %29
  br i1 %or.cond9, label %30, label %33

30:                                               ; preds = %25
  %31 = load ptr, ptr @stderr, align 8, !tbaa !5
  %32 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 89, ptr noundef nonnull @__FUNCTION__.tls_record_get_handshake_server_key_exchange_ecdhe) #5
  br label %72

33:                                               ; preds = %25
  %34 = call i32 @tls_uint8_from_bytes(ptr noundef nonnull %9, ptr noundef nonnull %7, ptr noundef nonnull %8) #4
  %.not = icmp eq i32 %34, 1
  br i1 %.not, label %35, label %46

35:                                               ; preds = %33
  %36 = call i32 @tls_uint16_from_bytes(ptr noundef nonnull %10, ptr noundef nonnull %7, ptr noundef nonnull %8) #4
  %.not25 = icmp eq i32 %36, 1
  br i1 %.not25, label %37, label %46

37:                                               ; preds = %35
  %38 = call i32 @tls_uint8array_from_bytes(ptr noundef nonnull %11, ptr noundef nonnull %12, ptr noundef nonnull %7, ptr noundef nonnull %8) #4
  %.not26 = icmp eq i32 %38, 1
  br i1 %.not26, label %39, label %46

39:                                               ; preds = %37
  %40 = call i32 @tls_uint16_from_bytes(ptr noundef nonnull %13, ptr noundef nonnull %7, ptr noundef nonnull %8) #4
  %.not27 = icmp eq i32 %40, 1
  br i1 %.not27, label %41, label %46

41:                                               ; preds = %39
  %42 = call i32 @tls_uint16array_from_bytes(ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef nonnull %7, ptr noundef nonnull %8) #4
  %.not28 = icmp eq i32 %42, 1
  br i1 %.not28, label %43, label %46

43:                                               ; preds = %41
  %44 = load i64, ptr %8, align 8, !tbaa !9
  %45 = call i32 @tls_length_is_zero(i64 noundef %44) #4
  %.not29 = icmp eq i32 %45, 1
  br i1 %.not29, label %49, label %46

46:                                               ; preds = %33, %35, %37, %39, %41, %43
  %47 = load ptr, ptr @stderr, align 8, !tbaa !5
  %48 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %47, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 98, ptr noundef nonnull @__FUNCTION__.tls_record_get_handshake_server_key_exchange_ecdhe) #5
  br label %72

49:                                               ; preds = %43
  %50 = load i8, ptr %9, align 1, !tbaa !11
  %.not30 = icmp eq i8 %50, 3
  br i1 %.not30, label %54, label %51

51:                                               ; preds = %49
  %52 = load ptr, ptr @stderr, align 8, !tbaa !5
  %53 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %52, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 102, ptr noundef nonnull @__FUNCTION__.tls_record_get_handshake_server_key_exchange_ecdhe) #5
  br label %72

54:                                               ; preds = %49
  %55 = load i16, ptr %10, align 2, !tbaa !12
  %.not31 = icmp eq i16 %55, 41
  br i1 %.not31, label %59, label %56

56:                                               ; preds = %54
  %57 = load ptr, ptr @stderr, align 8, !tbaa !5
  %58 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 106, ptr noundef nonnull @__FUNCTION__.tls_record_get_handshake_server_key_exchange_ecdhe) #5
  br label %72

59:                                               ; preds = %54
  store i32 41, ptr %1, align 4, !tbaa !14
  %60 = load i64, ptr %12, align 8, !tbaa !9
  %.not32 = icmp eq i64 %60, 65
  br i1 %.not32, label %61, label %64

61:                                               ; preds = %59
  %62 = load ptr, ptr %11, align 8, !tbaa !5
  %63 = call i32 @sm2_z256_point_from_octets(ptr noundef nonnull %2, ptr noundef %62, i64 noundef 65) #4
  %.not33 = icmp eq i32 %63, 1
  br i1 %.not33, label %67, label %64

64:                                               ; preds = %59, %61
  %65 = load ptr, ptr @stderr, align 8, !tbaa !5
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 112, ptr noundef nonnull @__FUNCTION__.tls_record_get_handshake_server_key_exchange_ecdhe) #5
  br label %72

67:                                               ; preds = %61
  %68 = load i16, ptr %13, align 2, !tbaa !12
  %.not34 = icmp eq i16 %68, 1800
  br i1 %.not34, label %72, label %69

69:                                               ; preds = %67
  %70 = load ptr, ptr @stderr, align 8, !tbaa !5
  %71 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %70, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 116, ptr noundef nonnull @__FUNCTION__.tls_record_get_handshake_server_key_exchange_ecdhe) #5
  br label %72

72:                                               ; preds = %67, %69, %64, %56, %51, %46, %30, %22
  %.0 = phi i32 [ -1, %30 ], [ -1, %46 ], [ -1, %51 ], [ -1, %56 ], [ -1, %64 ], [ -1, %69 ], [ -1, %22 ], [ 1, %67 ]
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #4
  ret i32 %.0
}

declare i32 @tls_record_get_handshake(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @tls_uint8_from_bytes(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @tls_uint16_from_bytes(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @tls_uint8array_from_bytes(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @tls_uint16array_from_bytes(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @tls_length_is_zero(i64 noundef) local_unnamed_addr #3

declare i32 @sm2_z256_point_from_octets(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #3

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


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