; LLVM IR from tleonhardt/practical_cryptography_engineering :: mbedtls (ssl_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"

%struct.mbedtls_ssl_context = type { ptr, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i64, i64, i16, i64, i64, i64, i64, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, i32, i64, i64, i8, i32, ptr, ptr, ptr, i64, i32, i64, [12 x i8], [12 x i8] }
%struct.mbedtls_ssl_transform = type { ptr, i32, i64, i64, i64, i64, [16 x i8], [16 x i8], %struct.mbedtls_md_context_t, %struct.mbedtls_md_context_t, %struct.mbedtls_cipher_context_t, %struct.mbedtls_cipher_context_t }
%struct.mbedtls_md_context_t = type { ptr, ptr, ptr }
%struct.mbedtls_cipher_context_t = type { ptr, i32, i32, ptr, ptr, [16 x i8], i64, [16 x i8], i64, ptr }
%struct.mbedtls_ssl_config = type { [4 x ptr], ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %struct.mbedtls_mpi, %struct.mbedtls_mpi, ptr, i64, ptr, i64, ptr, i32, i32, i32, i32, [8 x i8], i32, i32, i8, i8, i8, i8, i32 }
%struct.mbedtls_mpi = type { i32, i64, ptr }
%struct.mbedtls_ssl_ciphersuite_t = type { i32, ptr, i32, i32, i32, i32, i32, i32, i32, i8 }
%struct.mbedtls_ssl_handshake_params = type { %struct.mbedtls_ssl_sig_hash_set_t, %struct.mbedtls_dhm_context, %struct.mbedtls_ecdh_context, ptr, ptr, i64, ptr, i32, ptr, ptr, ptr, i32, i32, ptr, i8, ptr, i32, i8, ptr, ptr, i32, ptr, [8 x i8], %struct.mbedtls_md5_context, %struct.mbedtls_sha1_context, %struct.mbedtls_sha256_context, %struct.mbedtls_sha512_context, ptr, ptr, ptr, ptr, i64, [64 x i8], [1060 x i8], i32, i32, i32, i32, i32, i32 }
%struct.mbedtls_ssl_sig_hash_set_t = type { i32, i32 }
%struct.mbedtls_dhm_context = type { i64, %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_mpi }
%struct.mbedtls_ecdh_context = type { %struct.mbedtls_ecp_group, %struct.mbedtls_mpi, %struct.mbedtls_ecp_point, %struct.mbedtls_ecp_point, %struct.mbedtls_mpi, i32, %struct.mbedtls_ecp_point, %struct.mbedtls_ecp_point, %struct.mbedtls_mpi }
%struct.mbedtls_ecp_group = type { i32, %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_ecp_point, %struct.mbedtls_mpi, i64, i64, i32, ptr, ptr, ptr, ptr, ptr, i64 }
%struct.mbedtls_ecp_point = type { %struct.mbedtls_mpi, %struct.mbedtls_mpi, %struct.mbedtls_mpi }
%struct.mbedtls_md5_context = type { [2 x i32], [4 x i32], [64 x i8] }
%struct.mbedtls_sha1_context = type { [2 x i32], [5 x i32], [64 x i8] }
%struct.mbedtls_sha256_context = type { [2 x i32], [8 x i32], [64 x i8], i32 }
%struct.mbedtls_sha512_context = type { [2 x i64], [8 x i64], [128 x i8], i32 }
%struct.mbedtls_ssl_session = type { i64, i32, i32, i64, [32 x i8], [48 x i8], ptr, i32, ptr, i64, i32, i8, i32, i32 }
%struct.mbedtls_x509_crt = type { %struct.mbedtls_asn1_buf, %struct.mbedtls_asn1_buf, i32, %struct.mbedtls_asn1_buf, %struct.mbedtls_asn1_buf, %struct.mbedtls_asn1_buf, %struct.mbedtls_asn1_buf, %struct.mbedtls_asn1_named_data, %struct.mbedtls_asn1_named_data, %struct.mbedtls_x509_time, %struct.mbedtls_x509_time, %struct.mbedtls_pk_context, %struct.mbedtls_asn1_buf, %struct.mbedtls_asn1_buf, %struct.mbedtls_asn1_buf, %struct.mbedtls_asn1_sequence, i32, i32, i32, i32, %struct.mbedtls_asn1_sequence, i8, %struct.mbedtls_asn1_buf, i32, i32, ptr, ptr }
%struct.mbedtls_asn1_named_data = type { %struct.mbedtls_asn1_buf, %struct.mbedtls_asn1_buf, ptr, i8 }
%struct.mbedtls_x509_time = type { i32, i32, i32, i32, i32, i32 }
%struct.mbedtls_pk_context = type { ptr, ptr }
%struct.mbedtls_asn1_sequence = type { %struct.mbedtls_asn1_buf, ptr }
%struct.mbedtls_asn1_buf = type { i32, i64, ptr }
%struct.mbedtls_ecp_keypair = type { %struct.mbedtls_ecp_group, %struct.mbedtls_mpi, %struct.mbedtls_ecp_point }

@.str = external hidden unnamed_addr constant [97 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.90 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.91 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.96 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.97 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.104 = external hidden unnamed_addr constant [21 x i8], align 1

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

declare void @mbedtls_debug_print_msg(ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) #1

declare void @mbedtls_debug_print_ret(ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) #1

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @mbedtls_ssl_hs_hdr_len(ptr noundef) #2

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 noundef) #3

; Function Attrs: nounwind uwtable
declare dso_local i32 @mbedtls_ssl_read_record(ptr noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local i32 @mbedtls_ssl_send_alert_message(ptr noundef, i8 noundef zeroext, i8 noundef zeroext) #4

declare void @mbedtls_debug_print_crt(ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @mbedtls_ssl_parse_certificate(ptr noundef %0) #4 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i8, align 1
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  store i32 -28800, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %14, i32 0, i32 19
  %16 = load ptr, ptr %15, align 8, !tbaa !11
  %17 = getelementptr inbounds %struct.mbedtls_ssl_transform, ptr %16, i32 0, i32 0
  %18 = load ptr, ptr %17, align 8, !tbaa !15
  store ptr %18, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %19 = load ptr, ptr %3, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %19, i32 0, i32 0
  %21 = load ptr, ptr %20, align 8, !tbaa !19
  %22 = getelementptr inbounds %struct.mbedtls_ssl_config, ptr %21, i32 0, i32 46
  %23 = load i32, ptr %22, align 4
  %24 = lshr i32 %23, 2
  %25 = and i32 %24, 3
  store i32 %25, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #7
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef %26, i32 noundef 2, ptr noundef @.str, i32 noundef 4320, ptr noundef @.str.88)
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.mbedtls_ssl_ciphersuite_t, ptr %27, i32 0, i32 4
  %29 = load i32, ptr %28, align 8, !tbaa !20
  %30 = icmp eq i32 %29, 5
  br i1 %30, label %46, label %31

31:                                               ; preds = %1
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.mbedtls_ssl_ciphersuite_t, ptr %32, i32 0, i32 4
  %34 = load i32, ptr %33, align 8, !tbaa !20
  %35 = icmp eq i32 %34, 6
  br i1 %35, label %46, label %36

36:                                               ; preds = %31
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.mbedtls_ssl_ciphersuite_t, ptr %37, i32 0, i32 4
  %39 = load i32, ptr %38, align 8, !tbaa !20
  %40 = icmp eq i32 %39, 8
  br i1 %40, label %46, label %41

41:                                               ; preds = %36
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.mbedtls_ssl_ciphersuite_t, ptr %42, i32 0, i32 4
  %44 = load i32, ptr %43, align 8, !tbaa !20
  %45 = icmp eq i32 %44, 11
  br i1 %45, label %46, label %52

46:                                               ; preds = %41, %36, %31, %1
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef %47, i32 noundef 2, ptr noundef @.str, i32 noundef 4327, ptr noundef @.str.89)
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %48, i32 0, i32 1
  %50 = load i32, ptr %49, align 8, !tbaa !22
  %51 = add nsw i32 %50, 1
  store i32 %51, ptr %49, align 8, !tbaa !22
  store i32 0, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %722

52:                                               ; preds = %41
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %53, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !19
  %56 = getelementptr inbounds %struct.mbedtls_ssl_config, ptr %55, i32 0, i32 46
  %57 = load i32, ptr %56, align 4
  %58 = and i32 %57, 1
  %59 = icmp eq i32 %58, 1
  br i1 %59, label %60, label %71

60:                                               ; preds = %52
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.mbedtls_ssl_ciphersuite_t, ptr %61, i32 0, i32 4
  %63 = load i32, ptr %62, align 8, !tbaa !20
  %64 = icmp eq i32 %63, 7
  br i1 %64, label %65, label %71

65:                                               ; preds = %60
  %66 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef %66, i32 noundef 2, ptr noundef @.str, i32 noundef 4336, ptr noundef @.str.89)
  %67 = load ptr, ptr %3, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %67, i32 0, i32 1
  %69 = load i32, ptr %68, align 8, !tbaa !22
  %70 = add nsw i32 %69, 1
  store i32 %70, ptr %68, align 8, !tbaa !22
  store i32 0, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %722

71:                                               ; preds = %60, %52
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %72, i32 0, i32 15
  %74 = load ptr, ptr %73, align 8, !tbaa !23
  %75 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %74, i32 0, i32 7
  %76 = load i32, ptr %75, align 8, !tbaa !24
  %77 = icmp ne i32 %76, 3
  br i1 %77, label %78, label %84

78:                                               ; preds = %71
  %79 = load ptr, ptr %3, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %79, i32 0, i32 15
  %81 = load ptr, ptr %80, align 8, !tbaa !23
  %82 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %81, i32 0, i32 7
  %83 = load i32, ptr %82, align 8, !tbaa !24
  store i32 %83, ptr %8, align 4, !tbaa !9
  br label %84

84:                                               ; preds = %78, %71
  %85 = load ptr, ptr %3, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %85, i32 0, i32 0
  %87 = load ptr, ptr %86, align 8, !tbaa !19
  %88 = getelementptr inbounds %struct.mbedtls_ssl_config, ptr %87, i32 0, i32 46
  %89 = load i32, ptr %88, align 4
  %90 = and i32 %89, 1
  %91 = icmp eq i32 %90, 1
  br i1 %91, label %92, label %105

92:                                               ; preds = %84
  %93 = load i32, ptr %8, align 4, !tbaa !9
  %94 = icmp eq i32 %93, 0
  br i1 %94, label %95, label %105

95:                                               ; preds = %92
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %96, i32 0, i32 14
  %98 = load ptr, ptr %97, align 8, !tbaa !36
  %99 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %98, i32 0, i32 7
  store i32 128, ptr %99, align 8, !tbaa !37
  %100 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef %100, i32 noundef 2, ptr noundef @.str, i32 noundef 4350, ptr noundef @.str.89)
  %101 = load ptr, ptr %3, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %101, i32 0, i32 1
  %103 = load i32, ptr %102, align 8, !tbaa !22
  %104 = add nsw i32 %103, 1
  store i32 %104, ptr %102, align 8, !tbaa !22
  store i32 0, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %722

105:                                              ; preds = %92, %84
  %106 = load ptr, ptr %3, align 8, !tbaa !5
  %107 = call i32 @mbedtls_ssl_read_record(ptr noundef %106)
  store i32 %107, ptr %4, align 4, !tbaa !9
  %108 = icmp ne i32 %107, 0
  br i1 %108, label %109, label %113

109:                                              ; preds = %105
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = load i32, ptr %4, align 4, !tbaa !9
  call void @mbedtls_debug_print_ret(ptr noundef %110, i32 noundef 1, ptr noundef @.str, i32 noundef 4360, ptr noundef @.str.90, i32 noundef %111)
  %112 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %112, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %722

113:                                              ; preds = %105
  %114 = load ptr, ptr %3, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %114, i32 0, i32 1
  %116 = load i32, ptr %115, align 8, !tbaa !22
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %115, align 8, !tbaa !22
  %118 = load ptr, ptr %3, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %118, i32 0, i32 0
  %120 = load ptr, ptr %119, align 8, !tbaa !19
  %121 = getelementptr inbounds %struct.mbedtls_ssl_config, ptr %120, i32 0, i32 46
  %122 = load i32, ptr %121, align 4
  %123 = and i32 %122, 1
  %124 = icmp eq i32 %123, 1
  br i1 %124, label %125, label %171

125:                                              ; preds = %113
  %126 = load ptr, ptr %3, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %126, i32 0, i32 5
  %128 = load i32, ptr %127, align 8, !tbaa !39
  %129 = icmp ne i32 %128, 0
  br i1 %129, label %130, label %171

130:                                              ; preds = %125
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %131, i32 0, i32 37
  %133 = load i64, ptr %132, align 8, !tbaa !40
  %134 = load ptr, ptr %3, align 8, !tbaa !5
  %135 = call i64 @mbedtls_ssl_hs_hdr_len(ptr noundef %134)
  %136 = add i64 3, %135
  %137 = icmp eq i64 %133, %136
  br i1 %137, label %138, label %170

138:                                              ; preds = %130
  %139 = load ptr, ptr %3, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %139, i32 0, i32 30
  %141 = load i32, ptr %140, align 8, !tbaa !41
  %142 = icmp eq i32 %141, 22
  br i1 %142, label %143, label %170

143:                                              ; preds = %138
  %144 = load ptr, ptr %3, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %144, i32 0, i32 28
  %146 = load ptr, ptr %145, align 8, !tbaa !42
  %147 = getelementptr inbounds i8, ptr %146, i64 0
  %148 = load i8, ptr %147, align 1, !tbaa !43
  %149 = zext i8 %148 to i32
  %150 = icmp eq i32 %149, 11
  br i1 %150, label %151, label %170

151:                                              ; preds = %143
  %152 = load ptr, ptr %3, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %152, i32 0, i32 28
  %154 = load ptr, ptr %153, align 8, !tbaa !42
  %155 = load ptr, ptr %3, align 8, !tbaa !5
  %156 = call i64 @mbedtls_ssl_hs_hdr_len(ptr noundef %155)
  %157 = getelementptr inbounds i8, ptr %154, i64 %156
  %158 = call i32 @memcmp(ptr noundef %157, ptr noundef @.str.60, i64 noundef 3) #8
  %159 = icmp eq i32 %158, 0
  br i1 %159, label %160, label %170

160:                                              ; preds = %151
  %161 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef %161, i32 noundef 1, ptr noundef @.str, i32 noundef 4403, ptr noundef @.str.91)
  %162 = load ptr, ptr %3, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %162, i32 0, i32 14
  %164 = load ptr, ptr %163, align 8, !tbaa !36
  %165 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %164, i32 0, i32 7
  store i32 64, ptr %165, align 8, !tbaa !37
  %166 = load i32, ptr %8, align 4, !tbaa !9
  %167 = icmp eq i32 %166, 1
  br i1 %167, label %168, label %169

168:                                              ; preds = %160
  store i32 0, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %722

169:                                              ; preds = %160
  store i32 -29824, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %722

170:                                              ; preds = %151, %143, %138, %130
  br label %171

171:                                              ; preds = %170, %125, %113
  %172 = load ptr, ptr %3, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %172, i32 0, i32 30
  %174 = load i32, ptr %173, align 8, !tbaa !41
  %175 = icmp ne i32 %174, 22
  br i1 %175, label %176, label %180

176:                                              ; preds = %171
  %177 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef %177, i32 noundef 1, ptr noundef @.str, i32 noundef 4421, ptr noundef @.str.92)
  %178 = load ptr, ptr %3, align 8, !tbaa !5
  %179 = call i32 @mbedtls_ssl_send_alert_message(ptr noundef %178, i8 noundef zeroext 2, i8 noundef zeroext 10)
  store i32 -30464, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %722

180:                                              ; preds = %171
  %181 = load ptr, ptr %3, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %181, i32 0, i32 28
  %183 = load ptr, ptr %182, align 8, !tbaa !42
  %184 = getelementptr inbounds i8, ptr %183, i64 0
  %185 = load i8, ptr %184, align 1, !tbaa !43
  %186 = zext i8 %185 to i32
  %187 = icmp ne i32 %186, 11
  br i1 %187, label %197, label %188

188:                                              ; preds = %180
  %189 = load ptr, ptr %3, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %189, i32 0, i32 37
  %191 = load i64, ptr %190, align 8, !tbaa !40
  %192 = load ptr, ptr %3, align 8, !tbaa !5
  %193 = call i64 @mbedtls_ssl_hs_hdr_len(ptr noundef %192)
  %194 = add i64 %193, 3
  %195 = add i64 %194, 3
  %196 = icmp ult i64 %191, %195
  br i1 %196, label %197, label %201

197:                                              ; preds = %188, %180
  %198 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef %198, i32 noundef 1, ptr noundef @.str, i32 noundef 4430, ptr noundef @.str.92)
  %199 = load ptr, ptr %3, align 8, !tbaa !5
  %200 = call i32 @mbedtls_ssl_send_alert_message(ptr noundef %199, i8 noundef zeroext 2, i8 noundef zeroext 50)
  store i32 -31232, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %722

201:                                              ; preds = %188
  %202 = load ptr, ptr %3, align 8, !tbaa !5
  %203 = call i64 @mbedtls_ssl_hs_hdr_len(ptr noundef %202)
  store i64 %203, ptr %5, align 8, !tbaa !44
  %204 = load ptr, ptr %3, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %204, i32 0, i32 28
  %206 = load ptr, ptr %205, align 8, !tbaa !42
  %207 = load i64, ptr %5, align 8, !tbaa !44
  %208 = add i64 %207, 1
  %209 = getelementptr inbounds i8, ptr %206, i64 %208
  %210 = load i8, ptr %209, align 1, !tbaa !43
  %211 = zext i8 %210 to i32
  %212 = shl i32 %211, 8
  %213 = load ptr, ptr %3, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %213, i32 0, i32 28
  %215 = load ptr, ptr %214, align 8, !tbaa !42
  %216 = load i64, ptr %5, align 8, !tbaa !44
  %217 = add i64 %216, 2
  %218 = getelementptr inbounds i8, ptr %215, i64 %217
  %219 = load i8, ptr %218, align 1, !tbaa !43
  %220 = zext i8 %219 to i32
  %221 = or i32 %212, %220
  %222 = sext i32 %221 to i64
  store i64 %222, ptr %6, align 8, !tbaa !44
  %223 = load ptr, ptr %3, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %223, i32 0, i32 28
  %225 = load ptr, ptr %224, align 8, !tbaa !42
  %226 = load i64, ptr %5, align 8, !tbaa !44
  %227 = getelementptr inbounds i8, ptr %225, i64 %226
  %228 = load i8, ptr %227, align 1, !tbaa !43
  %229 = zext i8 %228 to i32
  %230 = icmp ne i32 %229, 0
  br i1 %230, label %241, label %231

231:                                              ; preds = %201
  %232 = load ptr, ptr %3, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %232, i32 0, i32 37
  %234 = load i64, ptr %233, align 8, !tbaa !40
  %235 = load i64, ptr %6, align 8, !tbaa !44
  %236 = add i64 %235, 3
  %237 = load ptr, ptr %3, align 8, !tbaa !5
  %238 = call i64 @mbedtls_ssl_hs_hdr_len(ptr noundef %237)
  %239 = add i64 %236, %238
  %240 = icmp ne i64 %234, %239
  br i1 %240, label %241, label %245

241:                                              ; preds = %231, %201
  %242 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef %242, i32 noundef 1, ptr noundef @.str, i32 noundef 4446, ptr noundef @.str.92)
  %243 = load ptr, ptr %3, align 8, !tbaa !5
  %244 = call i32 @mbedtls_ssl_send_alert_message(ptr noundef %243, i8 noundef zeroext 2, i8 noundef zeroext 50)
  store i32 -31232, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %722

245:                                              ; preds = %231
  %246 = load ptr, ptr %3, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %246, i32 0, i32 14
  %248 = load ptr, ptr %247, align 8, !tbaa !36
  %249 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %248, i32 0, i32 6
  %250 = load ptr, ptr %249, align 8, !tbaa !45
  %251 = icmp ne ptr %250, null
  br i1 %251, label %252, label %263

252:                                              ; preds = %245
  %253 = load ptr, ptr %3, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %253, i32 0, i32 14
  %255 = load ptr, ptr %254, align 8, !tbaa !36
  %256 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %255, i32 0, i32 6
  %257 = load ptr, ptr %256, align 8, !tbaa !45
  call void @mbedtls_x509_crt_free(ptr noundef %257)
  %258 = load ptr, ptr %3, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %258, i32 0, i32 14
  %260 = load ptr, ptr %259, align 8, !tbaa !36
  %261 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %260, i32 0, i32 6
  %262 = load ptr, ptr %261, align 8, !tbaa !45
  call void @free(ptr noundef %262) #7
  br label %263

263:                                              ; preds = %252, %245
  %264 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 552) #9
  %265 = load ptr, ptr %3, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %265, i32 0, i32 14
  %267 = load ptr, ptr %266, align 8, !tbaa !36
  %268 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %267, i32 0, i32 6
  store ptr %264, ptr %268, align 8, !tbaa !45
  %269 = icmp eq ptr %264, null
  br i1 %269, label %270, label %274

270:                                              ; preds = %263
  %271 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef %271, i32 noundef 1, ptr noundef @.str, i32 noundef 4463, ptr noundef @.str.93, i64 noundef 552)
  %272 = load ptr, ptr %3, align 8, !tbaa !5
  %273 = call i32 @mbedtls_ssl_send_alert_message(ptr noundef %272, i8 noundef zeroext 2, i8 noundef zeroext 80)
  store i32 -32512, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %722

274:                                              ; preds = %263
  %275 = load ptr, ptr %3, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %275, i32 0, i32 14
  %277 = load ptr, ptr %276, align 8, !tbaa !36
  %278 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %277, i32 0, i32 6
  %279 = load ptr, ptr %278, align 8, !tbaa !45
  call void @mbedtls_x509_crt_init(ptr noundef %279)
  %280 = load i64, ptr %5, align 8, !tbaa !44
  %281 = add i64 %280, 3
  store i64 %281, ptr %5, align 8, !tbaa !44
  br label %282

282:                                              ; preds = %362, %274
  %283 = load i64, ptr %5, align 8, !tbaa !44
  %284 = load ptr, ptr %3, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %284, i32 0, i32 37
  %286 = load i64, ptr %285, align 8, !tbaa !40
  %287 = icmp ult i64 %283, %286
  br i1 %287, label %288, label %366

288:                                              ; preds = %282
  %289 = load ptr, ptr %3, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %289, i32 0, i32 28
  %291 = load ptr, ptr %290, align 8, !tbaa !42
  %292 = load i64, ptr %5, align 8, !tbaa !44
  %293 = getelementptr inbounds i8, ptr %291, i64 %292
  %294 = load i8, ptr %293, align 1, !tbaa !43
  %295 = zext i8 %294 to i32
  %296 = icmp ne i32 %295, 0
  br i1 %296, label %297, label %301

297:                                              ; preds = %288
  %298 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef %298, i32 noundef 1, ptr noundef @.str, i32 noundef 4477, ptr noundef @.str.92)
  %299 = load ptr, ptr %3, align 8, !tbaa !5
  %300 = call i32 @mbedtls_ssl_send_alert_message(ptr noundef %299, i8 noundef zeroext 2, i8 noundef zeroext 50)
  store i32 -31232, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %722

301:                                              ; preds = %288
  %302 = load ptr, ptr %3, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %302, i32 0, i32 28
  %304 = load ptr, ptr %303, align 8, !tbaa !42
  %305 = load i64, ptr %5, align 8, !tbaa !44
  %306 = add i64 %305, 1
  %307 = getelementptr inbounds i8, ptr %304, i64 %306
  %308 = load i8, ptr %307, align 1, !tbaa !43
  %309 = zext i8 %308 to i32
  %310 = shl i32 %309, 8
  %311 = load ptr, ptr %3, align 8, !tbaa !5
  %312 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %311, i32 0, i32 28
  %313 = load ptr, ptr %312, align 8, !tbaa !42
  %314 = load i64, ptr %5, align 8, !tbaa !44
  %315 = add i64 %314, 2
  %316 = getelementptr inbounds i8, ptr %313, i64 %315
  %317 = load i8, ptr %316, align 1, !tbaa !43
  %318 = zext i8 %317 to i32
  %319 = or i32 %310, %318
  %320 = zext i32 %319 to i64
  store i64 %320, ptr %6, align 8, !tbaa !44
  %321 = load i64, ptr %5, align 8, !tbaa !44
  %322 = add i64 %321, 3
  store i64 %322, ptr %5, align 8, !tbaa !44
  %323 = load i64, ptr %6, align 8, !tbaa !44
  %324 = icmp ult i64 %323, 128
  br i1 %324, label %333, label %325

325:                                              ; preds = %301
  %326 = load i64, ptr %5, align 8, !tbaa !44
  %327 = load i64, ptr %6, align 8, !tbaa !44
  %328 = add i64 %326, %327
  %329 = load ptr, ptr %3, align 8, !tbaa !5
  %330 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %329, i32 0, i32 37
  %331 = load i64, ptr %330, align 8, !tbaa !40
  %332 = icmp ugt i64 %328, %331
  br i1 %332, label %333, label %337

333:                                              ; preds = %325, %301
  %334 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef %334, i32 noundef 1, ptr noundef @.str, i32 noundef 4489, ptr noundef @.str.92)
  %335 = load ptr, ptr %3, align 8, !tbaa !5
  %336 = call i32 @mbedtls_ssl_send_alert_message(ptr noundef %335, i8 noundef zeroext 2, i8 noundef zeroext 50)
  store i32 -31232, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %722

337:                                              ; preds = %325
  %338 = load ptr, ptr %3, align 8, !tbaa !5
  %339 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %338, i32 0, i32 14
  %340 = load ptr, ptr %339, align 8, !tbaa !36
  %341 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %340, i32 0, i32 6
  %342 = load ptr, ptr %341, align 8, !tbaa !45
  %343 = load ptr, ptr %3, align 8, !tbaa !5
  %344 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %343, i32 0, i32 28
  %345 = load ptr, ptr %344, align 8, !tbaa !42
  %346 = load i64, ptr %5, align 8, !tbaa !44
  %347 = getelementptr inbounds i8, ptr %345, i64 %346
  %348 = load i64, ptr %6, align 8, !tbaa !44
  %349 = call i32 @mbedtls_x509_crt_parse_der(ptr noundef %342, ptr noundef %347, i64 noundef %348)
  store i32 %349, ptr %4, align 4, !tbaa !9
  %350 = load i32, ptr %4, align 4, !tbaa !9
  switch i32 %350, label %354 [
    i32 0, label %351
    i32 -9774, label %351
    i32 -10368, label %352
    i32 -9600, label %353
  ]

351:                                              ; preds = %337, %337
  br label %362

352:                                              ; preds = %337
  store i8 80, ptr %9, align 1, !tbaa !43
  br label %355

353:                                              ; preds = %337
  store i8 43, ptr %9, align 1, !tbaa !43
  br label %355

354:                                              ; preds = %337
  store i8 42, ptr %9, align 1, !tbaa !43
  br label %355

355:                                              ; preds = %354, %353, %352
  %356 = load ptr, ptr %3, align 8, !tbaa !5
  %357 = load i8, ptr %9, align 1, !tbaa !43
  %358 = call i32 @mbedtls_ssl_send_alert_message(ptr noundef %356, i8 noundef zeroext 2, i8 noundef zeroext %357)
  %359 = load ptr, ptr %3, align 8, !tbaa !5
  %360 = load i32, ptr %4, align 4, !tbaa !9
  call void @mbedtls_debug_print_ret(ptr noundef %359, i32 noundef 1, ptr noundef @.str, i32 noundef 4517, ptr noundef @.str.94, i32 noundef %360)
  %361 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %361, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %722

362:                                              ; preds = %351
  %363 = load i64, ptr %6, align 8, !tbaa !44
  %364 = load i64, ptr %5, align 8, !tbaa !44
  %365 = add i64 %364, %363
  store i64 %365, ptr %5, align 8, !tbaa !44
  br label %282, !llvm.loop !46

366:                                              ; preds = %282
  %367 = load ptr, ptr %3, align 8, !tbaa !5
  %368 = load ptr, ptr %3, align 8, !tbaa !5
  %369 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %368, i32 0, i32 14
  %370 = load ptr, ptr %369, align 8, !tbaa !36
  %371 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %370, i32 0, i32 6
  %372 = load ptr, ptr %371, align 8, !tbaa !45
  call void @mbedtls_debug_print_crt(ptr noundef %367, i32 noundef 3, ptr noundef @.str, i32 noundef 4524, ptr noundef @.str.95, ptr noundef %372)
  %373 = load ptr, ptr %3, align 8, !tbaa !5
  %374 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %373, i32 0, i32 0
  %375 = load ptr, ptr %374, align 8, !tbaa !19
  %376 = getelementptr inbounds %struct.mbedtls_ssl_config, ptr %375, i32 0, i32 46
  %377 = load i32, ptr %376, align 4
  %378 = and i32 %377, 1
  %379 = icmp eq i32 %378, 0
  br i1 %379, label %380, label %446

380:                                              ; preds = %366
  %381 = load ptr, ptr %3, align 8, !tbaa !5
  %382 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %381, i32 0, i32 2
  %383 = load i32, ptr %382, align 4, !tbaa !48
  %384 = icmp eq i32 %383, 1
  br i1 %384, label %385, label %446

385:                                              ; preds = %380
  %386 = load ptr, ptr %3, align 8, !tbaa !5
  %387 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %386, i32 0, i32 13
  %388 = load ptr, ptr %387, align 8, !tbaa !49
  %389 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %388, i32 0, i32 6
  %390 = load ptr, ptr %389, align 8, !tbaa !45
  %391 = icmp eq ptr %390, null
  br i1 %391, label %392, label %396

392:                                              ; preds = %385
  %393 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef %393, i32 noundef 1, ptr noundef @.str, i32 noundef 4536, ptr noundef @.str.96)
  %394 = load ptr, ptr %3, align 8, !tbaa !5
  %395 = call i32 @mbedtls_ssl_send_alert_message(ptr noundef %394, i8 noundef zeroext 2, i8 noundef zeroext 49)
  store i32 -31232, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %722

396:                                              ; preds = %385
  %397 = load ptr, ptr %3, align 8, !tbaa !5
  %398 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %397, i32 0, i32 13
  %399 = load ptr, ptr %398, align 8, !tbaa !49
  %400 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %399, i32 0, i32 6
  %401 = load ptr, ptr %400, align 8, !tbaa !45
  %402 = getelementptr inbounds %struct.mbedtls_x509_crt, ptr %401, i32 0, i32 0
  %403 = getelementptr inbounds %struct.mbedtls_asn1_buf, ptr %402, i32 0, i32 1
  %404 = load i64, ptr %403, align 8, !tbaa !50
  %405 = load ptr, ptr %3, align 8, !tbaa !5
  %406 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %405, i32 0, i32 14
  %407 = load ptr, ptr %406, align 8, !tbaa !36
  %408 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %407, i32 0, i32 6
  %409 = load ptr, ptr %408, align 8, !tbaa !45
  %410 = getelementptr inbounds %struct.mbedtls_x509_crt, ptr %409, i32 0, i32 0
  %411 = getelementptr inbounds %struct.mbedtls_asn1_buf, ptr %410, i32 0, i32 1
  %412 = load i64, ptr %411, align 8, !tbaa !50
  %413 = icmp ne i64 %404, %412
  br i1 %413, label %441, label %414

414:                                              ; preds = %396
  %415 = load ptr, ptr %3, align 8, !tbaa !5
  %416 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %415, i32 0, i32 13
  %417 = load ptr, ptr %416, align 8, !tbaa !49
  %418 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %417, i32 0, i32 6
  %419 = load ptr, ptr %418, align 8, !tbaa !45
  %420 = getelementptr inbounds %struct.mbedtls_x509_crt, ptr %419, i32 0, i32 0
  %421 = getelementptr inbounds %struct.mbedtls_asn1_buf, ptr %420, i32 0, i32 2
  %422 = load ptr, ptr %421, align 8, !tbaa !57
  %423 = load ptr, ptr %3, align 8, !tbaa !5
  %424 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %423, i32 0, i32 14
  %425 = load ptr, ptr %424, align 8, !tbaa !36
  %426 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %425, i32 0, i32 6
  %427 = load ptr, ptr %426, align 8, !tbaa !45
  %428 = getelementptr inbounds %struct.mbedtls_x509_crt, ptr %427, i32 0, i32 0
  %429 = getelementptr inbounds %struct.mbedtls_asn1_buf, ptr %428, i32 0, i32 2
  %430 = load ptr, ptr %429, align 8, !tbaa !57
  %431 = load ptr, ptr %3, align 8, !tbaa !5
  %432 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %431, i32 0, i32 13
  %433 = load ptr, ptr %432, align 8, !tbaa !49
  %434 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %433, i32 0, i32 6
  %435 = load ptr, ptr %434, align 8, !tbaa !45
  %436 = getelementptr inbounds %struct.mbedtls_x509_crt, ptr %435, i32 0, i32 0
  %437 = getelementptr inbounds %struct.mbedtls_asn1_buf, ptr %436, i32 0, i32 1
  %438 = load i64, ptr %437, align 8, !tbaa !50
  %439 = call i32 @memcmp(ptr noundef %422, ptr noundef %430, i64 noundef %438) #8
  %440 = icmp ne i32 %439, 0
  br i1 %440, label %441, label %445

441:                                              ; preds = %414, %396
  %442 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef %442, i32 noundef 1, ptr noundef @.str, i32 noundef 4548, ptr noundef @.str.97)
  %443 = load ptr, ptr %3, align 8, !tbaa !5
  %444 = call i32 @mbedtls_ssl_send_alert_message(ptr noundef %443, i8 noundef zeroext 2, i8 noundef zeroext 49)
  store i32 -31232, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %722

445:                                              ; preds = %414
  br label %446

446:                                              ; preds = %445, %380, %366
  %447 = load i32, ptr %8, align 4, !tbaa !9
  %448 = icmp ne i32 %447, 0
  br i1 %448, label %449, label %719

449:                                              ; preds = %446
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %450 = load ptr, ptr %3, align 8, !tbaa !5
  %451 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %450, i32 0, i32 15
  %452 = load ptr, ptr %451, align 8, !tbaa !23
  %453 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %452, i32 0, i32 9
  %454 = load ptr, ptr %453, align 8, !tbaa !58
  %455 = icmp ne ptr %454, null
  br i1 %455, label %456, label %467

456:                                              ; preds = %449
  %457 = load ptr, ptr %3, align 8, !tbaa !5
  %458 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %457, i32 0, i32 15
  %459 = load ptr, ptr %458, align 8, !tbaa !23
  %460 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %459, i32 0, i32 9
  %461 = load ptr, ptr %460, align 8, !tbaa !58
  store ptr %461, ptr %11, align 8, !tbaa !5
  %462 = load ptr, ptr %3, align 8, !tbaa !5
  %463 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %462, i32 0, i32 15
  %464 = load ptr, ptr %463, align 8, !tbaa !23
  %465 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %464, i32 0, i32 10
  %466 = load ptr, ptr %465, align 8, !tbaa !59
  store ptr %466, ptr %12, align 8, !tbaa !5
  br label %478

467:                                              ; preds = %449
  %468 = load ptr, ptr %3, align 8, !tbaa !5
  %469 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %468, i32 0, i32 0
  %470 = load ptr, ptr %469, align 8, !tbaa !19
  %471 = getelementptr inbounds %struct.mbedtls_ssl_config, ptr %470, i32 0, i32 24
  %472 = load ptr, ptr %471, align 8, !tbaa !60
  store ptr %472, ptr %11, align 8, !tbaa !5
  %473 = load ptr, ptr %3, align 8, !tbaa !5
  %474 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %473, i32 0, i32 0
  %475 = load ptr, ptr %474, align 8, !tbaa !19
  %476 = getelementptr inbounds %struct.mbedtls_ssl_config, ptr %475, i32 0, i32 25
  %477 = load ptr, ptr %476, align 8, !tbaa !62
  store ptr %477, ptr %12, align 8, !tbaa !5
  br label %478

478:                                              ; preds = %467, %456
  %479 = load ptr, ptr %3, align 8, !tbaa !5
  %480 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %479, i32 0, i32 14
  %481 = load ptr, ptr %480, align 8, !tbaa !36
  %482 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %481, i32 0, i32 6
  %483 = load ptr, ptr %482, align 8, !tbaa !45
  %484 = load ptr, ptr %11, align 8, !tbaa !5
  %485 = load ptr, ptr %12, align 8, !tbaa !5
  %486 = load ptr, ptr %3, align 8, !tbaa !5
  %487 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %486, i32 0, i32 0
  %488 = load ptr, ptr %487, align 8, !tbaa !19
  %489 = getelementptr inbounds %struct.mbedtls_ssl_config, ptr %488, i32 0, i32 22
  %490 = load ptr, ptr %489, align 8, !tbaa !63
  %491 = load ptr, ptr %3, align 8, !tbaa !5
  %492 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %491, i32 0, i32 51
  %493 = load ptr, ptr %492, align 8, !tbaa !64
  %494 = load ptr, ptr %3, align 8, !tbaa !5
  %495 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %494, i32 0, i32 14
  %496 = load ptr, ptr %495, align 8, !tbaa !36
  %497 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %496, i32 0, i32 7
  %498 = load ptr, ptr %3, align 8, !tbaa !5
  %499 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %498, i32 0, i32 0
  %500 = load ptr, ptr %499, align 8, !tbaa !19
  %501 = getelementptr inbounds %struct.mbedtls_ssl_config, ptr %500, i32 0, i32 10
  %502 = load ptr, ptr %501, align 8, !tbaa !65
  %503 = load ptr, ptr %3, align 8, !tbaa !5
  %504 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %503, i32 0, i32 0
  %505 = load ptr, ptr %504, align 8, !tbaa !19
  %506 = getelementptr inbounds %struct.mbedtls_ssl_config, ptr %505, i32 0, i32 11
  %507 = load ptr, ptr %506, align 8, !tbaa !66
  %508 = call i32 @mbedtls_x509_crt_verify_with_profile(ptr noundef %483, ptr noundef %484, ptr noundef %485, ptr noundef %490, ptr noundef %493, ptr noundef %497, ptr noundef %502, ptr noundef %507)
  store i32 %508, ptr %4, align 4, !tbaa !9
  %509 = load i32, ptr %4, align 4, !tbaa !9
  %510 = icmp ne i32 %509, 0
  br i1 %510, label %511, label %514

511:                                              ; preds = %478
  %512 = load ptr, ptr %3, align 8, !tbaa !5
  %513 = load i32, ptr %4, align 4, !tbaa !9
  call void @mbedtls_debug_print_ret(ptr noundef %512, i32 noundef 1, ptr noundef @.str, i32 noundef 4587, ptr noundef @.str.98, i32 noundef %513)
  br label %514

514:                                              ; preds = %511, %478
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %515 = load ptr, ptr %3, align 8, !tbaa !5
  %516 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %515, i32 0, i32 14
  %517 = load ptr, ptr %516, align 8, !tbaa !36
  %518 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %517, i32 0, i32 6
  %519 = load ptr, ptr %518, align 8, !tbaa !45
  %520 = getelementptr inbounds %struct.mbedtls_x509_crt, ptr %519, i32 0, i32 11
  store ptr %520, ptr %13, align 8, !tbaa !5
  %521 = load ptr, ptr %13, align 8, !tbaa !5
  %522 = call i32 @mbedtls_pk_can_do(ptr noundef %521, i32 noundef 2)
  %523 = icmp ne i32 %522, 0
  br i1 %523, label %524, label %549

524:                                              ; preds = %514
  %525 = load ptr, ptr %3, align 8, !tbaa !5
  %526 = load ptr, ptr %13, align 8, !tbaa !5
  %527 = getelementptr inbounds { ptr, ptr }, ptr %526, i32 0, i32 0
  %528 = load ptr, ptr %527, align 8
  %529 = getelementptr inbounds { ptr, ptr }, ptr %526, i32 0, i32 1
  %530 = load ptr, ptr %529, align 8
  %531 = call ptr @mbedtls_pk_ec(ptr %528, ptr %530)
  %532 = getelementptr inbounds %struct.mbedtls_ecp_keypair, ptr %531, i32 0, i32 0
  %533 = getelementptr inbounds %struct.mbedtls_ecp_group, ptr %532, i32 0, i32 0
  %534 = load i32, ptr %533, align 8, !tbaa !67
  %535 = call i32 @mbedtls_ssl_check_curve(ptr noundef %525, i32 noundef %534)
  %536 = icmp ne i32 %535, 0
  br i1 %536, label %537, label %549

537:                                              ; preds = %524
  %538 = load ptr, ptr %3, align 8, !tbaa !5
  %539 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %538, i32 0, i32 14
  %540 = load ptr, ptr %539, align 8, !tbaa !36
  %541 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %540, i32 0, i32 7
  %542 = load i32, ptr %541, align 8, !tbaa !37
  %543 = or i32 %542, 65536
  store i32 %543, ptr %541, align 8, !tbaa !37
  %544 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef %544, i32 noundef 1, ptr noundef @.str, i32 noundef 4604, ptr noundef @.str.99)
  %545 = load i32, ptr %4, align 4, !tbaa !9
  %546 = icmp eq i32 %545, 0
  br i1 %546, label %547, label %548

547:                                              ; preds = %537
  store i32 -31232, ptr %4, align 4, !tbaa !9
  br label %548

548:                                              ; preds = %547, %537
  br label %549

549:                                              ; preds = %548, %524, %514
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  %550 = load ptr, ptr %3, align 8, !tbaa !5
  %551 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %550, i32 0, i32 14
  %552 = load ptr, ptr %551, align 8, !tbaa !36
  %553 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %552, i32 0, i32 6
  %554 = load ptr, ptr %553, align 8, !tbaa !45
  %555 = load ptr, ptr %7, align 8, !tbaa !5
  %556 = load ptr, ptr %3, align 8, !tbaa !5
  %557 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %556, i32 0, i32 0
  %558 = load ptr, ptr %557, align 8, !tbaa !19
  %559 = getelementptr inbounds %struct.mbedtls_ssl_config, ptr %558, i32 0, i32 46
  %560 = load i32, ptr %559, align 4
  %561 = and i32 %560, 1
  %562 = icmp ne i32 %561, 0
  %563 = xor i1 %562, true
  %564 = zext i1 %563 to i32
  %565 = load ptr, ptr %3, align 8, !tbaa !5
  %566 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %565, i32 0, i32 14
  %567 = load ptr, ptr %566, align 8, !tbaa !36
  %568 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %567, i32 0, i32 7
  %569 = call i32 @mbedtls_ssl_check_cert_usage(ptr noundef %554, ptr noundef %555, i32 noundef %564, ptr noundef %568)
  %570 = icmp ne i32 %569, 0
  br i1 %570, label %571, label %577

571:                                              ; preds = %549
  %572 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef %572, i32 noundef 1, ptr noundef @.str, i32 noundef 4616, ptr noundef @.str.100)
  %573 = load i32, ptr %4, align 4, !tbaa !9
  %574 = icmp eq i32 %573, 0
  br i1 %574, label %575, label %576

575:                                              ; preds = %571
  store i32 -31232, ptr %4, align 4, !tbaa !9
  br label %576

576:                                              ; preds = %575, %571
  br label %577

577:                                              ; preds = %576, %549
  %578 = load i32, ptr %8, align 4, !tbaa !9
  %579 = icmp eq i32 %578, 1
  br i1 %579, label %580, label %587

580:                                              ; preds = %577
  %581 = load i32, ptr %4, align 4, !tbaa !9
  %582 = icmp eq i32 %581, -9984
  br i1 %582, label %586, label %583

583:                                              ; preds = %580
  %584 = load i32, ptr %4, align 4, !tbaa !9
  %585 = icmp eq i32 %584, -31232
  br i1 %585, label %586, label %587

586:                                              ; preds = %583, %580
  store i32 0, ptr %4, align 4, !tbaa !9
  br label %587

587:                                              ; preds = %586, %583, %577
  %588 = load ptr, ptr %11, align 8, !tbaa !5
  %589 = icmp eq ptr %588, null
  br i1 %589, label %590, label %595

590:                                              ; preds = %587
  %591 = load i32, ptr %8, align 4, !tbaa !9
  %592 = icmp eq i32 %591, 2
  br i1 %592, label %593, label %595

593:                                              ; preds = %590
  %594 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef %594, i32 noundef 1, ptr noundef @.str, i32 noundef 4636, ptr noundef @.str.101)
  store i32 -30336, ptr %4, align 4, !tbaa !9
  br label %595

595:                                              ; preds = %593, %590, %587
  %596 = load i32, ptr %4, align 4, !tbaa !9
  %597 = icmp ne i32 %596, 0
  br i1 %597, label %598, label %702

598:                                              ; preds = %595
  %599 = load ptr, ptr %3, align 8, !tbaa !5
  %600 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %599, i32 0, i32 14
  %601 = load ptr, ptr %600, align 8, !tbaa !36
  %602 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %601, i32 0, i32 7
  %603 = load i32, ptr %602, align 8, !tbaa !37
  %604 = and i32 %603, 256
  %605 = icmp ne i32 %604, 0
  br i1 %605, label %606, label %607

606:                                              ; preds = %598
  store i8 49, ptr %9, align 1, !tbaa !43
  br label %698

607:                                              ; preds = %598
  %608 = load ptr, ptr %3, align 8, !tbaa !5
  %609 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %608, i32 0, i32 14
  %610 = load ptr, ptr %609, align 8, !tbaa !36
  %611 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %610, i32 0, i32 7
  %612 = load i32, ptr %611, align 8, !tbaa !37
  %613 = and i32 %612, 4
  %614 = icmp ne i32 %613, 0
  br i1 %614, label %615, label %616

615:                                              ; preds = %607
  store i8 42, ptr %9, align 1, !tbaa !43
  br label %697

616:                                              ; preds = %607
  %617 = load ptr, ptr %3, align 8, !tbaa !5
  %618 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %617, i32 0, i32 14
  %619 = load ptr, ptr %618, align 8, !tbaa !36
  %620 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %619, i32 0, i32 7
  %621 = load i32, ptr %620, align 8, !tbaa !37
  %622 = and i32 %621, 2048
  %623 = icmp ne i32 %622, 0
  br i1 %623, label %624, label %625

624:                                              ; preds = %616
  store i8 43, ptr %9, align 1, !tbaa !43
  br label %696

625:                                              ; preds = %616
  %626 = load ptr, ptr %3, align 8, !tbaa !5
  %627 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %626, i32 0, i32 14
  %628 = load ptr, ptr %627, align 8, !tbaa !36
  %629 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %628, i32 0, i32 7
  %630 = load i32, ptr %629, align 8, !tbaa !37
  %631 = and i32 %630, 4096
  %632 = icmp ne i32 %631, 0
  br i1 %632, label %633, label %634

633:                                              ; preds = %625
  store i8 43, ptr %9, align 1, !tbaa !43
  br label %695

634:                                              ; preds = %625
  %635 = load ptr, ptr %3, align 8, !tbaa !5
  %636 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %635, i32 0, i32 14
  %637 = load ptr, ptr %636, align 8, !tbaa !36
  %638 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %637, i32 0, i32 7
  %639 = load i32, ptr %638, align 8, !tbaa !37
  %640 = and i32 %639, 8192
  %641 = icmp ne i32 %640, 0
  br i1 %641, label %642, label %643

642:                                              ; preds = %634
  store i8 43, ptr %9, align 1, !tbaa !43
  br label %694

643:                                              ; preds = %634
  %644 = load ptr, ptr %3, align 8, !tbaa !5
  %645 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %644, i32 0, i32 14
  %646 = load ptr, ptr %645, align 8, !tbaa !36
  %647 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %646, i32 0, i32 7
  %648 = load i32, ptr %647, align 8, !tbaa !37
  %649 = and i32 %648, 32768
  %650 = icmp ne i32 %649, 0
  br i1 %650, label %651, label %652

651:                                              ; preds = %643
  store i8 43, ptr %9, align 1, !tbaa !43
  br label %693

652:                                              ; preds = %643
  %653 = load ptr, ptr %3, align 8, !tbaa !5
  %654 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %653, i32 0, i32 14
  %655 = load ptr, ptr %654, align 8, !tbaa !36
  %656 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %655, i32 0, i32 7
  %657 = load i32, ptr %656, align 8, !tbaa !37
  %658 = and i32 %657, 65536
  %659 = icmp ne i32 %658, 0
  br i1 %659, label %660, label %661

660:                                              ; preds = %652
  store i8 43, ptr %9, align 1, !tbaa !43
  br label %692

661:                                              ; preds = %652
  %662 = load ptr, ptr %3, align 8, !tbaa !5
  %663 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %662, i32 0, i32 14
  %664 = load ptr, ptr %663, align 8, !tbaa !36
  %665 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %664, i32 0, i32 7
  %666 = load i32, ptr %665, align 8, !tbaa !37
  %667 = and i32 %666, 1
  %668 = icmp ne i32 %667, 0
  br i1 %668, label %669, label %670

669:                                              ; preds = %661
  store i8 45, ptr %9, align 1, !tbaa !43
  br label %691

670:                                              ; preds = %661
  %671 = load ptr, ptr %3, align 8, !tbaa !5
  %672 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %671, i32 0, i32 14
  %673 = load ptr, ptr %672, align 8, !tbaa !36
  %674 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %673, i32 0, i32 7
  %675 = load i32, ptr %674, align 8, !tbaa !37
  %676 = and i32 %675, 2
  %677 = icmp ne i32 %676, 0
  br i1 %677, label %678, label %679

678:                                              ; preds = %670
  store i8 44, ptr %9, align 1, !tbaa !43
  br label %690

679:                                              ; preds = %670
  %680 = load ptr, ptr %3, align 8, !tbaa !5
  %681 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %680, i32 0, i32 14
  %682 = load ptr, ptr %681, align 8, !tbaa !36
  %683 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %682, i32 0, i32 7
  %684 = load i32, ptr %683, align 8, !tbaa !37
  %685 = and i32 %684, 8
  %686 = icmp ne i32 %685, 0
  br i1 %686, label %687, label %688

687:                                              ; preds = %679
  store i8 48, ptr %9, align 1, !tbaa !43
  br label %689

688:                                              ; preds = %679
  store i8 46, ptr %9, align 1, !tbaa !43
  br label %689

689:                                              ; preds = %688, %687
  br label %690

690:                                              ; preds = %689, %678
  br label %691

691:                                              ; preds = %690, %669
  br label %692

692:                                              ; preds = %691, %660
  br label %693

693:                                              ; preds = %692, %651
  br label %694

694:                                              ; preds = %693, %642
  br label %695

695:                                              ; preds = %694, %633
  br label %696

696:                                              ; preds = %695, %624
  br label %697

697:                                              ; preds = %696, %615
  br label %698

698:                                              ; preds = %697, %606
  %699 = load ptr, ptr %3, align 8, !tbaa !5
  %700 = load i8, ptr %9, align 1, !tbaa !43
  %701 = call i32 @mbedtls_ssl_send_alert_message(ptr noundef %699, i8 noundef zeroext 2, i8 noundef zeroext %700)
  br label %702

702:                                              ; preds = %698, %595
  %703 = load ptr, ptr %3, align 8, !tbaa !5
  %704 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %703, i32 0, i32 14
  %705 = load ptr, ptr %704, align 8, !tbaa !36
  %706 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %705, i32 0, i32 7
  %707 = load i32, ptr %706, align 8, !tbaa !37
  %708 = icmp ne i32 %707, 0
  br i1 %708, label %709, label %716

709:                                              ; preds = %702
  %710 = load ptr, ptr %3, align 8, !tbaa !5
  %711 = load ptr, ptr %3, align 8, !tbaa !5
  %712 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %711, i32 0, i32 14
  %713 = load ptr, ptr %712, align 8, !tbaa !36
  %714 = getelementptr inbounds %struct.mbedtls_ssl_session, ptr %713, i32 0, i32 7
  %715 = load i32, ptr %714, align 8, !tbaa !37
  call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef %710, i32 noundef 3, ptr noundef @.str, i32 noundef 4675, ptr noundef @.str.102, i32 noundef %715)
  br label %718

716:                                              ; preds = %702
  %717 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef %717, i32 noundef 3, ptr noundef @.str, i32 noundef 4679, ptr noundef @.str.103)
  br label %718

718:                                              ; preds = %716, %709
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %719

719:                                              ; preds = %718, %446
  %720 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef %720, i32 noundef 2, ptr noundef @.str, i32 noundef 4684, ptr noundef @.str.104)
  %721 = load i32, ptr %4, align 4, !tbaa !9
  store i32 %721, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %722

722:                                              ; preds = %719, %441, %392, %355, %333, %297, %270, %241, %197, %176, %169, %168, %109, %95, %65, %46
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  %723 = load i32, ptr %2, align 4
  ret i32 %723
}

declare void @mbedtls_x509_crt_free(ptr noundef) #1

; Function Attrs: nounwind
declare void @free(ptr noundef) #5

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #6

declare void @mbedtls_x509_crt_init(ptr noundef) #1

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

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @mbedtls_pk_ec(ptr, ptr) #2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint 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 = { nounwind willreturn memory(read) "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 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 #5 = { 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 #6 = { nounwind allocsize(0,1) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { nounwind allocsize(0,1) }

!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, !6, i64 128}
!12 = !{!"mbedtls_ssl_context", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !10, i64 216, !13, i64 224, !13, i64 232, !14, i64 240, !13, i64 248, !13, i64 256, !13, i64 264, !13, i64 272, !10, i64 280, !10, i64 284, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !10, i64 336, !13, i64 344, !13, i64 352, !7, i64 360, !10, i64 364, !6, i64 368, !6, i64 376, !6, i64 384, !13, i64 392, !10, i64 400, !13, i64 408, !7, i64 416, !7, i64 428}
!13 = !{!"long", !7, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!16, !6, i64 0}
!16 = !{!"mbedtls_ssl_transform", !6, i64 0, !10, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !7, i64 48, !7, i64 64, !17, i64 80, !17, i64 104, !18, i64 128, !18, i64 216}
!17 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16, !6, i64 24, !7, i64 32, !13, i64 48, !7, i64 56, !13, i64 72, !6, i64 80}
!19 = !{!12, !6, i64 0}
!20 = !{!21, !10, i64 24}
!21 = !{!"mbedtls_ssl_ciphersuite_t", !10, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !7, i64 44}
!22 = !{!12, !10, i64 8}
!23 = !{!12, !6, i64 96}
!24 = !{!25, !10, i64 904}
!25 = !{!"mbedtls_ssl_handshake_params", !26, i64 0, !27, i64 8, !29, i64 256, !6, i64 872, !6, i64 880, !13, i64 888, !6, i64 896, !10, i64 904, !6, i64 912, !6, i64 920, !6, i64 928, !10, i64 936, !10, i64 940, !6, i64 944, !7, i64 952, !6, i64 960, !10, i64 968, !7, i64 972, !6, i64 976, !6, i64 984, !10, i64 992, !6, i64 1000, !7, i64 1008, !32, i64 1016, !33, i64 1104, !34, i64 1196, !35, i64 1304, !6, i64 1520, !6, i64 1528, !6, i64 1536, !6, i64 1544, !13, i64 1552, !7, i64 1560, !7, i64 1624, !10, i64 2684, !10, i64 2688, !10, i64 2692, !10, i64 2696, !10, i64 2700, !10, i64 2704}
!26 = !{!"mbedtls_ssl_sig_hash_set_t", !10, i64 0, !10, i64 4}
!27 = !{!"", !13, i64 0, !28, i64 8, !28, i64 32, !28, i64 56, !28, i64 80, !28, i64 104, !28, i64 128, !28, i64 152, !28, i64 176, !28, i64 200, !28, i64 224}
!28 = !{!"", !10, i64 0, !13, i64 8, !6, i64 16}
!29 = !{!"", !30, i64 0, !28, i64 248, !31, i64 272, !31, i64 344, !28, i64 416, !10, i64 440, !31, i64 448, !31, i64 520, !28, i64 592}
!30 = !{!"", !10, i64 0, !28, i64 8, !28, i64 32, !28, i64 56, !31, i64 80, !28, i64 152, !13, i64 176, !13, i64 184, !10, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !13, i64 240}
!31 = !{!"", !28, i64 0, !28, i64 24, !28, i64 48}
!32 = !{!"", !7, i64 0, !7, i64 8, !7, i64 24}
!33 = !{!"", !7, i64 0, !7, i64 8, !7, i64 28}
!34 = !{!"", !7, i64 0, !7, i64 8, !7, i64 40, !10, i64 104}
!35 = !{!"", !7, i64 0, !7, i64 16, !7, i64 80, !10, i64 208}
!36 = !{!12, !6, i64 88}
!37 = !{!38, !10, i64 112}
!38 = !{!"mbedtls_ssl_session", !13, i64 0, !10, i64 8, !10, i64 12, !13, i64 16, !7, i64 24, !7, i64 56, !6, i64 104, !10, i64 112, !6, i64 120, !13, i64 128, !10, i64 136, !7, i64 140, !10, i64 144, !10, i64 148}
!39 = !{!12, !10, i64 24}
!40 = !{!12, !13, i64 272}
!41 = !{!12, !10, i64 216}
!42 = !{!12, !6, i64 200}
!43 = !{!7, !7, i64 0}
!44 = !{!13, !13, i64 0}
!45 = !{!38, !6, i64 104}
!46 = distinct !{!46, !47}
!47 = !{!"llvm.loop.mustprogress"}
!48 = !{!12, !10, i64 12}
!49 = !{!12, !6, i64 80}
!50 = !{!51, !13, i64 8}
!51 = !{!"mbedtls_x509_crt", !52, i64 0, !52, i64 24, !10, i64 48, !52, i64 56, !52, i64 80, !52, i64 104, !52, i64 128, !53, i64 152, !53, i64 216, !54, i64 280, !54, i64 304, !55, i64 328, !52, i64 344, !52, i64 368, !52, i64 392, !56, i64 416, !10, i64 448, !10, i64 452, !10, i64 456, !10, i64 460, !56, i64 464, !7, i64 496, !52, i64 504, !10, i64 528, !10, i64 532, !6, i64 536, !6, i64 544}
!52 = !{!"mbedtls_asn1_buf", !10, i64 0, !13, i64 8, !6, i64 16}
!53 = !{!"mbedtls_asn1_named_data", !52, i64 0, !52, i64 24, !6, i64 48, !7, i64 56}
!54 = !{!"mbedtls_x509_time", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!55 = !{!"", !6, i64 0, !6, i64 8}
!56 = !{!"mbedtls_asn1_sequence", !52, i64 0, !6, i64 24}
!57 = !{!51, !6, i64 16}
!58 = !{!25, !6, i64 920}
!59 = !{!25, !6, i64 928}
!60 = !{!61, !6, i64 216}
!61 = !{!"mbedtls_ssl_config", !7, i64 0, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !28, i64 248, !28, i64 272, !6, i64 296, !13, i64 304, !6, i64 312, !13, i64 320, !6, i64 328, !10, i64 336, !10, i64 340, !10, i64 344, !10, i64 348, !7, i64 352, !10, i64 360, !10, i64 364, !7, i64 368, !7, i64 369, !7, i64 370, !7, i64 371, !10, i64 372, !10, i64 372, !10, i64 372, !10, i64 372, !10, i64 372, !10, i64 372, !10, i64 373, !10, i64 373, !10, i64 373, !10, i64 373, !10, i64 373, !10, i64 373, !10, i64 374, !10, i64 374, !10, i64 374}
!62 = !{!61, !6, i64 224}
!63 = !{!61, !6, i64 200}
!64 = !{!12, !6, i64 368}
!65 = !{!61, !6, i64 104}
!66 = !{!61, !6, i64 112}
!67 = !{!68, !10, i64 0}
!68 = !{!"", !30, i64 0, !28, i64 248, !31, i64 272}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [97 x i8], align 1
@.str.60 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.88 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.89 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.90 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.91 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.92 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.93 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.94 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.95 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.96 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.97 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.98 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.99 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.100 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.101 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.102 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.103 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.104 = external hidden unnamed_addr constant [21 x i8], align 1

declare void @mbedtls_debug_print_msg(ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #0

declare void @mbedtls_debug_print_ret(ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @mbedtls_ssl_hs_hdr_len(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i32 @mbedtls_ssl_read_record(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @mbedtls_ssl_send_alert_message(ptr noundef, i8 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #2

declare void @mbedtls_debug_print_crt(ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @mbedtls_ssl_parse_certificate(ptr noundef %0) local_unnamed_addr #2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 128
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = load ptr, ptr %3, align 8, !tbaa !13
  %5 = load ptr, ptr %0, align 8, !tbaa !17
  %6 = getelementptr inbounds i8, ptr %5, i64 372
  %7 = load i32, ptr %6, align 4
  %8 = lshr i32 %7, 2
  %9 = and i32 %8, 3
  tail call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef nonnull %0, i32 noundef 2, ptr noundef nonnull @.str, i32 noundef 4320, ptr noundef nonnull @.str.88) #6
  %10 = getelementptr inbounds i8, ptr %4, i64 24
  %11 = load i32, ptr %10, align 8, !tbaa !18
  switch i32 %11, label %16 [
    i32 5, label %12
    i32 6, label %12
    i32 8, label %12
    i32 11, label %12
  ]

12:                                               ; preds = %1, %1, %1, %1
  tail call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef nonnull %0, i32 noundef 2, ptr noundef nonnull @.str, i32 noundef 4327, ptr noundef nonnull @.str.89) #6
  %13 = getelementptr inbounds i8, ptr %0, i64 8
  %14 = load i32, ptr %13, align 8, !tbaa !20
  %15 = add nsw i32 %14, 1
  store i32 %15, ptr %13, align 8, !tbaa !20
  br label %290

16:                                               ; preds = %1
  %17 = load ptr, ptr %0, align 8, !tbaa !17
  %18 = getelementptr inbounds i8, ptr %17, i64 372
  %19 = load i32, ptr %18, align 4
  %20 = and i32 %19, 1
  %.not = icmp ne i32 %20, 0
  %21 = icmp eq i32 %11, 7
  %or.cond221 = and i1 %21, %.not
  br i1 %or.cond221, label %22, label %26

22:                                               ; preds = %16
  tail call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef nonnull %0, i32 noundef 2, ptr noundef nonnull @.str, i32 noundef 4336, ptr noundef nonnull @.str.89) #6
  %23 = getelementptr inbounds i8, ptr %0, i64 8
  %24 = load i32, ptr %23, align 8, !tbaa !20
  %25 = add nsw i32 %24, 1
  store i32 %25, ptr %23, align 8, !tbaa !20
  br label %290

26:                                               ; preds = %16
  %27 = getelementptr inbounds i8, ptr %0, i64 96
  %28 = load ptr, ptr %27, align 8, !tbaa !21
  %29 = getelementptr inbounds i8, ptr %28, i64 904
  %30 = load i32, ptr %29, align 8, !tbaa !22
  %.not189 = icmp eq i32 %30, 3
  %spec.select = select i1 %.not189, i32 %9, i32 %30
  %31 = icmp eq i32 %spec.select, 0
  %or.cond = select i1 %.not, i1 %31, i1 false
  br i1 %or.cond, label %32, label %39

32:                                               ; preds = %26
  %33 = getelementptr inbounds i8, ptr %0, i64 88
  %34 = load ptr, ptr %33, align 8, !tbaa !34
  %35 = getelementptr inbounds i8, ptr %34, i64 112
  store i32 128, ptr %35, align 8, !tbaa !35
  tail call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef nonnull %0, i32 noundef 2, ptr noundef nonnull @.str, i32 noundef 4350, ptr noundef nonnull @.str.89) #6
  %36 = getelementptr inbounds i8, ptr %0, i64 8
  %37 = load i32, ptr %36, align 8, !tbaa !20
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %36, align 8, !tbaa !20
  br label %290

39:                                               ; preds = %26
  %40 = tail call i32 @mbedtls_ssl_read_record(ptr noundef nonnull %0)
  %.not190 = icmp eq i32 %40, 0
  br i1 %.not190, label %42, label %41

41:                                               ; preds = %39
  tail call void @mbedtls_debug_print_ret(ptr noundef nonnull %0, i32 noundef 1, ptr noundef nonnull @.str, i32 noundef 4360, ptr noundef nonnull @.str.90, i32 noundef %40) #6
  br label %290

42:                                               ; preds = %39
  %43 = getelementptr inbounds i8, ptr %0, i64 8
  %44 = load i32, ptr %43, align 8, !tbaa !20
  %45 = add nsw i32 %44, 1
  store i32 %45, ptr %43, align 8, !tbaa !20
  %46 = load ptr, ptr %0, align 8, !tbaa !17
  %47 = getelementptr inbounds i8, ptr %46, i64 372
  %48 = load i32, ptr %47, align 4
  %49 = and i32 %48, 1
  %.not191 = icmp eq i32 %49, 0
  br i1 %.not191, label %77, label %50

50:                                               ; preds = %42
  %51 = getelementptr inbounds i8, ptr %0, i64 24
  %52 = load i32, ptr %51, align 8, !tbaa !37
  %.not192 = icmp eq i32 %52, 0
  br i1 %.not192, label %77, label %53

53:                                               ; preds = %50
  %54 = getelementptr inbounds i8, ptr %0, i64 272
  %55 = load i64, ptr %54, align 8, !tbaa !38
  %56 = tail call i64 @mbedtls_ssl_hs_hdr_len(ptr noundef nonnull %0)
  %57 = add i64 %56, 3
  %58 = icmp eq i64 %55, %57
  br i1 %58, label %59, label %77

59:                                               ; preds = %53
  %60 = getelementptr inbounds i8, ptr %0, i64 216
  %61 = load i32, ptr %60, align 8, !tbaa !39
  %62 = icmp eq i32 %61, 22
  br i1 %62, label %63, label %77

63:                                               ; preds = %59
  %64 = getelementptr inbounds i8, ptr %0, i64 200
  %65 = load ptr, ptr %64, align 8, !tbaa !40
  %66 = load i8, ptr %65, align 1, !tbaa !41
  %67 = icmp eq i8 %66, 11
  br i1 %67, label %68, label %77

68:                                               ; preds = %63
  %69 = tail call i64 @mbedtls_ssl_hs_hdr_len(ptr noundef nonnull %0)
  %70 = getelementptr inbounds i8, ptr %65, i64 %69
  %bcmp = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(3) %70, ptr noundef nonnull dereferenceable(3) @.str.60, i64 3)
  %71 = icmp eq i32 %bcmp, 0
  br i1 %71, label %72, label %77

72:                                               ; preds = %68
  tail call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef nonnull %0, i32 noundef 1, ptr noundef nonnull @.str, i32 noundef 4403, ptr noundef nonnull @.str.91) #6
  %73 = getelementptr inbounds i8, ptr %0, i64 88
  %74 = load ptr, ptr %73, align 8, !tbaa !34
  %75 = getelementptr inbounds i8, ptr %74, i64 112
  store i32 64, ptr %75, align 8, !tbaa !35
  %76 = icmp eq i32 %spec.select, 1
  %. = select i1 %76, i32 0, i32 -29824
  br label %290

77:                                               ; preds = %53, %59, %63, %68, %50, %42
  %78 = getelementptr inbounds i8, ptr %0, i64 216
  %79 = load i32, ptr %78, align 8, !tbaa !39
  %.not193 = icmp eq i32 %79, 22
  br i1 %.not193, label %82, label %80

80:                                               ; preds = %77
  tail call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef nonnull %0, i32 noundef 1, ptr noundef nonnull @.str, i32 noundef 4421, ptr noundef nonnull @.str.92) #6
  %81 = tail call i32 @mbedtls_ssl_send_alert_message(ptr noundef nonnull %0, i8 noundef zeroext 2, i8 noundef zeroext 10)
  br label %290

82:                                               ; preds = %77
  %83 = getelementptr inbounds i8, ptr %0, i64 200
  %84 = load ptr, ptr %83, align 8, !tbaa !40
  %85 = load i8, ptr %84, align 1, !tbaa !41
  %.not194 = icmp eq i8 %85, 11
  br i1 %.not194, label %86, label %92

86:                                               ; preds = %82
  %87 = getelementptr inbounds i8, ptr %0, i64 272
  %88 = load i64, ptr %87, align 8, !tbaa !38
  %89 = tail call i64 @mbedtls_ssl_hs_hdr_len(ptr noundef nonnull %0)
  %90 = add i64 %89, 6
  %91 = icmp ult i64 %88, %90
  br i1 %91, label %92, label %94

92:                                               ; preds = %86, %82
  tail call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef nonnull %0, i32 noundef 1, ptr noundef nonnull @.str, i32 noundef 4430, ptr noundef nonnull @.str.92) #6
  %93 = tail call i32 @mbedtls_ssl_send_alert_message(ptr noundef nonnull %0, i8 noundef zeroext 2, i8 noundef zeroext 50)
  br label %290

94:                                               ; preds = %86
  %95 = tail call i64 @mbedtls_ssl_hs_hdr_len(ptr noundef nonnull %0)
  %96 = load ptr, ptr %83, align 8, !tbaa !40
  %97 = getelementptr inbounds i8, ptr %96, i64 %95
  %98 = load i8, ptr %97, align 1, !tbaa !41
  %.not195 = icmp eq i8 %98, 0
  br i1 %.not195, label %99, label %112

99:                                               ; preds = %94
  %100 = getelementptr i8, ptr %97, i64 2
  %101 = load i8, ptr %100, align 1, !tbaa !41
  %102 = getelementptr i8, ptr %97, i64 1
  %103 = load i8, ptr %102, align 1, !tbaa !41
  %104 = zext i8 %103 to i64
  %105 = shl nuw nsw i64 %104, 8
  %106 = zext i8 %101 to i64
  %107 = or disjoint i64 %105, %106
  %108 = load i64, ptr %87, align 8, !tbaa !38
  %109 = tail call i64 @mbedtls_ssl_hs_hdr_len(ptr noundef nonnull %0)
  %110 = add i64 %109, 3
  %111 = add i64 %110, %107
  %.not196 = icmp eq i64 %108, %111
  br i1 %.not196, label %114, label %112

112:                                              ; preds = %99, %94
  tail call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef nonnull %0, i32 noundef 1, ptr noundef nonnull @.str, i32 noundef 4446, ptr noundef nonnull @.str.92) #6
  %113 = tail call i32 @mbedtls_ssl_send_alert_message(ptr noundef nonnull %0, i8 noundef zeroext 2, i8 noundef zeroext 50)
  br label %290

114:                                              ; preds = %99
  %115 = getelementptr inbounds i8, ptr %0, i64 88
  %116 = load ptr, ptr %115, align 8, !tbaa !34
  %117 = getelementptr inbounds i8, ptr %116, i64 104
  %118 = load ptr, ptr %117, align 8, !tbaa !42
  %.not197 = icmp eq ptr %118, null
  br i1 %.not197, label %123, label %119

119:                                              ; preds = %114
  tail call void @mbedtls_x509_crt_free(ptr noundef nonnull %118) #6
  %120 = load ptr, ptr %115, align 8, !tbaa !34
  %121 = getelementptr inbounds i8, ptr %120, i64 104
  %122 = load ptr, ptr %121, align 8, !tbaa !42
  tail call void @free(ptr noundef %122) #6
  %.pre = load ptr, ptr %115, align 8, !tbaa !34
  br label %123

123:                                              ; preds = %119, %114
  %124 = phi ptr [ %.pre, %119 ], [ %116, %114 ]
  %125 = tail call noalias dereferenceable_or_null(552) ptr @calloc(i64 noundef 1, i64 noundef 552) #7
  %126 = getelementptr inbounds i8, ptr %124, i64 104
  store ptr %125, ptr %126, align 8, !tbaa !42
  %127 = icmp eq ptr %125, null
  br i1 %127, label %128, label %130

128:                                              ; preds = %123
  tail call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef nonnull %0, i32 noundef 1, ptr noundef nonnull @.str, i32 noundef 4463, ptr noundef nonnull @.str.93, i64 noundef 552) #6
  %129 = tail call i32 @mbedtls_ssl_send_alert_message(ptr noundef nonnull %0, i8 noundef zeroext 2, i8 noundef zeroext 80)
  br label %290

130:                                              ; preds = %123
  tail call void @mbedtls_x509_crt_init(ptr noundef nonnull %125) #6
  %131 = add i64 %95, 3
  %132 = load i64, ptr %87, align 8, !tbaa !38
  %133 = icmp ult i64 %131, %132
  br i1 %133, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %130, %163
  %134 = phi i64 [ %164, %163 ], [ %132, %130 ]
  %.0175238 = phi i64 [ %152, %163 ], [ %131, %130 ]
  %135 = load ptr, ptr %83, align 8, !tbaa !40
  %136 = getelementptr inbounds i8, ptr %135, i64 %.0175238
  %137 = load i8, ptr %136, align 1, !tbaa !41
  %.not220 = icmp eq i8 %137, 0
  br i1 %.not220, label %140, label %138

138:                                              ; preds = %.lr.ph
  tail call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef nonnull %0, i32 noundef 1, ptr noundef nonnull @.str, i32 noundef 4477, ptr noundef nonnull @.str.92) #6
  %139 = tail call i32 @mbedtls_ssl_send_alert_message(ptr noundef nonnull %0, i8 noundef zeroext 2, i8 noundef zeroext 50)
  br label %290

140:                                              ; preds = %.lr.ph
  %141 = getelementptr i8, ptr %136, i64 1
  %142 = load i8, ptr %141, align 1, !tbaa !41
  %143 = zext i8 %142 to i64
  %144 = shl nuw nsw i64 %143, 8
  %145 = getelementptr i8, ptr %136, i64 2
  %146 = load i8, ptr %145, align 1, !tbaa !41
  %147 = zext i8 %146 to i64
  %148 = or disjoint i64 %144, %147
  %149 = add i64 %.0175238, 3
  %150 = icmp ult i64 %148, 128
  br i1 %150, label %154, label %151

151:                                              ; preds = %140
  %152 = add i64 %148, %149
  %153 = icmp ugt i64 %152, %134
  br i1 %153, label %154, label %156

154:                                              ; preds = %151, %140
  tail call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef nonnull %0, i32 noundef 1, ptr noundef nonnull @.str, i32 noundef 4489, ptr noundef nonnull @.str.92) #6
  %155 = tail call i32 @mbedtls_ssl_send_alert_message(ptr noundef nonnull %0, i8 noundef zeroext 2, i8 noundef zeroext 50)
  br label %290

156:                                              ; preds = %151
  %157 = load ptr, ptr %115, align 8, !tbaa !34
  %158 = getelementptr inbounds i8, ptr %157, i64 104
  %159 = load ptr, ptr %158, align 8, !tbaa !42
  %160 = getelementptr inbounds i8, ptr %135, i64 %149
  %161 = tail call i32 @mbedtls_x509_crt_parse_der(ptr noundef %159, ptr noundef %160, i64 noundef %148) #6
  switch i32 %161, label %.loopexit [
    i32 0, label %163
    i32 -9774, label %163
    i32 -10368, label %.loopexit.loopexit
    i32 -9600, label %.loopexit.loopexit251
  ]

.loopexit.loopexit:                               ; preds = %156
  br label %.loopexit

.loopexit.loopexit251:                            ; preds = %156
  br label %.loopexit

.loopexit:                                        ; preds = %156, %.loopexit.loopexit251, %.loopexit.loopexit
  %.0171 = phi i8 [ 80, %.loopexit.loopexit ], [ 43, %.loopexit.loopexit251 ], [ 42, %156 ]
  %162 = tail call i32 @mbedtls_ssl_send_alert_message(ptr noundef nonnull %0, i8 noundef zeroext 2, i8 noundef zeroext %.0171)
  tail call void @mbedtls_debug_print_ret(ptr noundef nonnull %0, i32 noundef 1, ptr noundef nonnull @.str, i32 noundef 4517, ptr noundef nonnull @.str.94, i32 noundef %161) #6
  br label %290

163:                                              ; preds = %156, %156
  %164 = load i64, ptr %87, align 8, !tbaa !38
  %165 = icmp ult i64 %152, %164
  br i1 %165, label %.lr.ph, label %._crit_edge, !llvm.loop !43

._crit_edge:                                      ; preds = %163, %130
  %.0173.lcssa = phi i32 [ 0, %130 ], [ %161, %163 ]
  %166 = load ptr, ptr %115, align 8, !tbaa !34
  %167 = getelementptr inbounds i8, ptr %166, i64 104
  %168 = load ptr, ptr %167, align 8, !tbaa !42
  tail call void @mbedtls_debug_print_crt(ptr noundef nonnull %0, i32 noundef 3, ptr noundef nonnull @.str, i32 noundef 4524, ptr noundef nonnull @.str.95, ptr noundef %168) #6
  %169 = load ptr, ptr %0, align 8, !tbaa !17
  %170 = getelementptr inbounds i8, ptr %169, i64 372
  %171 = load i32, ptr %170, align 4
  %172 = and i32 %171, 1
  %173 = icmp eq i32 %172, 0
  br i1 %173, label %174, label %201

174:                                              ; preds = %._crit_edge
  %175 = getelementptr inbounds i8, ptr %0, i64 12
  %176 = load i32, ptr %175, align 4, !tbaa !45
  %177 = icmp eq i32 %176, 1
  br i1 %177, label %178, label %201

178:                                              ; preds = %174
  %179 = getelementptr inbounds i8, ptr %0, i64 80
  %180 = load ptr, ptr %179, align 8, !tbaa !46
  %181 = getelementptr inbounds i8, ptr %180, i64 104
  %182 = load ptr, ptr %181, align 8, !tbaa !42
  %183 = icmp eq ptr %182, null
  br i1 %183, label %184, label %186

184:                                              ; preds = %178
  tail call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef nonnull %0, i32 noundef 1, ptr noundef nonnull @.str, i32 noundef 4536, ptr noundef nonnull @.str.96) #6
  %185 = tail call i32 @mbedtls_ssl_send_alert_message(ptr noundef nonnull %0, i8 noundef zeroext 2, i8 noundef zeroext 49)
  br label %290

186:                                              ; preds = %178
  %187 = getelementptr inbounds i8, ptr %182, i64 8
  %188 = load i64, ptr %187, align 8, !tbaa !47
  %189 = load ptr, ptr %115, align 8, !tbaa !34
  %190 = getelementptr inbounds i8, ptr %189, i64 104
  %191 = load ptr, ptr %190, align 8, !tbaa !42
  %192 = getelementptr inbounds i8, ptr %191, i64 8
  %193 = load i64, ptr %192, align 8, !tbaa !47
  %.not198 = icmp eq i64 %188, %193
  br i1 %.not198, label %194, label %199

194:                                              ; preds = %186
  %195 = getelementptr inbounds i8, ptr %182, i64 16
  %196 = load ptr, ptr %195, align 8, !tbaa !54
  %197 = getelementptr inbounds i8, ptr %191, i64 16
  %198 = load ptr, ptr %197, align 8, !tbaa !54
  %bcmp199 = tail call i32 @bcmp(ptr %196, ptr %198, i64 %188)
  %.not200 = icmp eq i32 %bcmp199, 0
  br i1 %.not200, label %201, label %199

199:                                              ; preds = %194, %186
  tail call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef nonnull %0, i32 noundef 1, ptr noundef nonnull @.str, i32 noundef 4548, ptr noundef nonnull @.str.97) #6
  %200 = tail call i32 @mbedtls_ssl_send_alert_message(ptr noundef nonnull %0, i8 noundef zeroext 2, i8 noundef zeroext 49)
  br label %290

201:                                              ; preds = %194, %174, %._crit_edge
  br i1 %31, label %289, label %202

202:                                              ; preds = %201
  %203 = load ptr, ptr %27, align 8, !tbaa !21
  %204 = getelementptr inbounds i8, ptr %203, i64 920
  %205 = load ptr, ptr %204, align 8, !tbaa !55
  %.not202 = icmp eq ptr %205, null
  br i1 %.not202, label %208, label %206

206:                                              ; preds = %202
  %207 = getelementptr inbounds i8, ptr %203, i64 928
  br label %212

208:                                              ; preds = %202
  %209 = getelementptr inbounds i8, ptr %169, i64 216
  %210 = load ptr, ptr %209, align 8, !tbaa !56
  %211 = getelementptr inbounds i8, ptr %169, i64 224
  br label %212

212:                                              ; preds = %208, %206
  %.0170 = phi ptr [ %205, %206 ], [ %210, %208 ]
  %.0169.in = phi ptr [ %207, %206 ], [ %211, %208 ]
  %.0169 = load ptr, ptr %.0169.in, align 8, !tbaa !58
  %213 = load ptr, ptr %115, align 8, !tbaa !34
  %214 = getelementptr inbounds i8, ptr %213, i64 104
  %215 = load ptr, ptr %214, align 8, !tbaa !42
  %216 = getelementptr inbounds i8, ptr %169, i64 200
  %217 = load ptr, ptr %216, align 8, !tbaa !59
  %218 = getelementptr inbounds i8, ptr %0, i64 368
  %219 = load ptr, ptr %218, align 8, !tbaa !60
  %220 = getelementptr inbounds i8, ptr %213, i64 112
  %221 = getelementptr inbounds i8, ptr %169, i64 104
  %222 = load ptr, ptr %221, align 8, !tbaa !61
  %223 = getelementptr inbounds i8, ptr %169, i64 112
  %224 = load ptr, ptr %223, align 8, !tbaa !62
  %225 = tail call i32 @mbedtls_x509_crt_verify_with_profile(ptr noundef %215, ptr noundef %.0170, ptr noundef %.0169, ptr noundef %217, ptr noundef %219, ptr noundef nonnull %220, ptr noundef %222, ptr noundef %224) #6
  %.not203 = icmp eq i32 %225, 0
  br i1 %.not203, label %227, label %226

226:                                              ; preds = %212
  tail call void @mbedtls_debug_print_ret(ptr noundef nonnull %0, i32 noundef 1, ptr noundef nonnull @.str, i32 noundef 4587, ptr noundef nonnull @.str.98, i32 noundef %225) #6
  br label %227

227:                                              ; preds = %226, %212
  %228 = load ptr, ptr %115, align 8, !tbaa !34
  %229 = getelementptr inbounds i8, ptr %228, i64 104
  %230 = load ptr, ptr %229, align 8, !tbaa !42
  %231 = getelementptr inbounds i8, ptr %230, i64 328
  %232 = tail call i32 @mbedtls_pk_can_do(ptr noundef nonnull %231, i32 noundef 2) #6
  %.not204 = icmp eq i32 %232, 0
  br i1 %.not204, label %245, label %233

233:                                              ; preds = %227
  %234 = load ptr, ptr %231, align 8
  %235 = getelementptr inbounds i8, ptr %230, i64 336
  %236 = load ptr, ptr %235, align 8
  %237 = tail call ptr @mbedtls_pk_ec(ptr %234, ptr %236)
  %238 = load i32, ptr %237, align 8, !tbaa !63
  %239 = tail call i32 @mbedtls_ssl_check_curve(ptr noundef nonnull %0, i32 noundef %238)
  %.not205 = icmp eq i32 %239, 0
  br i1 %.not205, label %245, label %240

240:                                              ; preds = %233
  %241 = load ptr, ptr %115, align 8, !tbaa !34
  %242 = getelementptr inbounds i8, ptr %241, i64 112
  %243 = load i32, ptr %242, align 8, !tbaa !35
  %244 = or i32 %243, 65536
  store i32 %244, ptr %242, align 8, !tbaa !35
  tail call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef nonnull %0, i32 noundef 1, ptr noundef nonnull @.str, i32 noundef 4604, ptr noundef nonnull @.str.99) #6
  %spec.store.select = select i1 %.not203, i32 -31232, i32 %225
  br label %245

245:                                              ; preds = %240, %233, %227
  %.1174 = phi i32 [ %spec.store.select, %240 ], [ %225, %233 ], [ %225, %227 ]
  %246 = load ptr, ptr %115, align 8, !tbaa !34
  %247 = getelementptr inbounds i8, ptr %246, i64 104
  %248 = load ptr, ptr %247, align 8, !tbaa !42
  %249 = load ptr, ptr %0, align 8, !tbaa !17
  %250 = getelementptr inbounds i8, ptr %249, i64 372
  %251 = load i32, ptr %250, align 4
  %252 = and i32 %251, 1
  %253 = xor i32 %252, 1
  %254 = getelementptr inbounds i8, ptr %246, i64 112
  %255 = tail call i32 @mbedtls_ssl_check_cert_usage(ptr noundef %248, ptr noundef %4, i32 noundef %253, ptr noundef nonnull %254)
  %.not207 = icmp eq i32 %255, 0
  br i1 %.not207, label %258, label %256

256:                                              ; preds = %245
  tail call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef nonnull %0, i32 noundef 1, ptr noundef nonnull @.str, i32 noundef 4616, ptr noundef nonnull @.str.100) #6
  %257 = icmp eq i32 %.1174, 0
  %spec.store.select2 = select i1 %257, i32 -31232, i32 %.1174
  br label %258

258:                                              ; preds = %256, %245
  %.2 = phi i32 [ %spec.store.select2, %256 ], [ %.1174, %245 ]
  %259 = icmp eq ptr %.0170, null
  %260 = icmp eq i32 %spec.select, 2
  %or.cond6 = select i1 %259, i1 %260, i1 false
  br i1 %or.cond6, label %.thread, label %261

.thread:                                          ; preds = %258
  tail call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef nonnull %0, i32 noundef 1, ptr noundef nonnull @.str, i32 noundef 4636, ptr noundef nonnull @.str.101) #6
  br label %266

261:                                              ; preds = %258
  %262 = icmp eq i32 %spec.select, 1
  %263 = icmp eq i32 %.2, -9984
  %264 = icmp eq i32 %.2, -31232
  %or.cond4 = or i1 %263, %264
  %265 = and i1 %262, %or.cond4
  %.not208247 = icmp eq i32 %.2, 0
  %.not208 = or i1 %265, %.not208247
  br i1 %.not208, label %283, label %266

266:                                              ; preds = %.thread, %261
  %.4229 = phi i32 [ -30336, %.thread ], [ %.2, %261 ]
  %267 = load ptr, ptr %115, align 8, !tbaa !34
  %268 = getelementptr inbounds i8, ptr %267, i64 112
  %269 = load i32, ptr %268, align 8, !tbaa !35
  %270 = and i32 %269, 256
  %.not209 = icmp eq i32 %270, 0
  br i1 %.not209, label %271, label %281

271:                                              ; preds = %266
  %272 = and i32 %269, 4
  %.not210 = icmp eq i32 %272, 0
  br i1 %.not210, label %273, label %281

273:                                              ; preds = %271
  %274 = and i32 %269, 112640
  %or.cond226 = icmp eq i32 %274, 0
  br i1 %or.cond226, label %275, label %281

275:                                              ; preds = %273
  %276 = and i32 %269, 1
  %.not216 = icmp eq i32 %276, 0
  br i1 %.not216, label %277, label %281

277:                                              ; preds = %275
  %278 = and i32 %269, 2
  %.not217 = icmp eq i32 %278, 0
  br i1 %.not217, label %279, label %281

279:                                              ; preds = %277
  %280 = and i32 %269, 8
  %.not218 = icmp eq i32 %280, 0
  %.222 = select i1 %.not218, i8 46, i8 48
  br label %281

281:                                              ; preds = %279, %277, %275, %273, %271, %266
  %.1 = phi i8 [ 49, %266 ], [ 42, %271 ], [ 43, %273 ], [ 45, %275 ], [ 44, %277 ], [ %.222, %279 ]
  %282 = tail call i32 @mbedtls_ssl_send_alert_message(ptr noundef nonnull %0, i8 noundef zeroext 2, i8 noundef zeroext %.1)
  br label %283

283:                                              ; preds = %281, %261
  %.4230 = phi i32 [ %.4229, %281 ], [ 0, %261 ]
  %284 = load ptr, ptr %115, align 8, !tbaa !34
  %285 = getelementptr inbounds i8, ptr %284, i64 112
  %286 = load i32, ptr %285, align 8, !tbaa !35
  %.not219 = icmp eq i32 %286, 0
  br i1 %.not219, label %288, label %287

287:                                              ; preds = %283
  tail call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef nonnull %0, i32 noundef 3, ptr noundef nonnull @.str, i32 noundef 4675, ptr noundef nonnull @.str.102, i32 noundef %286) #6
  br label %289

288:                                              ; preds = %283
  tail call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef nonnull %0, i32 noundef 3, ptr noundef nonnull @.str, i32 noundef 4679, ptr noundef nonnull @.str.103) #6
  br label %289

289:                                              ; preds = %287, %288, %201
  %.5 = phi i32 [ %.0173.lcssa, %201 ], [ %.4230, %288 ], [ %.4230, %287 ]
  tail call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef nonnull %0, i32 noundef 2, ptr noundef nonnull @.str, i32 noundef 4684, ptr noundef nonnull @.str.104) #6
  br label %290

290:                                              ; preds = %72, %289, %199, %184, %.loopexit, %154, %138, %128, %112, %92, %80, %41, %32, %22, %12
  %.0 = phi i32 [ 0, %12 ], [ 0, %22 ], [ 0, %32 ], [ %40, %41 ], [ -30464, %80 ], [ -31232, %92 ], [ -31232, %112 ], [ -32512, %128 ], [ -31232, %138 ], [ -31232, %154 ], [ %161, %.loopexit ], [ -31232, %184 ], [ -31232, %199 ], [ %.5, %289 ], [ %., %72 ]
  ret i32 %.0
}

declare void @mbedtls_x509_crt_free(ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #4

declare void @mbedtls_x509_crt_init(ptr noundef) local_unnamed_addr #0

declare i32 @mbedtls_x509_crt_parse_der(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

declare i32 @mbedtls_x509_crt_verify_with_profile(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare i32 @mbedtls_pk_can_do(ptr noundef, i32 noundef) local_unnamed_addr #0

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @mbedtls_pk_ec(ptr, ptr) local_unnamed_addr #1

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

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #5

attributes #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 #1 = { inlinehint 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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #5 = { nofree nounwind willreturn memory(argmem: read) }
attributes #6 = { nounwind }
attributes #7 = { nounwind allocsize(0,1) }

!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, !7, i64 128}
!6 = !{!"mbedtls_ssl_context", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !7, i64 184, !7, i64 192, !7, i64 200, !7, i64 208, !10, i64 216, !11, i64 224, !11, i64 232, !12, i64 240, !11, i64 248, !11, i64 256, !11, i64 264, !11, i64 272, !10, i64 280, !10, i64 284, !7, i64 288, !7, i64 296, !7, i64 304, !7, i64 312, !7, i64 320, !7, i64 328, !10, i64 336, !11, i64 344, !11, i64 352, !8, i64 360, !10, i64 364, !7, i64 368, !7, i64 376, !7, i64 384, !11, i64 392, !10, i64 400, !11, i64 408, !8, i64 416, !8, i64 428}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"long", !8, i64 0}
!12 = !{!"short", !8, i64 0}
!13 = !{!14, !7, i64 0}
!14 = !{!"mbedtls_ssl_transform", !7, i64 0, !10, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !8, i64 48, !8, i64 64, !15, i64 80, !15, i64 104, !16, i64 128, !16, i64 216}
!15 = !{!"", !7, i64 0, !7, i64 8, !7, i64 16}
!16 = !{!"", !7, i64 0, !10, i64 8, !10, i64 12, !7, i64 16, !7, i64 24, !8, i64 32, !11, i64 48, !8, i64 56, !11, i64 72, !7, i64 80}
!17 = !{!6, !7, i64 0}
!18 = !{!19, !10, i64 24}
!19 = !{!"mbedtls_ssl_ciphersuite_t", !10, i64 0, !7, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 40, !8, i64 44}
!20 = !{!6, !10, i64 8}
!21 = !{!6, !7, i64 96}
!22 = !{!23, !10, i64 904}
!23 = !{!"mbedtls_ssl_handshake_params", !24, i64 0, !25, i64 8, !27, i64 256, !7, i64 872, !7, i64 880, !11, i64 888, !7, i64 896, !10, i64 904, !7, i64 912, !7, i64 920, !7, i64 928, !10, i64 936, !10, i64 940, !7, i64 944, !8, i64 952, !7, i64 960, !10, i64 968, !8, i64 972, !7, i64 976, !7, i64 984, !10, i64 992, !7, i64 1000, !8, i64 1008, !30, i64 1016, !31, i64 1104, !32, i64 1196, !33, i64 1304, !7, i64 1520, !7, i64 1528, !7, i64 1536, !7, i64 1544, !11, i64 1552, !8, i64 1560, !8, i64 1624, !10, i64 2684, !10, i64 2688, !10, i64 2692, !10, i64 2696, !10, i64 2700, !10, i64 2704}
!24 = !{!"mbedtls_ssl_sig_hash_set_t", !10, i64 0, !10, i64 4}
!25 = !{!"", !11, i64 0, !26, i64 8, !26, i64 32, !26, i64 56, !26, i64 80, !26, i64 104, !26, i64 128, !26, i64 152, !26, i64 176, !26, i64 200, !26, i64 224}
!26 = !{!"", !10, i64 0, !11, i64 8, !7, i64 16}
!27 = !{!"", !28, i64 0, !26, i64 248, !29, i64 272, !29, i64 344, !26, i64 416, !10, i64 440, !29, i64 448, !29, i64 520, !26, i64 592}
!28 = !{!"", !10, i64 0, !26, i64 8, !26, i64 32, !26, i64 56, !29, i64 80, !26, i64 152, !11, i64 176, !11, i64 184, !10, i64 192, !7, i64 200, !7, i64 208, !7, i64 216, !7, i64 224, !7, i64 232, !11, i64 240}
!29 = !{!"", !26, i64 0, !26, i64 24, !26, i64 48}
!30 = !{!"", !8, i64 0, !8, i64 8, !8, i64 24}
!31 = !{!"", !8, i64 0, !8, i64 8, !8, i64 28}
!32 = !{!"", !8, i64 0, !8, i64 8, !8, i64 40, !10, i64 104}
!33 = !{!"", !8, i64 0, !8, i64 16, !8, i64 80, !10, i64 208}
!34 = !{!6, !7, i64 88}
!35 = !{!36, !10, i64 112}
!36 = !{!"mbedtls_ssl_session", !11, i64 0, !10, i64 8, !10, i64 12, !11, i64 16, !8, i64 24, !8, i64 56, !7, i64 104, !10, i64 112, !7, i64 120, !11, i64 128, !10, i64 136, !8, i64 140, !10, i64 144, !10, i64 148}
!37 = !{!6, !10, i64 24}
!38 = !{!6, !11, i64 272}
!39 = !{!6, !10, i64 216}
!40 = !{!6, !7, i64 200}
!41 = !{!8, !8, i64 0}
!42 = !{!36, !7, i64 104}
!43 = distinct !{!43, !44}
!44 = !{!"llvm.loop.mustprogress"}
!45 = !{!6, !10, i64 12}
!46 = !{!6, !7, i64 80}
!47 = !{!48, !11, i64 8}
!48 = !{!"mbedtls_x509_crt", !49, i64 0, !49, i64 24, !10, i64 48, !49, i64 56, !49, i64 80, !49, i64 104, !49, i64 128, !50, i64 152, !50, i64 216, !51, i64 280, !51, i64 304, !52, i64 328, !49, i64 344, !49, i64 368, !49, i64 392, !53, i64 416, !10, i64 448, !10, i64 452, !10, i64 456, !10, i64 460, !53, i64 464, !8, i64 496, !49, i64 504, !10, i64 528, !10, i64 532, !7, i64 536, !7, i64 544}
!49 = !{!"mbedtls_asn1_buf", !10, i64 0, !11, i64 8, !7, i64 16}
!50 = !{!"mbedtls_asn1_named_data", !49, i64 0, !49, i64 24, !7, i64 48, !8, i64 56}
!51 = !{!"mbedtls_x509_time", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!52 = !{!"", !7, i64 0, !7, i64 8}
!53 = !{!"mbedtls_asn1_sequence", !49, i64 0, !7, i64 24}
!54 = !{!48, !7, i64 16}
!55 = !{!23, !7, i64 920}
!56 = !{!57, !7, i64 216}
!57 = !{!"mbedtls_ssl_config", !8, i64 0, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !7, i64 184, !7, i64 192, !7, i64 200, !7, i64 208, !7, i64 216, !7, i64 224, !7, i64 232, !7, i64 240, !26, i64 248, !26, i64 272, !7, i64 296, !11, i64 304, !7, i64 312, !11, i64 320, !7, i64 328, !10, i64 336, !10, i64 340, !10, i64 344, !10, i64 348, !8, i64 352, !10, i64 360, !10, i64 364, !8, i64 368, !8, i64 369, !8, i64 370, !8, i64 371, !10, i64 372, !10, i64 372, !10, i64 372, !10, i64 372, !10, i64 372, !10, i64 372, !10, i64 373, !10, i64 373, !10, i64 373, !10, i64 373, !10, i64 373, !10, i64 373, !10, i64 374, !10, i64 374, !10, i64 374}
!58 = !{!7, !7, i64 0}
!59 = !{!57, !7, i64 200}
!60 = !{!6, !7, i64 368}
!61 = !{!57, !7, i64 104}
!62 = !{!57, !7, i64 112}
!63 = !{!64, !10, i64 0}
!64 = !{!"", !28, i64 0, !26, i64 248, !29, i64 272}


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