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

; 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 [57 x i8], align 1
@__FUNCTION__.tls_record_get_handshake_certificate_request = external hidden unnamed_addr constant [45 x i8], align 1

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @tls_length_is_zero(i64 noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @tls_record_get_handshake_certificate_request(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #1 {
  %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 i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i64, align 8
  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 8, ptr %15) #4
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = icmp ne ptr %19, null
  br i1 %20, label %21, label %33

21:                                               ; preds = %5
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  %23 = icmp ne ptr %22, null
  br i1 %23, label %24, label %33

24:                                               ; preds = %21
  %25 = load ptr, ptr %9, align 8, !tbaa !5
  %26 = icmp ne ptr %25, null
  br i1 %26, label %27, label %33

27:                                               ; preds = %24
  %28 = load ptr, ptr %10, align 8, !tbaa !5
  %29 = icmp ne ptr %28, null
  br i1 %29, label %30, label %33

30:                                               ; preds = %27
  %31 = load ptr, ptr %11, align 8, !tbaa !5
  %32 = icmp ne ptr %31, null
  br i1 %32, label %39, label %33

33:                                               ; preds = %30, %27, %24, %21, %5
  br label %34

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

37:                                               ; preds = %34
  br label %38

38:                                               ; preds = %37
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %140

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

43:                                               ; preds = %39
  br label %44

44:                                               ; preds = %43
  %45 = load ptr, ptr @stderr, align 8, !tbaa !5
  %46 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %45, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 1109, ptr noundef @__FUNCTION__.tls_record_get_handshake_certificate_request) #4
  br label %47

47:                                               ; preds = %44
  br label %48

48:                                               ; preds = %47
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %140

49:                                               ; preds = %39
  %50 = load i32, ptr %12, align 4, !tbaa !9
  %51 = icmp ne i32 %50, 13
  br i1 %51, label %52, label %58

52:                                               ; preds = %49
  br label %53

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

56:                                               ; preds = %53
  br label %57

57:                                               ; preds = %56
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %140

58:                                               ; preds = %49
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  %61 = call i32 @tls_uint8array_from_bytes(ptr noundef %59, ptr noundef %60, ptr noundef %13, ptr noundef %14)
  %62 = icmp ne i32 %61, 1
  br i1 %62, label %72, label %63

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

68:                                               ; preds = %63
  %69 = load i64, ptr %14, align 8, !tbaa !11
  %70 = call i32 @tls_length_is_zero(i64 noundef %69)
  %71 = icmp ne i32 %70, 1
  br i1 %71, label %72, label %78

72:                                               ; preds = %68, %63, %58
  br label %73

73:                                               ; preds = %72
  %74 = load ptr, ptr @stderr, align 8, !tbaa !5
  %75 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %74, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 1119, ptr noundef @__FUNCTION__.tls_record_get_handshake_certificate_request) #4
  br label %76

76:                                               ; preds = %73
  br label %77

77:                                               ; preds = %76
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %140

78:                                               ; preds = %68
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = icmp eq ptr %80, null
  br i1 %81, label %82, label %88

82:                                               ; preds = %78
  br label %83

83:                                               ; preds = %82
  %84 = load ptr, ptr @stderr, align 8, !tbaa !5
  %85 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %84, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 1124, ptr noundef @__FUNCTION__.tls_record_get_handshake_certificate_request) #4
  br label %86

86:                                               ; preds = %83
  br label %87

87:                                               ; preds = %86
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %140

88:                                               ; preds = %78
  store i64 0, ptr %15, align 8, !tbaa !11
  br label %89

89:                                               ; preds = %110, %88
  %90 = load i64, ptr %15, align 8, !tbaa !11
  %91 = load ptr, ptr %9, align 8, !tbaa !5
  %92 = load i64, ptr %91, align 8, !tbaa !11
  %93 = icmp ult i64 %90, %92
  br i1 %93, label %94, label %113

94:                                               ; preds = %89
  %95 = load ptr, ptr %8, align 8, !tbaa !5
  %96 = load ptr, ptr %95, align 8, !tbaa !5
  %97 = load i64, ptr %15, align 8, !tbaa !11
  %98 = getelementptr inbounds i8, ptr %96, i64 %97
  %99 = load i8, ptr %98, align 1, !tbaa !13
  %100 = zext i8 %99 to i32
  %101 = call ptr @tls_cert_type_name(i32 noundef %100)
  %102 = icmp ne ptr %101, null
  br i1 %102, label %109, label %103

103:                                              ; preds = %94
  br label %104

104:                                              ; preds = %103
  %105 = load ptr, ptr @stderr, align 8, !tbaa !5
  %106 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %105, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 1129, ptr noundef @__FUNCTION__.tls_record_get_handshake_certificate_request) #4
  br label %107

107:                                              ; preds = %104
  br label %108

108:                                              ; preds = %107
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %140

109:                                              ; preds = %94
  br label %110

110:                                              ; preds = %109
  %111 = load i64, ptr %15, align 8, !tbaa !11
  %112 = add i64 %111, 1
  store i64 %112, ptr %15, align 8, !tbaa !11
  br label %89, !llvm.loop !14

113:                                              ; preds = %89
  %114 = load ptr, ptr %10, align 8, !tbaa !5
  %115 = load ptr, ptr %114, align 8, !tbaa !5
  %116 = icmp ne ptr %115, null
  br i1 %116, label %117, label %139

117:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %118 = load ptr, ptr %10, align 8, !tbaa !5
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  store ptr %119, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %120 = load ptr, ptr %11, align 8, !tbaa !5
  %121 = load i64, ptr %120, align 8, !tbaa !11
  store i64 %121, ptr %18, align 8, !tbaa !11
  br label %122

122:                                              ; preds = %134, %117
  %123 = load i64, ptr %18, align 8, !tbaa !11
  %124 = icmp ne i64 %123, 0
  br i1 %124, label %125, label %135

125:                                              ; preds = %122
  %126 = call i32 @tls_uint16array_from_bytes(ptr noundef %13, ptr noundef %14, ptr noundef %17, ptr noundef %18)
  %127 = icmp ne i32 %126, 1
  br i1 %127, label %128, label %134

128:                                              ; preds = %125
  br label %129

129:                                              ; preds = %128
  %130 = load ptr, ptr @stderr, align 8, !tbaa !5
  %131 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %130, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 1138, ptr noundef @__FUNCTION__.tls_record_get_handshake_certificate_request) #4
  br label %132

132:                                              ; preds = %129
  br label %133

133:                                              ; preds = %132
  store i32 -1, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %136

134:                                              ; preds = %125
  br label %122, !llvm.loop !16

135:                                              ; preds = %122
  store i32 0, ptr %16, align 4
  br label %136

136:                                              ; preds = %135, %133
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  %137 = load i32, ptr %16, align 4
  switch i32 %137, label %140 [
    i32 0, label %138
  ]

138:                                              ; preds = %136
  br label %139

139:                                              ; preds = %138, %113
  store i32 1, ptr %6, align 4
  store i32 1, ptr %16, align 4
  br label %140

140:                                              ; preds = %139, %136, %108, %87, %77, %57, %48, %38
  call void @llvm.lifetime.end.p0(i64 8, 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
  %141 = load i32, ptr %6, align 4
  ret i32 %141
}

declare ptr @tls_cert_type_name(i32 noundef) #3

attributes #0 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !15}


; 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 [57 x i8], align 1
@__FUNCTION__.tls_record_get_handshake_certificate_request = external hidden unnamed_addr constant [45 x i8], align 1

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @tls_length_is_zero(i64 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 2) i32 @tls_record_get_handshake_certificate_request(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #1 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  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
  %11 = insertelement <4 x ptr> poison, ptr %0, i64 0
  %12 = insertelement <4 x ptr> %11, ptr %1, i64 1
  %13 = insertelement <4 x ptr> %12, ptr %2, i64 2
  %14 = insertelement <4 x ptr> %13, ptr %3, i64 3
  %15 = icmp ne ptr %4, null
  %16 = icmp eq <4 x ptr> %14, zeroinitializer
  %17 = bitcast <4 x i1> %16 to i4
  %18 = icmp eq i4 %17, 0
  %op.rdx = and i1 %18, %15
  br i1 %op.rdx, label %22, label %19

19:                                               ; preds = %5
  %20 = load ptr, ptr @stderr, align 8, !tbaa !5
  %21 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 1105, ptr noundef nonnull @__FUNCTION__.tls_record_get_handshake_certificate_request) #5
  br label %68

22:                                               ; preds = %5
  %23 = call i32 @tls_record_get_handshake(ptr noundef nonnull %0, ptr noundef nonnull %6, ptr noundef nonnull %7, ptr noundef nonnull %8)
  %.not = icmp eq i32 %23, 1
  br i1 %.not, label %27, label %24

24:                                               ; preds = %22
  %25 = load ptr, ptr @stderr, align 8, !tbaa !5
  %26 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 1109, ptr noundef nonnull @__FUNCTION__.tls_record_get_handshake_certificate_request) #5
  br label %68

27:                                               ; preds = %22
  %28 = load i32, ptr %6, align 4, !tbaa !9
  %.not33 = icmp eq i32 %28, 13
  br i1 %.not33, label %32, label %29

29:                                               ; preds = %27
  %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 1113, ptr noundef nonnull @__FUNCTION__.tls_record_get_handshake_certificate_request) #5
  br label %68

32:                                               ; preds = %27
  %33 = call i32 @tls_uint8array_from_bytes(ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef nonnull %7, ptr noundef nonnull %8)
  %.not34 = icmp eq i32 %33, 1
  br i1 %.not34, label %34, label %39

34:                                               ; preds = %32
  %35 = call i32 @tls_uint16array_from_bytes(ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef nonnull %7, ptr noundef nonnull %8)
  %.not35 = icmp eq i32 %35, 1
  br i1 %.not35, label %36, label %39

36:                                               ; preds = %34
  %37 = load i64, ptr %8, align 8, !tbaa !11
  %38 = call i32 @tls_length_is_zero(i64 noundef %37)
  %.not36 = icmp eq i32 %38, 1
  br i1 %.not36, label %42, label %39

39:                                               ; preds = %32, %34, %36
  %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 1119, ptr noundef nonnull @__FUNCTION__.tls_record_get_handshake_certificate_request) #5
  br label %68

42:                                               ; preds = %36
  %43 = load ptr, ptr %1, align 8, !tbaa !5
  %44 = icmp eq ptr %43, null
  br i1 %44, label %46, label %.preheader

.preheader:                                       ; preds = %42
  %45 = load i64, ptr %2, align 8, !tbaa !11
  %.not45 = icmp eq i64 %45, 0
  br i1 %.not45, label %._crit_edge, label %.lr.ph

46:                                               ; preds = %42
  %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 1124, ptr noundef nonnull @__FUNCTION__.tls_record_get_handshake_certificate_request) #5
  br label %68

49:                                               ; preds = %.lr.ph
  %50 = add nuw i64 %.02741, 1
  %51 = load i64, ptr %2, align 8, !tbaa !11
  %52 = icmp ult i64 %50, %51
  br i1 %52, label %.lr.ph, label %._crit_edge, !llvm.loop !13

.lr.ph:                                           ; preds = %.preheader, %49
  %.02741 = phi i64 [ %50, %49 ], [ 0, %.preheader ]
  %53 = load ptr, ptr %1, align 8, !tbaa !5
  %54 = getelementptr inbounds i8, ptr %53, i64 %.02741
  %55 = load i8, ptr %54, align 1, !tbaa !15
  %56 = zext i8 %55 to i32
  %57 = call ptr @tls_cert_type_name(i32 noundef %56) #4
  %.not40 = icmp eq ptr %57, null
  br i1 %.not40, label %58, label %49

58:                                               ; preds = %.lr.ph
  %59 = load ptr, ptr @stderr, align 8, !tbaa !5
  %60 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %59, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 1129, ptr noundef nonnull @__FUNCTION__.tls_record_get_handshake_certificate_request) #5
  br label %68

._crit_edge:                                      ; preds = %49, %.preheader
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %.not37 = icmp eq ptr %61, null
  br i1 %.not37, label %68, label %62

62:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  store ptr %61, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  %63 = load i64, ptr %4, align 8, !tbaa !11
  store i64 %63, ptr %10, align 8, !tbaa !11
  %.not3842 = icmp eq i64 %63, 0
  br i1 %.not3842, label %.critedge, label %.lr.ph44

thread-pre-split:                                 ; preds = %.lr.ph44
  %.pr = load i64, ptr %10, align 8, !tbaa !11
  %.not38 = icmp eq i64 %.pr, 0
  br i1 %.not38, label %.critedge, label %.lr.ph44

.lr.ph44:                                         ; preds = %62, %thread-pre-split
  %64 = call i32 @tls_uint16array_from_bytes(ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10)
  %.not39 = icmp eq i32 %64, 1
  br i1 %.not39, label %thread-pre-split, label %65, !llvm.loop !16

65:                                               ; preds = %.lr.ph44
  %66 = load ptr, ptr @stderr, align 8, !tbaa !5
  %67 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %66, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 1138, ptr noundef nonnull @__FUNCTION__.tls_record_get_handshake_certificate_request) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  br label %68

.critedge:                                        ; preds = %thread-pre-split, %62
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  br label %68

68:                                               ; preds = %._crit_edge, %.critedge, %65, %58, %46, %39, %29, %24, %19
  %.1 = phi i32 [ -1, %24 ], [ -1, %29 ], [ -1, %39 ], [ -1, %46 ], [ -1, %58 ], [ -1, %65 ], [ -1, %19 ], [ 1, %.critedge ], [ 1, %._crit_edge ]
  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 %.1
}

declare ptr @tls_cert_type_name(i32 noundef) local_unnamed_addr #3

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


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