; 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_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_mpi = type { i32, i64, ptr }
%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_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 }

@.str = external hidden unnamed_addr constant [97 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [8 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @mbedtls_ssl_psk_derive_premaster(ptr noundef %0, i32 noundef %1) #3 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %15, i32 0, i32 15
  %17 = load ptr, ptr %16, align 8, !tbaa !11
  %18 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %17, i32 0, i32 33
  %19 = getelementptr inbounds [1060 x i8], ptr %18, i64 0, i64 0
  store ptr %19, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %20, i64 1060
  store ptr %21, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %22, i32 0, i32 0
  %24 = load ptr, ptr %23, align 8, !tbaa !15
  %25 = getelementptr inbounds %struct.mbedtls_ssl_config, ptr %24, i32 0, i32 30
  %26 = load ptr, ptr %25, align 8, !tbaa !16
  store ptr %26, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %27, i32 0, i32 0
  %29 = load ptr, ptr %28, align 8, !tbaa !15
  %30 = getelementptr inbounds %struct.mbedtls_ssl_config, ptr %29, i32 0, i32 31
  %31 = load i64, ptr %30, align 8, !tbaa !19
  store i64 %31, ptr %9, align 8, !tbaa !20
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %32, i32 0, i32 15
  %34 = load ptr, ptr %33, align 8, !tbaa !11
  %35 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %34, i32 0, i32 4
  %36 = load ptr, ptr %35, align 8, !tbaa !21
  %37 = icmp ne ptr %36, null
  br i1 %37, label %38, label %49

38:                                               ; preds = %2
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %39, i32 0, i32 15
  %41 = load ptr, ptr %40, align 8, !tbaa !11
  %42 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %41, i32 0, i32 4
  %43 = load ptr, ptr %42, align 8, !tbaa !21
  store ptr %43, ptr %8, align 8, !tbaa !5
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %44, i32 0, i32 15
  %46 = load ptr, ptr %45, align 8, !tbaa !11
  %47 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %46, i32 0, i32 5
  %48 = load i64, ptr %47, align 8, !tbaa !32
  store i64 %48, ptr %9, align 8, !tbaa !20
  br label %49

49:                                               ; preds = %38, %2
  %50 = load i32, ptr %5, align 4, !tbaa !9
  %51 = icmp eq i32 %50, 5
  br i1 %51, label %52, label %88

52:                                               ; preds = %49
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = ptrtoint ptr %53 to i64
  %56 = ptrtoint ptr %54 to i64
  %57 = sub i64 %55, %56
  %58 = icmp slt i64 %57, 2
  br i1 %58, label %59, label %60

59:                                               ; preds = %52
  store i32 -28928, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %261

60:                                               ; preds = %52
  %61 = load i64, ptr %9, align 8, !tbaa !20
  %62 = lshr i64 %61, 8
  %63 = trunc i64 %62 to i8
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds i8, ptr %64, i32 1
  store ptr %65, ptr %6, align 8, !tbaa !5
  store i8 %63, ptr %64, align 1, !tbaa !33
  %66 = load i64, ptr %9, align 8, !tbaa !20
  %67 = trunc i64 %66 to i8
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds i8, ptr %68, i32 1
  store ptr %69, ptr %6, align 8, !tbaa !5
  store i8 %67, ptr %68, align 1, !tbaa !33
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = icmp ult ptr %70, %71
  br i1 %72, label %81, label %73

73:                                               ; preds = %60
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = ptrtoint ptr %74 to i64
  %77 = ptrtoint ptr %75 to i64
  %78 = sub i64 %76, %77
  %79 = load i64, ptr %9, align 8, !tbaa !20
  %80 = icmp ult i64 %78, %79
  br i1 %80, label %81, label %82

81:                                               ; preds = %73, %60
  store i32 -28928, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %261

82:                                               ; preds = %73
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = load i64, ptr %9, align 8, !tbaa !20
  call void @llvm.memset.p0.i64(ptr align 1 %83, i8 0, i64 %84, i1 false)
  %85 = load i64, ptr %9, align 8, !tbaa !20
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  %87 = getelementptr inbounds i8, ptr %86, i64 %85
  store ptr %87, ptr %6, align 8, !tbaa !5
  br label %211

88:                                               ; preds = %49
  %89 = load i32, ptr %5, align 4, !tbaa !9
  %90 = icmp eq i32 %89, 7
  br i1 %90, label %91, label %98

91:                                               ; preds = %88
  %92 = load ptr, ptr %6, align 8, !tbaa !5
  %93 = getelementptr inbounds i8, ptr %92, i32 1
  store ptr %93, ptr %6, align 8, !tbaa !5
  store i8 0, ptr %92, align 1, !tbaa !33
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = getelementptr inbounds i8, ptr %94, i32 1
  store ptr %95, ptr %6, align 8, !tbaa !5
  store i8 48, ptr %94, align 1, !tbaa !33
  %96 = load ptr, ptr %6, align 8, !tbaa !5
  %97 = getelementptr inbounds i8, ptr %96, i64 48
  store ptr %97, ptr %6, align 8, !tbaa !5
  br label %210

98:                                               ; preds = %88
  %99 = load i32, ptr %5, align 4, !tbaa !9
  %100 = icmp eq i32 %99, 6
  br i1 %100, label %101, label %152

101:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %102, i32 0, i32 15
  %104 = load ptr, ptr %103, align 8, !tbaa !11
  %105 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %104, i32 0, i32 1
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  %107 = getelementptr inbounds i8, ptr %106, i64 2
  %108 = load ptr, ptr %7, align 8, !tbaa !5
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = getelementptr inbounds i8, ptr %109, i64 2
  %111 = ptrtoint ptr %108 to i64
  %112 = ptrtoint ptr %110 to i64
  %113 = sub i64 %111, %112
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %114, i32 0, i32 0
  %116 = load ptr, ptr %115, align 8, !tbaa !15
  %117 = getelementptr inbounds %struct.mbedtls_ssl_config, ptr %116, i32 0, i32 3
  %118 = load ptr, ptr %117, align 8, !tbaa !34
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %119, i32 0, i32 0
  %121 = load ptr, ptr %120, align 8, !tbaa !15
  %122 = getelementptr inbounds %struct.mbedtls_ssl_config, ptr %121, i32 0, i32 4
  %123 = load ptr, ptr %122, align 8, !tbaa !35
  %124 = call i32 @mbedtls_dhm_calc_secret(ptr noundef %105, ptr noundef %107, i64 noundef %113, ptr noundef %12, ptr noundef %118, ptr noundef %123)
  store i32 %124, ptr %11, align 4, !tbaa !9
  %125 = icmp ne i32 %124, 0
  br i1 %125, label %126, label %130

126:                                              ; preds = %101
  %127 = load ptr, ptr %4, align 8, !tbaa !5
  %128 = load i32, ptr %11, align 4, !tbaa !9
  call void @mbedtls_debug_print_ret(ptr noundef %127, i32 noundef 1, ptr noundef @.str, i32 noundef 1145, ptr noundef @.str.22, i32 noundef %128)
  %129 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %129, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %149

130:                                              ; preds = %101
  %131 = load i64, ptr %12, align 8, !tbaa !20
  %132 = lshr i64 %131, 8
  %133 = trunc i64 %132 to i8
  %134 = load ptr, ptr %6, align 8, !tbaa !5
  %135 = getelementptr inbounds i8, ptr %134, i32 1
  store ptr %135, ptr %6, align 8, !tbaa !5
  store i8 %133, ptr %134, align 1, !tbaa !33
  %136 = load i64, ptr %12, align 8, !tbaa !20
  %137 = trunc i64 %136 to i8
  %138 = load ptr, ptr %6, align 8, !tbaa !5
  %139 = getelementptr inbounds i8, ptr %138, i32 1
  store ptr %139, ptr %6, align 8, !tbaa !5
  store i8 %137, ptr %138, align 1, !tbaa !33
  %140 = load i64, ptr %12, align 8, !tbaa !20
  %141 = load ptr, ptr %6, align 8, !tbaa !5
  %142 = getelementptr inbounds i8, ptr %141, i64 %140
  store ptr %142, ptr %6, align 8, !tbaa !5
  %143 = load ptr, ptr %4, align 8, !tbaa !5
  %144 = load ptr, ptr %4, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %144, i32 0, i32 15
  %146 = load ptr, ptr %145, align 8, !tbaa !11
  %147 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %146, i32 0, i32 1
  %148 = getelementptr inbounds %struct.mbedtls_dhm_context, ptr %147, i32 0, i32 6
  call void @mbedtls_debug_print_mpi(ptr noundef %143, i32 noundef 3, ptr noundef @.str, i32 noundef 1152, ptr noundef @.str.23, ptr noundef %148)
  store i32 0, ptr %10, align 4
  br label %149

149:                                              ; preds = %130, %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  %150 = load i32, ptr %10, align 4
  switch i32 %150, label %261 [
    i32 0, label %151
  ]

151:                                              ; preds = %149
  br label %209

152:                                              ; preds = %98
  %153 = load i32, ptr %5, align 4, !tbaa !9
  %154 = icmp eq i32 %153, 8
  br i1 %154, label %155, label %206

155:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %156 = load ptr, ptr %4, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %156, i32 0, i32 15
  %158 = load ptr, ptr %157, align 8, !tbaa !11
  %159 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %158, i32 0, i32 2
  %160 = load ptr, ptr %6, align 8, !tbaa !5
  %161 = getelementptr inbounds i8, ptr %160, i64 2
  %162 = load ptr, ptr %7, align 8, !tbaa !5
  %163 = load ptr, ptr %6, align 8, !tbaa !5
  %164 = getelementptr inbounds i8, ptr %163, i64 2
  %165 = ptrtoint ptr %162 to i64
  %166 = ptrtoint ptr %164 to i64
  %167 = sub i64 %165, %166
  %168 = load ptr, ptr %4, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %168, i32 0, i32 0
  %170 = load ptr, ptr %169, align 8, !tbaa !15
  %171 = getelementptr inbounds %struct.mbedtls_ssl_config, ptr %170, i32 0, i32 3
  %172 = load ptr, ptr %171, align 8, !tbaa !34
  %173 = load ptr, ptr %4, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %173, i32 0, i32 0
  %175 = load ptr, ptr %174, align 8, !tbaa !15
  %176 = getelementptr inbounds %struct.mbedtls_ssl_config, ptr %175, i32 0, i32 4
  %177 = load ptr, ptr %176, align 8, !tbaa !35
  %178 = call i32 @mbedtls_ecdh_calc_secret(ptr noundef %159, ptr noundef %14, ptr noundef %161, i64 noundef %167, ptr noundef %172, ptr noundef %177)
  store i32 %178, ptr %13, align 4, !tbaa !9
  %179 = icmp ne i32 %178, 0
  br i1 %179, label %180, label %184

180:                                              ; preds = %155
  %181 = load ptr, ptr %4, align 8, !tbaa !5
  %182 = load i32, ptr %13, align 4, !tbaa !9
  call void @mbedtls_debug_print_ret(ptr noundef %181, i32 noundef 1, ptr noundef @.str, i32 noundef 1166, ptr noundef @.str.24, i32 noundef %182)
  %183 = load i32, ptr %13, align 4, !tbaa !9
  store i32 %183, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %203

184:                                              ; preds = %155
  %185 = load i64, ptr %14, align 8, !tbaa !20
  %186 = lshr i64 %185, 8
  %187 = trunc i64 %186 to i8
  %188 = load ptr, ptr %6, align 8, !tbaa !5
  %189 = getelementptr inbounds i8, ptr %188, i32 1
  store ptr %189, ptr %6, align 8, !tbaa !5
  store i8 %187, ptr %188, align 1, !tbaa !33
  %190 = load i64, ptr %14, align 8, !tbaa !20
  %191 = trunc i64 %190 to i8
  %192 = load ptr, ptr %6, align 8, !tbaa !5
  %193 = getelementptr inbounds i8, ptr %192, i32 1
  store ptr %193, ptr %6, align 8, !tbaa !5
  store i8 %191, ptr %192, align 1, !tbaa !33
  %194 = load i64, ptr %14, align 8, !tbaa !20
  %195 = load ptr, ptr %6, align 8, !tbaa !5
  %196 = getelementptr inbounds i8, ptr %195, i64 %194
  store ptr %196, ptr %6, align 8, !tbaa !5
  %197 = load ptr, ptr %4, align 8, !tbaa !5
  %198 = load ptr, ptr %4, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %198, i32 0, i32 15
  %200 = load ptr, ptr %199, align 8, !tbaa !11
  %201 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %200, i32 0, i32 2
  %202 = getelementptr inbounds %struct.mbedtls_ecdh_context, ptr %201, i32 0, i32 4
  call void @mbedtls_debug_print_mpi(ptr noundef %197, i32 noundef 3, ptr noundef @.str, i32 noundef 1174, ptr noundef @.str.25, ptr noundef %202)
  store i32 0, ptr %10, align 4
  br label %203

203:                                              ; preds = %184, %180
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  %204 = load i32, ptr %10, align 4
  switch i32 %204, label %261 [
    i32 0, label %205
  ]

205:                                              ; preds = %203
  br label %208

206:                                              ; preds = %152
  %207 = load ptr, ptr %4, align 8, !tbaa !5
  call void (ptr, i32, ptr, i32, ptr, ...) @mbedtls_debug_print_msg(ptr noundef %207, i32 noundef 1, ptr noundef @.str, i32 noundef 1179, ptr noundef @.str.4)
  store i32 -27648, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %261

208:                                              ; preds = %205
  br label %209

209:                                              ; preds = %208, %151
  br label %210

210:                                              ; preds = %209, %91
  br label %211

211:                                              ; preds = %210, %82
  %212 = load ptr, ptr %7, align 8, !tbaa !5
  %213 = load ptr, ptr %6, align 8, !tbaa !5
  %214 = ptrtoint ptr %212 to i64
  %215 = ptrtoint ptr %213 to i64
  %216 = sub i64 %214, %215
  %217 = icmp slt i64 %216, 2
  br i1 %217, label %218, label %219

218:                                              ; preds = %211
  store i32 -28928, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %261

219:                                              ; preds = %211
  %220 = load i64, ptr %9, align 8, !tbaa !20
  %221 = lshr i64 %220, 8
  %222 = trunc i64 %221 to i8
  %223 = load ptr, ptr %6, align 8, !tbaa !5
  %224 = getelementptr inbounds i8, ptr %223, i32 1
  store ptr %224, ptr %6, align 8, !tbaa !5
  store i8 %222, ptr %223, align 1, !tbaa !33
  %225 = load i64, ptr %9, align 8, !tbaa !20
  %226 = trunc i64 %225 to i8
  %227 = load ptr, ptr %6, align 8, !tbaa !5
  %228 = getelementptr inbounds i8, ptr %227, i32 1
  store ptr %228, ptr %6, align 8, !tbaa !5
  store i8 %226, ptr %227, align 1, !tbaa !33
  %229 = load ptr, ptr %7, align 8, !tbaa !5
  %230 = load ptr, ptr %6, align 8, !tbaa !5
  %231 = icmp ult ptr %229, %230
  br i1 %231, label %240, label %232

232:                                              ; preds = %219
  %233 = load ptr, ptr %7, align 8, !tbaa !5
  %234 = load ptr, ptr %6, align 8, !tbaa !5
  %235 = ptrtoint ptr %233 to i64
  %236 = ptrtoint ptr %234 to i64
  %237 = sub i64 %235, %236
  %238 = load i64, ptr %9, align 8, !tbaa !20
  %239 = icmp ult i64 %237, %238
  br i1 %239, label %240, label %241

240:                                              ; preds = %232, %219
  store i32 -28928, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %261

241:                                              ; preds = %232
  %242 = load ptr, ptr %6, align 8, !tbaa !5
  %243 = load ptr, ptr %8, align 8, !tbaa !5
  %244 = load i64, ptr %9, align 8, !tbaa !20
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %242, ptr align 1 %243, i64 %244, i1 false)
  %245 = load i64, ptr %9, align 8, !tbaa !20
  %246 = load ptr, ptr %6, align 8, !tbaa !5
  %247 = getelementptr inbounds i8, ptr %246, i64 %245
  store ptr %247, ptr %6, align 8, !tbaa !5
  %248 = load ptr, ptr %6, align 8, !tbaa !5
  %249 = load ptr, ptr %4, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %249, i32 0, i32 15
  %251 = load ptr, ptr %250, align 8, !tbaa !11
  %252 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %251, i32 0, i32 33
  %253 = getelementptr inbounds [1060 x i8], ptr %252, i64 0, i64 0
  %254 = ptrtoint ptr %248 to i64
  %255 = ptrtoint ptr %253 to i64
  %256 = sub i64 %254, %255
  %257 = load ptr, ptr %4, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.mbedtls_ssl_context, ptr %257, i32 0, i32 15
  %259 = load ptr, ptr %258, align 8, !tbaa !11
  %260 = getelementptr inbounds %struct.mbedtls_ssl_handshake_params, ptr %259, i32 0, i32 31
  store i64 %256, ptr %260, align 8, !tbaa !36
  store i32 0, ptr %3, align 4
  store i32 1, ptr %10, align 4
  br label %261

261:                                              ; preds = %241, %240, %218, %206, %203, %149, %81, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  %262 = load i32, ptr %3, align 4
  ret i32 %262
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

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

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

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 96}
!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 = !{!12, !6, i64 0}
!16 = !{!17, !6, i64 296}
!17 = !{!"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, !18, i64 248, !18, 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}
!18 = !{!"", !10, i64 0, !13, i64 8, !6, i64 16}
!19 = !{!17, !13, i64 304}
!20 = !{!13, !13, i64 0}
!21 = !{!22, !6, i64 880}
!22 = !{!"mbedtls_ssl_handshake_params", !23, i64 0, !24, i64 8, !25, 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, !28, i64 1016, !29, i64 1104, !30, i64 1196, !31, 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}
!23 = !{!"mbedtls_ssl_sig_hash_set_t", !10, i64 0, !10, i64 4}
!24 = !{!"", !13, i64 0, !18, i64 8, !18, i64 32, !18, i64 56, !18, i64 80, !18, i64 104, !18, i64 128, !18, i64 152, !18, i64 176, !18, i64 200, !18, i64 224}
!25 = !{!"", !26, i64 0, !18, i64 248, !27, i64 272, !27, i64 344, !18, i64 416, !10, i64 440, !27, i64 448, !27, i64 520, !18, i64 592}
!26 = !{!"", !10, i64 0, !18, i64 8, !18, i64 32, !18, i64 56, !27, i64 80, !18, 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}
!27 = !{!"", !18, i64 0, !18, i64 24, !18, i64 48}
!28 = !{!"", !7, i64 0, !7, i64 8, !7, i64 24}
!29 = !{!"", !7, i64 0, !7, i64 8, !7, i64 28}
!30 = !{!"", !7, i64 0, !7, i64 8, !7, i64 40, !10, i64 104}
!31 = !{!"", !7, i64 0, !7, i64 16, !7, i64 80, !10, i64 208}
!32 = !{!22, !13, i64 888}
!33 = !{!7, !7, i64 0}
!34 = !{!17, !6, i64 48}
!35 = !{!17, !6, i64 56}
!36 = !{!22, !13, i64 1552}


; 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.4 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [8 x i8], align 1

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @mbedtls_ssl_psk_derive_premaster(ptr noundef %0, i32 noundef %1) local_unnamed_addr #3 {
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 96
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %.ptr100 = getelementptr inbounds i8, ptr %6, i64 1624
  %7 = getelementptr inbounds i8, ptr %6, i64 2684
  %8 = load ptr, ptr %0, align 8, !tbaa !13
  %9 = getelementptr inbounds i8, ptr %8, i64 296
  %10 = load ptr, ptr %9, align 8, !tbaa !14
  %11 = getelementptr inbounds i8, ptr %8, i64 304
  %12 = getelementptr inbounds i8, ptr %6, i64 880
  %13 = load ptr, ptr %12, align 8, !tbaa !17
  %.not = icmp eq ptr %13, null
  %14 = getelementptr inbounds i8, ptr %6, i64 888
  %spec.select = select i1 %.not, ptr %10, ptr %13
  %spec.select103 = select i1 %.not, ptr %11, ptr %14
  %.085 = load i64, ptr %spec.select103, align 8, !tbaa !28
  switch i32 %1, label %55 [
    i32 5, label %15
    i32 7, label %.thread109
    i32 6, label %23
    i32 8, label %39
  ]

15:                                               ; preds = %2
  %16 = lshr i64 %.085, 8
  %17 = trunc i64 %16 to i8
  %18 = getelementptr inbounds i8, ptr %6, i64 1625
  store i8 %17, ptr %.ptr100, align 1, !tbaa !29
  %19 = trunc i64 %.085 to i8
  store i8 %19, ptr %18, align 1, !tbaa !29
  %20 = icmp ugt i64 %.085, 1058
  br i1 %20, label %75, label %21

21:                                               ; preds = %15
  %.ptr96 = getelementptr inbounds i8, ptr %6, i64 1626
  tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %.ptr96, i8 0, i64 %.085, i1 false)
  br label %56

.thread109:                                       ; preds = %2
  %22 = getelementptr inbounds i8, ptr %6, i64 1625
  store i8 0, ptr %.ptr100, align 1, !tbaa !29
  store i8 48, ptr %22, align 1, !tbaa !29
  br label %58

23:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #5
  %24 = getelementptr inbounds i8, ptr %6, i64 8
  %25 = getelementptr inbounds i8, ptr %6, i64 1626
  %26 = getelementptr inbounds i8, ptr %8, i64 48
  %27 = load ptr, ptr %26, align 8, !tbaa !30
  %28 = getelementptr inbounds i8, ptr %8, i64 56
  %29 = load ptr, ptr %28, align 8, !tbaa !31
  %30 = call i32 @mbedtls_dhm_calc_secret(ptr noundef nonnull %24, ptr noundef nonnull %25, i64 noundef 1058, ptr noundef nonnull %3, ptr noundef %27, ptr noundef %29) #5
  %.not92 = icmp eq i32 %30, 0
  br i1 %.not92, label %.thread, label %38

.thread:                                          ; preds = %23
  %31 = load i64, ptr %3, align 8, !tbaa !28
  %32 = lshr i64 %31, 8
  %33 = trunc i64 %32 to i8
  %34 = getelementptr inbounds i8, ptr %6, i64 1625
  store i8 %33, ptr %.ptr100, align 1, !tbaa !29
  %35 = trunc i64 %31 to i8
  store i8 %35, ptr %34, align 1, !tbaa !29
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %36, i64 136
  call void @mbedtls_debug_print_mpi(ptr noundef nonnull %0, i32 noundef 3, ptr noundef nonnull @.str, i32 noundef 1152, ptr noundef nonnull @.str.23, ptr noundef nonnull %37) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  br label %56

38:                                               ; preds = %23
  call void @mbedtls_debug_print_ret(ptr noundef nonnull %0, i32 noundef 1, ptr noundef nonnull @.str, i32 noundef 1145, ptr noundef nonnull @.str.22, i32 noundef %30) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #5
  br label %75

39:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %40 = getelementptr inbounds i8, ptr %6, i64 256
  %41 = getelementptr inbounds i8, ptr %6, i64 1626
  %42 = getelementptr inbounds i8, ptr %8, i64 48
  %43 = load ptr, ptr %42, align 8, !tbaa !30
  %44 = getelementptr inbounds i8, ptr %8, i64 56
  %45 = load ptr, ptr %44, align 8, !tbaa !31
  %46 = call i32 @mbedtls_ecdh_calc_secret(ptr noundef nonnull %40, ptr noundef nonnull %4, ptr noundef nonnull %41, i64 noundef 1058, ptr noundef %43, ptr noundef %45) #5
  %.not91 = icmp eq i32 %46, 0
  br i1 %.not91, label %.thread107, label %54

.thread107:                                       ; preds = %39
  %47 = load i64, ptr %4, align 8, !tbaa !28
  %48 = lshr i64 %47, 8
  %49 = trunc i64 %48 to i8
  %50 = getelementptr inbounds i8, ptr %6, i64 1625
  store i8 %49, ptr %.ptr100, align 1, !tbaa !29
  %51 = trunc i64 %47 to i8
  store i8 %51, ptr %50, align 1, !tbaa !29
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %52, i64 672
  call void @mbedtls_debug_print_mpi(ptr noundef nonnull %0, i32 noundef 3, ptr noundef nonnull @.str, i32 noundef 1174, ptr noundef nonnull @.str.25, ptr noundef nonnull %53) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %56

54:                                               ; preds = %39
  call void @mbedtls_debug_print_ret(ptr noundef nonnull %0, i32 noundef 1, ptr noundef nonnull @.str, i32 noundef 1166, ptr noundef nonnull @.str.24, i32 noundef %46) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  br label %75

55:                                               ; preds = %2
  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 1179, ptr noundef nonnull @.str.4) #5
  br label %75

56:                                               ; preds = %.thread107, %.thread, %21
  %.282.idx.in = phi i64 [ %.085, %21 ], [ %31, %.thread ], [ %47, %.thread107 ]
  %.282.idx = add nsw i64 %.282.idx.in, 1626
  %57 = icmp sgt i64 %.282.idx.in, 1056
  br i1 %57, label %75, label %58

58:                                               ; preds = %.thread109, %56
  %.282.idx111 = phi i64 [ 1674, %.thread109 ], [ %.282.idx, %56 ]
  %.282.ptr = getelementptr inbounds i8, ptr %6, i64 %.282.idx111
  %59 = ptrtoint ptr %7 to i64
  %60 = lshr i64 %.085, 8
  %61 = trunc i64 %60 to i8
  %62 = getelementptr inbounds i8, ptr %.282.ptr, i64 1
  store i8 %61, ptr %.282.ptr, align 1, !tbaa !29
  %63 = trunc i64 %.085 to i8
  %.ptr = getelementptr i8, ptr %.282.ptr, i64 2
  store i8 %63, ptr %62, align 1, !tbaa !29
  %64 = ptrtoint ptr %.ptr to i64
  %65 = sub i64 %59, %64
  %66 = icmp ult i64 %65, %.085
  br i1 %66, label %75, label %67

67:                                               ; preds = %58
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %.ptr, ptr align 1 %spec.select, i64 %.085, i1 false)
  %68 = getelementptr inbounds i8, ptr %.ptr, i64 %.085
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = getelementptr inbounds i8, ptr %69, i64 1624
  %71 = ptrtoint ptr %68 to i64
  %72 = ptrtoint ptr %70 to i64
  %73 = sub i64 %71, %72
  %74 = getelementptr inbounds i8, ptr %69, i64 1552
  store i64 %73, ptr %74, align 8, !tbaa !32
  br label %75

75:                                               ; preds = %54, %38, %58, %56, %15, %67, %55
  %.2 = phi i32 [ 0, %67 ], [ %30, %38 ], [ %46, %54 ], [ -27648, %55 ], [ -28928, %15 ], [ -28928, %56 ], [ -28928, %58 ]
  ret i32 %.2
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

declare i32 @mbedtls_dhm_calc_secret(ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @mbedtls_debug_print_mpi(ptr noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @mbedtls_ecdh_calc_secret(ptr noundef, ptr noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 96}
!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 = !{!6, !7, i64 0}
!14 = !{!15, !7, i64 296}
!15 = !{!"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, !16, i64 248, !16, 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}
!16 = !{!"", !10, i64 0, !11, i64 8, !7, i64 16}
!17 = !{!18, !7, i64 880}
!18 = !{!"mbedtls_ssl_handshake_params", !19, i64 0, !20, i64 8, !21, 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, !24, i64 1016, !25, i64 1104, !26, i64 1196, !27, 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}
!19 = !{!"mbedtls_ssl_sig_hash_set_t", !10, i64 0, !10, i64 4}
!20 = !{!"", !11, i64 0, !16, i64 8, !16, i64 32, !16, i64 56, !16, i64 80, !16, i64 104, !16, i64 128, !16, i64 152, !16, i64 176, !16, i64 200, !16, i64 224}
!21 = !{!"", !22, i64 0, !16, i64 248, !23, i64 272, !23, i64 344, !16, i64 416, !10, i64 440, !23, i64 448, !23, i64 520, !16, i64 592}
!22 = !{!"", !10, i64 0, !16, i64 8, !16, i64 32, !16, i64 56, !23, i64 80, !16, 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}
!23 = !{!"", !16, i64 0, !16, i64 24, !16, i64 48}
!24 = !{!"", !8, i64 0, !8, i64 8, !8, i64 24}
!25 = !{!"", !8, i64 0, !8, i64 8, !8, i64 28}
!26 = !{!"", !8, i64 0, !8, i64 8, !8, i64 40, !10, i64 104}
!27 = !{!"", !8, i64 0, !8, i64 16, !8, i64 80, !10, i64 208}
!28 = !{!11, !11, i64 0}
!29 = !{!8, !8, i64 0}
!30 = !{!15, !7, i64 48}
!31 = !{!15, !7, i64 56}
!32 = !{!18, !11, i64 1552}


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