; 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_client_hello = external hidden unnamed_addr constant [38 x i8], align 1

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

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

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

; 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

declare ptr @tls_protocol_name(i32 noundef) #3

; 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_client_hello(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) #1 {
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca i64, align 8
  %23 = alloca i16, align 2
  %24 = alloca ptr, align 8
  %25 = alloca i64, align 8
  %26 = alloca i32, align 4
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store ptr %2, ptr %13, align 8, !tbaa !5
  store ptr %3, ptr %14, align 8, !tbaa !5
  store ptr %4, ptr %15, align 8, !tbaa !5
  store ptr %5, ptr %16, align 8, !tbaa !5
  store ptr %6, ptr %17, align 8, !tbaa !5
  store ptr %7, ptr %18, align 8, !tbaa !5
  store ptr %8, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 2, ptr %23) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #4
  %27 = load ptr, ptr %11, align 8, !tbaa !5
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %53

29:                                               ; preds = %9
  %30 = load ptr, ptr %12, align 8, !tbaa !5
  %31 = icmp ne ptr %30, null
  br i1 %31, label %32, label %53

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

35:                                               ; preds = %32
  %36 = load ptr, ptr %14, align 8, !tbaa !5
  %37 = icmp ne ptr %36, null
  br i1 %37, label %38, label %53

38:                                               ; preds = %35
  %39 = load ptr, ptr %15, align 8, !tbaa !5
  %40 = icmp ne ptr %39, null
  br i1 %40, label %41, label %53

41:                                               ; preds = %38
  %42 = load ptr, ptr %16, align 8, !tbaa !5
  %43 = icmp ne ptr %42, null
  br i1 %43, label %44, label %53

44:                                               ; preds = %41
  %45 = load ptr, ptr %17, align 8, !tbaa !5
  %46 = icmp ne ptr %45, null
  br i1 %46, label %47, label %53

47:                                               ; preds = %44
  %48 = load ptr, ptr %18, align 8, !tbaa !5
  %49 = icmp ne ptr %48, null
  br i1 %49, label %50, label %53

50:                                               ; preds = %47
  %51 = load ptr, ptr %19, align 8, !tbaa !5
  %52 = icmp ne ptr %51, null
  br i1 %52, label %59, label %53

53:                                               ; preds = %50, %47, %44, %41, %38, %35, %32, %29, %9
  br label %54

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

57:                                               ; preds = %54
  br label %58

58:                                               ; preds = %57
  store i32 -1, ptr %10, align 4
  store i32 1, ptr %26, align 4
  br label %199

59:                                               ; preds = %50
  %60 = load ptr, ptr %11, align 8, !tbaa !5
  %61 = call i32 @tls_record_get_handshake(ptr noundef %60, ptr noundef %20, ptr noundef %21, ptr noundef %22)
  %62 = icmp ne i32 %61, 1
  br i1 %62, label %63, label %69

63:                                               ; preds = %59
  br label %64

64:                                               ; preds = %63
  %65 = load ptr, ptr @stderr, align 8, !tbaa !5
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %65, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 782, ptr noundef @__FUNCTION__.tls_record_get_handshake_client_hello) #4
  br label %67

67:                                               ; preds = %64
  br label %68

68:                                               ; preds = %67
  store i32 -1, ptr %10, align 4
  store i32 1, ptr %26, align 4
  br label %199

69:                                               ; preds = %59
  %70 = load i32, ptr %20, align 4, !tbaa !9
  %71 = icmp ne i32 %70, 1
  br i1 %71, label %72, label %78

72:                                               ; preds = %69
  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 786, ptr noundef @__FUNCTION__.tls_record_get_handshake_client_hello) #4
  br label %76

76:                                               ; preds = %73
  br label %77

77:                                               ; preds = %76
  store i32 -1, ptr %10, align 4
  store i32 1, ptr %26, align 4
  br label %199

78:                                               ; preds = %69
  %79 = call i32 @tls_uint16_from_bytes(ptr noundef %23, ptr noundef %21, ptr noundef %22)
  %80 = icmp ne i32 %79, 1
  br i1 %80, label %98, label %81

81:                                               ; preds = %78
  %82 = load ptr, ptr %13, align 8, !tbaa !5
  %83 = call i32 @tls_array_from_bytes(ptr noundef %82, i64 noundef 32, ptr noundef %21, ptr noundef %22)
  %84 = icmp ne i32 %83, 1
  br i1 %84, label %98, label %85

85:                                               ; preds = %81
  %86 = load ptr, ptr %14, align 8, !tbaa !5
  %87 = load ptr, ptr %15, align 8, !tbaa !5
  %88 = call i32 @tls_uint8array_from_bytes(ptr noundef %86, ptr noundef %87, ptr noundef %21, ptr noundef %22)
  %89 = icmp ne i32 %88, 1
  br i1 %89, label %98, label %90

90:                                               ; preds = %85
  %91 = load ptr, ptr %16, align 8, !tbaa !5
  %92 = load ptr, ptr %17, align 8, !tbaa !5
  %93 = call i32 @tls_uint16array_from_bytes(ptr noundef %91, ptr noundef %92, ptr noundef %21, ptr noundef %22)
  %94 = icmp ne i32 %93, 1
  br i1 %94, label %98, label %95

95:                                               ; preds = %90
  %96 = call i32 @tls_uint8array_from_bytes(ptr noundef %24, ptr noundef %25, ptr noundef %21, ptr noundef %22)
  %97 = icmp ne i32 %96, 1
  br i1 %97, label %98, label %104

98:                                               ; preds = %95, %90, %85, %81, %78
  br label %99

99:                                               ; preds = %98
  %100 = load ptr, ptr @stderr, align 8, !tbaa !5
  %101 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %100, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 794, ptr noundef @__FUNCTION__.tls_record_get_handshake_client_hello) #4
  br label %102

102:                                              ; preds = %99
  br label %103

103:                                              ; preds = %102
  store i32 -1, ptr %10, align 4
  store i32 1, ptr %26, align 4
  br label %199

104:                                              ; preds = %95
  %105 = load i16, ptr %23, align 2, !tbaa !11
  %106 = zext i16 %105 to i32
  %107 = call ptr @tls_protocol_name(i32 noundef %106)
  %108 = icmp ne ptr %107, null
  br i1 %108, label %115, label %109

109:                                              ; preds = %104
  br label %110

110:                                              ; preds = %109
  %111 = load ptr, ptr @stderr, align 8, !tbaa !5
  %112 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %111, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 799, ptr noundef @__FUNCTION__.tls_record_get_handshake_client_hello) #4
  br label %113

113:                                              ; preds = %110
  br label %114

114:                                              ; preds = %113
  store i32 -1, ptr %10, align 4
  store i32 1, ptr %26, align 4
  br label %199

115:                                              ; preds = %104
  %116 = load i16, ptr %23, align 2, !tbaa !11
  %117 = zext i16 %116 to i32
  %118 = load ptr, ptr %12, align 8, !tbaa !5
  store i32 %117, ptr %118, align 4, !tbaa !9
  %119 = load ptr, ptr %14, align 8, !tbaa !5
  %120 = load ptr, ptr %119, align 8, !tbaa !5
  %121 = icmp ne ptr %120, null
  br i1 %121, label %122, label %141

122:                                              ; preds = %115
  %123 = load ptr, ptr %15, align 8, !tbaa !5
  %124 = load i64, ptr %123, align 8, !tbaa !13
  %125 = icmp eq i64 %124, 0
  br i1 %125, label %134, label %126

126:                                              ; preds = %122
  %127 = load ptr, ptr %15, align 8, !tbaa !5
  %128 = load i64, ptr %127, align 8, !tbaa !13
  %129 = icmp ult i64 %128, 0
  br i1 %129, label %134, label %130

130:                                              ; preds = %126
  %131 = load ptr, ptr %15, align 8, !tbaa !5
  %132 = load i64, ptr %131, align 8, !tbaa !13
  %133 = icmp ugt i64 %132, 32
  br i1 %133, label %134, label %140

134:                                              ; preds = %130, %126, %122
  br label %135

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

138:                                              ; preds = %135
  br label %139

139:                                              ; preds = %138
  store i32 -1, ptr %10, align 4
  store i32 1, ptr %26, align 4
  br label %199

140:                                              ; preds = %130
  br label %141

141:                                              ; preds = %140, %115
  %142 = load ptr, ptr %16, align 8, !tbaa !5
  %143 = icmp ne ptr %142, null
  br i1 %143, label %150, label %144

144:                                              ; preds = %141
  br label %145

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

148:                                              ; preds = %145
  br label %149

149:                                              ; preds = %148
  store i32 -1, ptr %10, align 4
  store i32 1, ptr %26, align 4
  br label %199

150:                                              ; preds = %141
  %151 = load ptr, ptr %17, align 8, !tbaa !5
  %152 = load i64, ptr %151, align 8, !tbaa !13
  %153 = urem i64 %152, 2
  %154 = icmp ne i64 %153, 0
  br i1 %154, label %155, label %161

155:                                              ; preds = %150
  br label %156

156:                                              ; preds = %155
  %157 = load ptr, ptr @stderr, align 8, !tbaa !5
  %158 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %157, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 818, ptr noundef @__FUNCTION__.tls_record_get_handshake_client_hello) #4
  br label %159

159:                                              ; preds = %156
  br label %160

160:                                              ; preds = %159
  store i32 -1, ptr %10, align 4
  store i32 1, ptr %26, align 4
  br label %199

161:                                              ; preds = %150
  %162 = load i64, ptr %22, align 8, !tbaa !13
  %163 = icmp ne i64 %162, 0
  br i1 %163, label %164, label %186

164:                                              ; preds = %161
  %165 = load ptr, ptr %18, align 8, !tbaa !5
  %166 = load ptr, ptr %19, align 8, !tbaa !5
  %167 = call i32 @tls_uint16array_from_bytes(ptr noundef %165, ptr noundef %166, ptr noundef %21, ptr noundef %22)
  %168 = icmp ne i32 %167, 1
  br i1 %168, label %169, label %175

169:                                              ; preds = %164
  br label %170

170:                                              ; preds = %169
  %171 = load ptr, ptr @stderr, align 8, !tbaa !5
  %172 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %171, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 824, ptr noundef @__FUNCTION__.tls_record_get_handshake_client_hello) #4
  br label %173

173:                                              ; preds = %170
  br label %174

174:                                              ; preds = %173
  store i32 -1, ptr %10, align 4
  store i32 1, ptr %26, align 4
  br label %199

175:                                              ; preds = %164
  %176 = load ptr, ptr %18, align 8, !tbaa !5
  %177 = load ptr, ptr %176, align 8, !tbaa !5
  %178 = icmp eq ptr %177, null
  br i1 %178, label %179, label %185

179:                                              ; preds = %175
  br label %180

180:                                              ; preds = %179
  %181 = load ptr, ptr @stderr, align 8, !tbaa !5
  %182 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %181, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 828, ptr noundef @__FUNCTION__.tls_record_get_handshake_client_hello) #4
  br label %183

183:                                              ; preds = %180
  br label %184

184:                                              ; preds = %183
  store i32 -1, ptr %10, align 4
  store i32 1, ptr %26, align 4
  br label %199

185:                                              ; preds = %175
  br label %189

186:                                              ; preds = %161
  %187 = load ptr, ptr %18, align 8, !tbaa !5
  store ptr null, ptr %187, align 8, !tbaa !5
  %188 = load ptr, ptr %19, align 8, !tbaa !5
  store i64 0, ptr %188, align 8, !tbaa !13
  br label %189

189:                                              ; preds = %186, %185
  %190 = load i64, ptr %22, align 8, !tbaa !13
  %191 = icmp ne i64 %190, 0
  br i1 %191, label %192, label %198

192:                                              ; preds = %189
  br label %193

193:                                              ; preds = %192
  %194 = load ptr, ptr @stderr, align 8, !tbaa !5
  %195 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %194, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 836, ptr noundef @__FUNCTION__.tls_record_get_handshake_client_hello) #4
  br label %196

196:                                              ; preds = %193
  br label %197

197:                                              ; preds = %196
  store i32 -1, ptr %10, align 4
  store i32 1, ptr %26, align 4
  br label %199

198:                                              ; preds = %189
  store i32 1, ptr %10, align 4
  store i32 1, ptr %26, align 4
  br label %199

199:                                              ; preds = %198, %197, %184, %174, %160, %149, %139, %114, %103, %77, %68, %58
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 2, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #4
  %200 = load i32, ptr %10, align 4
  ret i32 %200
}

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 = !{!"short", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !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 [57 x i8], align 1
@__FUNCTION__.tls_record_get_handshake_client_hello = external hidden unnamed_addr constant [38 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_uint16_from_bytes(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

; 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

declare ptr @tls_protocol_name(i32 noundef) local_unnamed_addr #3

; 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_client_hello(ptr noundef %0, ptr noundef writeonly %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) local_unnamed_addr #1 {
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca i16, align 2
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 4, 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
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #4
  %16 = insertelement <8 x ptr> poison, ptr %0, i64 0
  %17 = insertelement <8 x ptr> %16, ptr %1, i64 1
  %18 = insertelement <8 x ptr> %17, ptr %2, i64 2
  %19 = insertelement <8 x ptr> %18, ptr %3, i64 3
  %20 = insertelement <8 x ptr> %19, ptr %4, i64 4
  %21 = insertelement <8 x ptr> %20, ptr %5, i64 5
  %22 = insertelement <8 x ptr> %21, ptr %6, i64 6
  %23 = insertelement <8 x ptr> %22, ptr %7, i64 7
  %24 = icmp ne ptr %8, null
  %25 = icmp eq <8 x ptr> %23, zeroinitializer
  %26 = bitcast <8 x i1> %25 to i8
  %27 = icmp eq i8 %26, 0
  %op.rdx = and i1 %27, %24
  br i1 %op.rdx, label %31, label %28

28:                                               ; preds = %9
  %29 = load ptr, ptr @stderr, align 8, !tbaa !5
  %30 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 778, ptr noundef nonnull @__FUNCTION__.tls_record_get_handshake_client_hello) #5
  br label %94

31:                                               ; preds = %9
  %32 = call i32 @tls_record_get_handshake(ptr noundef nonnull %0, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %12)
  %.not = icmp eq i32 %32, 1
  br i1 %.not, label %36, label %33

33:                                               ; preds = %31
  %34 = load ptr, ptr @stderr, align 8, !tbaa !5
  %35 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 782, ptr noundef nonnull @__FUNCTION__.tls_record_get_handshake_client_hello) #5
  br label %94

36:                                               ; preds = %31
  %37 = load i32, ptr %10, align 4, !tbaa !9
  %.not43 = icmp eq i32 %37, 1
  br i1 %.not43, label %41, label %38

38:                                               ; preds = %36
  %39 = load ptr, ptr @stderr, align 8, !tbaa !5
  %40 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %39, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 786, ptr noundef nonnull @__FUNCTION__.tls_record_get_handshake_client_hello) #5
  br label %94

41:                                               ; preds = %36
  %42 = call i32 @tls_uint16_from_bytes(ptr noundef nonnull %13, ptr noundef nonnull %11, ptr noundef nonnull %12)
  %.not44 = icmp eq i32 %42, 1
  br i1 %.not44, label %43, label %51

43:                                               ; preds = %41
  %44 = call i32 @tls_array_from_bytes(ptr noundef nonnull %2, i64 noundef 32, ptr noundef nonnull %11, ptr noundef nonnull %12)
  %.not45 = icmp eq i32 %44, 1
  br i1 %.not45, label %45, label %51

45:                                               ; preds = %43
  %46 = call i32 @tls_uint8array_from_bytes(ptr noundef nonnull %3, ptr noundef nonnull %4, ptr noundef nonnull %11, ptr noundef nonnull %12)
  %.not46 = icmp eq i32 %46, 1
  br i1 %.not46, label %47, label %51

47:                                               ; preds = %45
  %48 = call i32 @tls_uint16array_from_bytes(ptr noundef nonnull %5, ptr noundef nonnull %6, ptr noundef nonnull %11, ptr noundef nonnull %12)
  %.not47 = icmp eq i32 %48, 1
  br i1 %.not47, label %49, label %51

49:                                               ; preds = %47
  %50 = call i32 @tls_uint8array_from_bytes(ptr noundef nonnull %14, ptr noundef nonnull %15, ptr noundef nonnull %11, ptr noundef nonnull %12)
  %.not48 = icmp eq i32 %50, 1
  br i1 %.not48, label %54, label %51

51:                                               ; preds = %41, %43, %45, %47, %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 794, ptr noundef nonnull @__FUNCTION__.tls_record_get_handshake_client_hello) #5
  br label %94

54:                                               ; preds = %49
  %55 = load i16, ptr %13, align 2, !tbaa !11
  %56 = zext i16 %55 to i32
  %57 = call ptr @tls_protocol_name(i32 noundef %56) #4
  %.not49 = icmp eq ptr %57, null
  br i1 %.not49, label %58, label %61

58:                                               ; preds = %54
  %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 799, ptr noundef nonnull @__FUNCTION__.tls_record_get_handshake_client_hello) #5
  br label %94

61:                                               ; preds = %54
  %62 = load i16, ptr %13, align 2, !tbaa !11
  %63 = zext i16 %62 to i32
  store i32 %63, ptr %1, align 4, !tbaa !9
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %.not50 = icmp eq ptr %64, null
  br i1 %.not50, label %71, label %65

65:                                               ; preds = %61
  %66 = load i64, ptr %4, align 8, !tbaa !13
  %67 = add i64 %66, -33
  %or.cond55 = icmp ult i64 %67, -32
  br i1 %or.cond55, label %68, label %71

68:                                               ; preds = %65
  %69 = load ptr, ptr @stderr, align 8, !tbaa !5
  %70 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %69, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 808, ptr noundef nonnull @__FUNCTION__.tls_record_get_handshake_client_hello) #5
  br label %94

71:                                               ; preds = %61, %65
  %72 = load i64, ptr %6, align 8, !tbaa !13
  %73 = and i64 %72, 1
  %.not51 = icmp eq i64 %73, 0
  br i1 %.not51, label %77, label %74

74:                                               ; preds = %71
  %75 = load ptr, ptr @stderr, align 8, !tbaa !5
  %76 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %75, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 818, ptr noundef nonnull @__FUNCTION__.tls_record_get_handshake_client_hello) #5
  br label %94

77:                                               ; preds = %71
  %78 = load i64, ptr %12, align 8, !tbaa !13
  %.not52 = icmp eq i64 %78, 0
  br i1 %.not52, label %.thread, label %79

79:                                               ; preds = %77
  %80 = call i32 @tls_uint16array_from_bytes(ptr noundef nonnull %7, ptr noundef nonnull %8, ptr noundef nonnull %11, ptr noundef nonnull %12)
  %.not53 = icmp eq i32 %80, 1
  br i1 %.not53, label %84, label %81

81:                                               ; preds = %79
  %82 = load ptr, ptr @stderr, align 8, !tbaa !5
  %83 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %82, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 824, ptr noundef nonnull @__FUNCTION__.tls_record_get_handshake_client_hello) #5
  br label %94

84:                                               ; preds = %79
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = icmp eq ptr %85, null
  br i1 %86, label %87, label %90

87:                                               ; preds = %84
  %88 = load ptr, ptr @stderr, align 8, !tbaa !5
  %89 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %88, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 828, ptr noundef nonnull @__FUNCTION__.tls_record_get_handshake_client_hello) #5
  br label %94

.thread:                                          ; preds = %77
  store ptr null, ptr %7, align 8, !tbaa !5
  store i64 0, ptr %8, align 8, !tbaa !13
  br label %94

90:                                               ; preds = %84
  %.pr = load i64, ptr %12, align 8, !tbaa !13
  %.not54 = icmp eq i64 %.pr, 0
  br i1 %.not54, label %94, label %91

91:                                               ; preds = %90
  %92 = load ptr, ptr @stderr, align 8, !tbaa !5
  %93 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %92, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 836, ptr noundef nonnull @__FUNCTION__.tls_record_get_handshake_client_hello) #5
  br label %94

94:                                               ; preds = %.thread, %90, %91, %87, %81, %74, %68, %58, %51, %38, %33, %28
  %.0 = phi i32 [ -1, %33 ], [ -1, %38 ], [ -1, %51 ], [ -1, %68 ], [ -1, %74 ], [ -1, %81 ], [ -1, %87 ], [ -1, %91 ], [ -1, %58 ], [ -1, %28 ], [ 1, %90 ], [ 1, %.thread ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #4
  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 4, ptr nonnull %10) #4
  ret i32 %.0
}

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


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