; LLVM IR from aws/s2n-tls :: tests/unit (s2n_handshake_hashes_test)

; 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.s2n_debug_info = type { ptr, ptr }
%struct.s2n_blob = type { ptr, i32, i32, i8 }
%struct.s2n_stuffer = type { %struct.s2n_blob, i32, i32, i32, i8 }
%struct.s2n_connection = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, [22 x i8], [22 x i8], [22 x i8], i32, i32, %struct.s2n_timer, i64, i64, [32 x i8], i8, i8, i8, i8, i8, i8, i8, ptr, ptr, %struct.s2n_secrets, ptr, ptr, %struct.s2n_kex_parameters, %struct.s2n_handshake_parameters, %struct.s2n_psk_parameters, ptr, i8, i32, [5 x i8], %struct.s2n_stuffer, %struct.s2n_stuffer, %struct.s2n_stuffer, %struct.s2n_stuffer, i32, i64, [2 x i8], %struct.s2n_stuffer, i8, i8, i8, i8, %struct.s2n_atomic_flag, %struct.s2n_atomic_flag, %struct.s2n_handshake, i16, i32, i16, i64, i8, i64, i64, i64, %struct.s2n_atomic_flag, %struct.s2n_atomic_flag, [256 x i8], [256 x i8], i32, %struct.s2n_blob, i32, %struct.s2n_blob, %struct.s2n_blob, %struct.s2n_blob, %struct.s2n_client_hello, %struct.s2n_x509_validator, ptr, ptr, i8, i32, %struct.s2n_blob, i32, %struct.s2n_ticket_fields, [138 x i8], %struct.s2n_stuffer, %struct.s2n_blob, %struct.s2n_blob, i8, i8, i8, i16, i16, i32, i32, %struct.s2n_blob, i32, %struct.s2n_post_handshake, %struct.s2n_atomic_flag, i8, i8 }
%struct.s2n_timer = type { i64 }
%struct.s2n_secrets = type { %union.anon, i32 }
%union.anon = type { %struct.s2n_tls13_secrets }
%struct.s2n_tls13_secrets = type { [48 x i8], [48 x i8], [48 x i8], [48 x i8], [48 x i8], [48 x i8], [48 x i8], [48 x i8], i32 }
%struct.s2n_kex_parameters = type { %struct.s2n_dh_params, %struct.s2n_ecc_evp_params, [4 x ptr], %struct.s2n_ecc_evp_params, %struct.s2n_kem_group_params, %struct.s2n_kem_group_params, [8 x ptr], %struct.s2n_kem_params, %struct.s2n_blob, %struct.s2n_blob }
%struct.s2n_dh_params = type { ptr }
%struct.s2n_ecc_evp_params = type { ptr, ptr }
%struct.s2n_kem_group_params = type { ptr, %struct.s2n_kem_params, %struct.s2n_ecc_evp_params }
%struct.s2n_kem_params = type { ptr, %struct.s2n_blob, %struct.s2n_blob, %struct.s2n_blob, i8 }
%struct.s2n_handshake_parameters = type { %struct.s2n_pkey, %struct.s2n_pkey, %struct.s2n_blob, i32, %struct.s2n_sig_scheme_list, ptr, ptr, ptr, [4 x ptr], [4 x ptr], i8, i8, [32 x i8], [32 x i8] }
%struct.s2n_pkey = type { ptr, ptr, ptr, ptr, ptr, ptr }
%struct.s2n_sig_scheme_list = type { [128 x i16], i8 }
%struct.s2n_psk_parameters = type { i32, %struct.s2n_array, i16, i16, ptr, i32 }
%struct.s2n_array = type { %struct.s2n_blob, i32, i32 }
%struct.s2n_handshake = type { %struct.s2n_stuffer, ptr, [8 x i8], [48 x i8], [48 x i8], i8, i32, i32, i32, i32, %struct.s2n_offered_early_data, i8, i32 }
%struct.s2n_offered_early_data = type { ptr }
%struct.s2n_client_hello = type { %struct.s2n_blob, %struct.s2n_parsed_extensions_list, %struct.s2n_blob, %struct.s2n_blob, %struct.s2n_blob, i8, i8, i8 }
%struct.s2n_parsed_extensions_list = type { [21 x %struct.s2n_parsed_extension], %struct.s2n_blob, i16 }
%struct.s2n_parsed_extension = type { %struct.s2n_blob, i16, i16, i8 }
%struct.s2n_x509_validator = type { ptr, ptr, i8, i8, i16, ptr, i32, ptr, %struct.s2n_cert_validation_info, i8 }
%struct.s2n_cert_validation_info = type { i8, [3 x i8] }
%struct.s2n_ticket_fields = type { %struct.s2n_blob, i32 }
%struct.s2n_post_handshake = type { %struct.s2n_stuffer, [4 x i8] }
%struct.s2n_atomic_flag = type { i32 }
%struct.s2n_config = type { i32, ptr, ptr, %struct.certs_by_type, %struct.s2n_blob, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i64, ptr, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, i32, i8, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i8, %struct.s2n_x509_trust_store, i16, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, ptr, i32, i32, ptr, ptr, i32, %struct.s2n_blob }
%struct.certs_by_type = type { [4 x ptr] }
%struct.s2n_x509_trust_store = type { ptr, i8 }

@_s2n_debug_info = external thread_local global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local global i32, align 4
@.str.5 = external hidden unnamed_addr constant [90 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [90 x i8], align 1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #0

; Function Attrs: nounwind willreturn memory(read)
declare ptr @strrchr(ptr noundef, i32 noundef) #1

declare i32 @s2n_calculate_stacktrace() #2

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

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

declare i32 @s2n_stuffer_skip_write(ptr noundef, i32 noundef) #2

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_conn_find_name_matching_certs(ptr noundef %0) #5 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %struct.s2n_blob, align 8
  %6 = alloca i32, align 4
  %7 = alloca [256 x i8], align 16
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca %struct.s2n_blob, align 8
  %11 = alloca %struct.s2n_stuffer, align 8
  %12 = alloca [256 x i8], align 16
  %13 = alloca %struct.s2n_blob, align 8
  %14 = alloca %struct.s2n_stuffer, align 8
  %15 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.s2n_connection, ptr %16, i32 0, i32 63
  %18 = getelementptr inbounds [256 x i8], ptr %17, i64 0, i64 0
  %19 = load i8, ptr %18, align 8, !tbaa !9
  %20 = sext i8 %19 to i32
  %21 = icmp ne i32 %20, 0
  br i1 %21, label %23, label %22

22:                                               ; preds = %1
  store i32 0, ptr %2, align 4
  br label %294

23:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.s2n_connection, ptr %24, i32 0, i32 63
  %26 = getelementptr inbounds [256 x i8], ptr %25, i64 0, i64 0
  store ptr %26, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #7
  call void @llvm.memset.p0.i64(ptr align 8 %5, i8 0, i64 24, i1 false)
  br label %27

27:                                               ; preds = %23
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = ptrtoint ptr %28 to i64
  %30 = inttoptr i64 %29 to ptr
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = call i64 @strlen(ptr noundef %31) #8
  %33 = trunc i64 %32 to i32
  %34 = call i32 @s2n_blob_init(ptr noundef %5, ptr noundef %30, i32 noundef %33)
  %35 = icmp sgt i32 %34, -1
  br i1 %35, label %37, label %36

36:                                               ; preds = %27
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %293

37:                                               ; preds = %27
  br label %38

38:                                               ; preds = %37
  br label %39

39:                                               ; preds = %38
  br label %40

40:                                               ; preds = %39
  %41 = getelementptr inbounds %struct.s2n_blob, ptr %5, i32 0, i32 1
  %42 = load i32, ptr %41, align 8, !tbaa !10
  %43 = icmp ule i32 %42, 255
  br i1 %43, label %77, label %44

44:                                               ; preds = %40
  br label %45

45:                                               ; preds = %44
  br label %46

46:                                               ; preds = %45
  %47 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %48 = getelementptr inbounds %struct.s2n_debug_info, ptr %47, i32 0, i32 0
  store ptr @.str.5, ptr %48, align 8, !tbaa !13
  %49 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %50 = getelementptr inbounds %struct.s2n_debug_info, ptr %49, i32 0, i32 0
  %51 = load ptr, ptr %50, align 8, !tbaa !13
  %52 = getelementptr inbounds i8, ptr %51, i64 21
  %53 = call ptr @strrchr(ptr noundef %52, i32 noundef 47) #8
  %54 = icmp ne ptr %53, null
  br i1 %54, label %55, label %62

55:                                               ; preds = %46
  %56 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %57 = getelementptr inbounds %struct.s2n_debug_info, ptr %56, i32 0, i32 0
  %58 = load ptr, ptr %57, align 8, !tbaa !13
  %59 = getelementptr inbounds i8, ptr %58, i64 21
  %60 = call ptr @strrchr(ptr noundef %59, i32 noundef 47) #8
  %61 = getelementptr inbounds i8, ptr %60, i64 1
  br label %67

62:                                               ; preds = %46
  %63 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %64 = getelementptr inbounds %struct.s2n_debug_info, ptr %63, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8, !tbaa !13
  %66 = getelementptr inbounds i8, ptr %65, i64 21
  br label %67

67:                                               ; preds = %62, %55
  %68 = phi ptr [ %61, %55 ], [ %66, %62 ]
  %69 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %70 = getelementptr inbounds %struct.s2n_debug_info, ptr %69, i32 0, i32 1
  store ptr %68, ptr %70, align 8, !tbaa !15
  %71 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %71, align 4, !tbaa !16
  %72 = call i32 @s2n_calculate_stacktrace()
  br label %73

73:                                               ; preds = %67
  br label %74

74:                                               ; preds = %73
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %293

75:                                               ; No predecessors!
  br label %76

76:                                               ; preds = %75
  br label %77

77:                                               ; preds = %76, %40
  br label %78

78:                                               ; preds = %77
  br label %79

79:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 256, ptr %7) #7
  call void @llvm.memset.p0.i64(ptr align 16 %7, i8 0, i64 256, i1 false)
  br label %80

80:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %81 = getelementptr inbounds %struct.s2n_blob, ptr %5, i32 0, i32 1
  %82 = load i32, ptr %81, align 8, !tbaa !10
  store i32 %82, ptr %8, align 4, !tbaa !16
  %83 = load i32, ptr %8, align 4, !tbaa !16
  %84 = icmp ne i32 %83, 0
  %85 = xor i1 %84, true
  %86 = xor i1 %85, true
  %87 = zext i1 %86 to i32
  %88 = sext i32 %87 to i64
  %89 = call i64 @llvm.expect.i64(i64 %88, i64 1)
  %90 = icmp ne i64 %89, 0
  br i1 %90, label %91, label %140

91:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %92 = getelementptr inbounds [256 x i8], ptr %7, i64 0, i64 0
  %93 = getelementptr inbounds %struct.s2n_blob, ptr %5, i32 0, i32 0
  %94 = load ptr, ptr %93, align 8, !tbaa !17
  %95 = load i32, ptr %8, align 4, !tbaa !16
  %96 = zext i32 %95 to i64
  %97 = call ptr @s2n_ensure_memmove_trace(ptr noundef %92, ptr noundef %94, i64 noundef %96)
  store ptr %97, ptr %9, align 8, !tbaa !5
  br label %98

98:                                               ; preds = %91
  %99 = load ptr, ptr %9, align 8, !tbaa !5
  %100 = icmp ne ptr %99, null
  br i1 %100, label %134, label %101

101:                                              ; preds = %98
  br label %102

102:                                              ; preds = %101
  br label %103

103:                                              ; preds = %102
  %104 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %105 = getelementptr inbounds %struct.s2n_debug_info, ptr %104, i32 0, i32 0
  store ptr @.str.6, ptr %105, align 8, !tbaa !13
  %106 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %107 = getelementptr inbounds %struct.s2n_debug_info, ptr %106, i32 0, i32 0
  %108 = load ptr, ptr %107, align 8, !tbaa !13
  %109 = getelementptr inbounds i8, ptr %108, i64 21
  %110 = call ptr @strrchr(ptr noundef %109, i32 noundef 47) #8
  %111 = icmp ne ptr %110, null
  br i1 %111, label %112, label %119

112:                                              ; preds = %103
  %113 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %114 = getelementptr inbounds %struct.s2n_debug_info, ptr %113, i32 0, i32 0
  %115 = load ptr, ptr %114, align 8, !tbaa !13
  %116 = getelementptr inbounds i8, ptr %115, i64 21
  %117 = call ptr @strrchr(ptr noundef %116, i32 noundef 47) #8
  %118 = getelementptr inbounds i8, ptr %117, i64 1
  br label %124

119:                                              ; preds = %103
  %120 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %121 = getelementptr inbounds %struct.s2n_debug_info, ptr %120, i32 0, i32 0
  %122 = load ptr, ptr %121, align 8, !tbaa !13
  %123 = getelementptr inbounds i8, ptr %122, i64 21
  br label %124

124:                                              ; preds = %119, %112
  %125 = phi ptr [ %118, %112 ], [ %123, %119 ]
  %126 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %127 = getelementptr inbounds %struct.s2n_debug_info, ptr %126, i32 0, i32 1
  store ptr %125, ptr %127, align 8, !tbaa !15
  %128 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %128, align 4, !tbaa !16
  %129 = call i32 @s2n_calculate_stacktrace()
  br label %130

130:                                              ; preds = %124
  br label %131

131:                                              ; preds = %130
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %137

132:                                              ; No predecessors!
  br label %133

133:                                              ; preds = %132
  br label %134

134:                                              ; preds = %133, %98
  br label %135

135:                                              ; preds = %134
  br label %136

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

137:                                              ; preds = %136, %131
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  %138 = load i32, ptr %6, align 4
  switch i32 %138, label %141 [
    i32 0, label %139
  ]

139:                                              ; preds = %137
  br label %140

140:                                              ; preds = %139, %80
  store i32 0, ptr %6, align 4
  br label %141

141:                                              ; preds = %140, %137
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  %142 = load i32, ptr %6, align 4
  switch i32 %142, label %292 [
    i32 0, label %143
  ]

143:                                              ; preds = %141
  br label %144

144:                                              ; preds = %143
  br label %145

145:                                              ; preds = %144
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #7
  call void @llvm.memset.p0.i64(ptr align 8 %10, i8 0, i64 24, i1 false)
  br label %146

146:                                              ; preds = %145
  %147 = getelementptr inbounds [256 x i8], ptr %7, i64 0, i64 0
  %148 = getelementptr inbounds %struct.s2n_blob, ptr %5, i32 0, i32 1
  %149 = load i32, ptr %148, align 8, !tbaa !10
  %150 = call i32 @s2n_blob_init(ptr noundef %10, ptr noundef %147, i32 noundef %149)
  %151 = icmp sgt i32 %150, -1
  br i1 %151, label %153, label %152

152:                                              ; preds = %146
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %291

153:                                              ; preds = %146
  br label %154

154:                                              ; preds = %153
  br label %155

155:                                              ; preds = %154
  br label %156

156:                                              ; preds = %155
  %157 = call i32 @s2n_blob_char_to_lower(ptr noundef %10)
  %158 = icmp sgt i32 %157, -1
  br i1 %158, label %160, label %159

159:                                              ; preds = %156
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %291

160:                                              ; preds = %156
  br label %161

161:                                              ; preds = %160
  br label %162

162:                                              ; preds = %161
  call void @llvm.lifetime.start.p0(i64 40, ptr %11) #7
  call void @llvm.memset.p0.i64(ptr align 8 %11, i8 0, i64 40, i1 false)
  br label %163

163:                                              ; preds = %162
  %164 = call i32 @s2n_stuffer_init(ptr noundef %11, ptr noundef %10)
  %165 = icmp sgt i32 %164, -1
  br i1 %165, label %167, label %166

166:                                              ; preds = %163
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %290

167:                                              ; preds = %163
  br label %168

168:                                              ; preds = %167
  br label %169

169:                                              ; preds = %168
  br label %170

170:                                              ; preds = %169
  %171 = getelementptr inbounds %struct.s2n_blob, ptr %10, i32 0, i32 1
  %172 = load i32, ptr %171, align 8, !tbaa !10
  %173 = call i32 @s2n_stuffer_skip_write(ptr noundef %11, i32 noundef %172)
  %174 = icmp sgt i32 %173, -1
  br i1 %174, label %176, label %175

175:                                              ; preds = %170
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %290

176:                                              ; preds = %170
  br label %177

177:                                              ; preds = %176
  br label %178

178:                                              ; preds = %177
  br label %179

179:                                              ; preds = %178
  %180 = load ptr, ptr %3, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.s2n_connection, ptr %180, i32 0, i32 1
  %182 = load ptr, ptr %181, align 8, !tbaa !18
  %183 = getelementptr inbounds %struct.s2n_config, ptr %182, i32 0, i32 2
  %184 = load ptr, ptr %183, align 8, !tbaa !45
  %185 = load ptr, ptr %3, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.s2n_connection, ptr %185, i32 0, i32 32
  %187 = getelementptr inbounds %struct.s2n_handshake_parameters, ptr %186, i32 0, i32 8
  %188 = getelementptr inbounds [4 x ptr], ptr %187, i64 0, i64 0
  %189 = load ptr, ptr %3, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.s2n_connection, ptr %189, i32 0, i32 32
  %191 = getelementptr inbounds %struct.s2n_handshake_parameters, ptr %190, i32 0, i32 10
  %192 = call i32 @s2n_find_cert_matches(ptr noundef %184, ptr noundef %10, ptr noundef %188, ptr noundef %191)
  %193 = icmp sgt i32 %192, -1
  br i1 %193, label %195, label %194

194:                                              ; preds = %179
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %290

195:                                              ; preds = %179
  br label %196

196:                                              ; preds = %195
  br label %197

197:                                              ; preds = %196
  %198 = load ptr, ptr %3, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.s2n_connection, ptr %198, i32 0, i32 32
  %200 = getelementptr inbounds %struct.s2n_handshake_parameters, ptr %199, i32 0, i32 10
  %201 = load i8, ptr %200, align 8, !tbaa !49
  %202 = icmp ne i8 %201, 0
  br i1 %202, label %261, label %203

203:                                              ; preds = %197
  call void @llvm.lifetime.start.p0(i64 256, ptr %12) #7
  call void @llvm.memset.p0.i64(ptr align 16 %12, i8 0, i64 256, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #7
  call void @llvm.memset.p0.i64(ptr align 8 %13, i8 0, i64 24, i1 false)
  br label %204

204:                                              ; preds = %203
  %205 = getelementptr inbounds [256 x i8], ptr %12, i64 0, i64 0
  %206 = call i32 @s2n_blob_init(ptr noundef %13, ptr noundef %205, i32 noundef 256)
  %207 = icmp sgt i32 %206, -1
  br i1 %207, label %209, label %208

208:                                              ; preds = %204
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %258

209:                                              ; preds = %204
  br label %210

210:                                              ; preds = %209
  br label %211

211:                                              ; preds = %210
  call void @llvm.lifetime.start.p0(i64 40, ptr %14) #7
  call void @llvm.memset.p0.i64(ptr align 8 %14, i8 0, i64 40, i1 false)
  br label %212

212:                                              ; preds = %211
  %213 = call i32 @s2n_stuffer_init(ptr noundef %14, ptr noundef %13)
  %214 = icmp sgt i32 %213, -1
  br i1 %214, label %216, label %215

215:                                              ; preds = %212
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %257

216:                                              ; preds = %212
  br label %217

217:                                              ; preds = %216
  br label %218

218:                                              ; preds = %217
  br label %219

219:                                              ; preds = %218
  %220 = call i32 @s2n_create_wildcard_hostname(ptr noundef %11, ptr noundef %14)
  %221 = icmp sgt i32 %220, -1
  br i1 %221, label %223, label %222

222:                                              ; preds = %219
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %257

223:                                              ; preds = %219
  br label %224

224:                                              ; preds = %223
  br label %225

225:                                              ; preds = %224
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #7
  %226 = getelementptr inbounds %struct.s2n_stuffer, ptr %14, i32 0, i32 2
  %227 = load i32, ptr %226, align 4, !tbaa !50
  %228 = getelementptr inbounds %struct.s2n_stuffer, ptr %14, i32 0, i32 1
  %229 = load i32, ptr %228, align 8, !tbaa !51
  %230 = sub i32 %227, %229
  store i32 %230, ptr %15, align 4, !tbaa !16
  %231 = load i32, ptr %15, align 4, !tbaa !16
  %232 = icmp eq i32 %231, 0
  br i1 %232, label %233, label %234

233:                                              ; preds = %225
  store i32 0, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %256

234:                                              ; preds = %225
  %235 = load i32, ptr %15, align 4, !tbaa !16
  %236 = getelementptr inbounds %struct.s2n_blob, ptr %13, i32 0, i32 1
  store i32 %235, ptr %236, align 8, !tbaa !10
  br label %237

237:                                              ; preds = %234
  %238 = load ptr, ptr %3, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.s2n_connection, ptr %238, i32 0, i32 1
  %240 = load ptr, ptr %239, align 8, !tbaa !18
  %241 = getelementptr inbounds %struct.s2n_config, ptr %240, i32 0, i32 2
  %242 = load ptr, ptr %241, align 8, !tbaa !45
  %243 = load ptr, ptr %3, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct.s2n_connection, ptr %243, i32 0, i32 32
  %245 = getelementptr inbounds %struct.s2n_handshake_parameters, ptr %244, i32 0, i32 9
  %246 = getelementptr inbounds [4 x ptr], ptr %245, i64 0, i64 0
  %247 = load ptr, ptr %3, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.s2n_connection, ptr %247, i32 0, i32 32
  %249 = getelementptr inbounds %struct.s2n_handshake_parameters, ptr %248, i32 0, i32 11
  %250 = call i32 @s2n_find_cert_matches(ptr noundef %242, ptr noundef %13, ptr noundef %246, ptr noundef %249)
  %251 = icmp sgt i32 %250, -1
  br i1 %251, label %253, label %252

252:                                              ; preds = %237
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %256

253:                                              ; preds = %237
  br label %254

254:                                              ; preds = %253
  br label %255

255:                                              ; preds = %254
  store i32 0, ptr %6, align 4
  br label %256

256:                                              ; preds = %255, %252, %233
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #7
  br label %257

257:                                              ; preds = %256, %222, %215
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #7
  br label %258

258:                                              ; preds = %257, %208
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 256, ptr %12) #7
  %259 = load i32, ptr %6, align 4
  switch i32 %259, label %290 [
    i32 0, label %260
  ]

260:                                              ; preds = %258
  br label %261

261:                                              ; preds = %260, %197
  %262 = load ptr, ptr %3, align 8, !tbaa !5
  %263 = load i32, ptr %262, align 8
  %264 = lshr i32 %263, 6
  %265 = and i32 %264, 1
  %266 = icmp ne i32 %265, 0
  br i1 %266, label %281, label %267

267:                                              ; preds = %261
  %268 = load ptr, ptr %3, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.s2n_connection, ptr %268, i32 0, i32 32
  %270 = getelementptr inbounds %struct.s2n_handshake_parameters, ptr %269, i32 0, i32 10
  %271 = load i8, ptr %270, align 8, !tbaa !49
  %272 = zext i8 %271 to i32
  %273 = icmp ne i32 %272, 0
  br i1 %273, label %281, label %274

274:                                              ; preds = %267
  %275 = load ptr, ptr %3, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.s2n_connection, ptr %275, i32 0, i32 32
  %277 = getelementptr inbounds %struct.s2n_handshake_parameters, ptr %276, i32 0, i32 11
  %278 = load i8, ptr %277, align 1, !tbaa !52
  %279 = zext i8 %278 to i32
  %280 = icmp ne i32 %279, 0
  br label %281

281:                                              ; preds = %274, %267, %261
  %282 = phi i1 [ true, %267 ], [ true, %261 ], [ %280, %274 ]
  %283 = zext i1 %282 to i32
  %284 = load ptr, ptr %3, align 8, !tbaa !5
  %285 = load i32, ptr %284, align 8
  %286 = and i32 %283, 1
  %287 = shl i32 %286, 6
  %288 = and i32 %285, -65
  %289 = or i32 %288, %287
  store i32 %289, ptr %284, align 8
  store i32 0, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %290

290:                                              ; preds = %281, %258, %194, %175, %166
  call void @llvm.lifetime.end.p0(i64 40, ptr %11) #7
  br label %291

291:                                              ; preds = %290, %159, %152
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #7
  br label %292

292:                                              ; preds = %291, %141
  call void @llvm.lifetime.end.p0(i64 256, ptr %7) #7
  br label %293

293:                                              ; preds = %292, %74, %36
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  br label %294

294:                                              ; preds = %293, %22
  %295 = load i32, ptr %2, align 4
  ret i32 %295
}

declare i32 @s2n_blob_init(ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #6

declare ptr @s2n_ensure_memmove_trace(ptr noundef, ptr noundef, i64 noundef) #2

declare i32 @s2n_blob_char_to_lower(ptr noundef) #2

declare i32 @s2n_stuffer_init(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @s2n_find_cert_matches(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #5

attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { 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 #2 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #6 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }

!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 = !{!7, !7, i64 0}
!10 = !{!11, !12, i64 8}
!11 = !{!"s2n_blob", !6, i64 0, !12, i64 8, !12, i64 12, !12, i64 16}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"s2n_debug_info", !6, i64 0, !6, i64 8}
!15 = !{!14, !6, i64 8}
!16 = !{!12, !12, i64 0}
!17 = !{!11, !6, i64 0}
!18 = !{!19, !6, i64 8}
!19 = !{!"s2n_connection", !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 2, !12, i64 2, !12, i64 2, !12, i64 2, !12, i64 2, !12, i64 2, !12, i64 2, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !7, i64 80, !7, i64 102, !7, i64 124, !12, i64 148, !12, i64 152, !20, i64 160, !21, i64 168, !21, i64 176, !7, i64 184, !7, i64 216, !7, i64 217, !7, i64 218, !7, i64 219, !7, i64 220, !7, i64 221, !7, i64 222, !6, i64 224, !6, i64 232, !22, i64 240, !6, i64 632, !6, i64 640, !23, i64 648, !29, i64 1144, !32, i64 1688, !6, i64 1752, !7, i64 1760, !12, i64 1764, !7, i64 1768, !35, i64 1776, !35, i64 1816, !35, i64 1856, !35, i64 1896, !12, i64 1936, !21, i64 1944, !7, i64 1952, !35, i64 1960, !7, i64 2000, !7, i64 2001, !7, i64 2002, !28, i64 2003, !36, i64 2004, !36, i64 2008, !37, i64 2016, !34, i64 2208, !12, i64 2212, !34, i64 2216, !21, i64 2224, !7, i64 2232, !21, i64 2240, !21, i64 2248, !21, i64 2256, !36, i64 2264, !36, i64 2268, !7, i64 2272, !7, i64 2528, !12, i64 2784, !11, i64 2792, !12, i64 2816, !11, i64 2824, !11, i64 2848, !11, i64 2872, !39, i64 2896, !41, i64 3704, !6, i64 3760, !6, i64 3768, !7, i64 3776, !12, i64 3780, !11, i64 3784, !12, i64 3808, !43, i64 3816, !7, i64 3848, !35, i64 3992, !11, i64 4032, !11, i64 4056, !28, i64 4080, !28, i64 4081, !28, i64 4082, !34, i64 4084, !34, i64 4086, !12, i64 4088, !12, i64 4092, !11, i64 4096, !12, i64 4120, !44, i64 4128, !36, i64 4176, !7, i64 4180, !7, i64 4181}
!20 = !{!"s2n_timer", !21, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!"s2n_secrets", !7, i64 0, !12, i64 388}
!23 = !{!"s2n_kex_parameters", !24, i64 0, !25, i64 8, !7, i64 24, !25, i64 56, !26, i64 72, !26, i64 184, !7, i64 296, !27, i64 360, !11, i64 448, !11, i64 472}
!24 = !{!"s2n_dh_params", !6, i64 0}
!25 = !{!"s2n_ecc_evp_params", !6, i64 0, !6, i64 8}
!26 = !{!"s2n_kem_group_params", !6, i64 0, !27, i64 8, !25, i64 96}
!27 = !{!"s2n_kem_params", !6, i64 0, !11, i64 8, !11, i64 32, !11, i64 56, !28, i64 80}
!28 = !{!"_Bool", !7, i64 0}
!29 = !{!"s2n_handshake_parameters", !30, i64 0, !30, i64 48, !11, i64 96, !12, i64 120, !31, i64 124, !6, i64 384, !6, i64 392, !6, i64 400, !7, i64 408, !7, i64 440, !7, i64 472, !7, i64 473, !7, i64 474, !7, i64 506}
!30 = !{!"s2n_pkey", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!31 = !{!"s2n_sig_scheme_list", !7, i64 0, !7, i64 256}
!32 = !{!"s2n_psk_parameters", !12, i64 0, !33, i64 8, !34, i64 40, !34, i64 42, !6, i64 48, !12, i64 56}
!33 = !{!"s2n_array", !11, i64 0, !12, i64 24, !12, i64 28}
!34 = !{!"short", !7, i64 0}
!35 = !{!"s2n_stuffer", !11, i64 0, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 36, !12, i64 36}
!36 = !{!"", !12, i64 0}
!37 = !{!"s2n_handshake", !35, i64 0, !6, i64 40, !7, i64 48, !7, i64 56, !7, i64 104, !7, i64 152, !12, i64 156, !12, i64 160, !12, i64 164, !12, i64 168, !38, i64 176, !12, i64 184, !12, i64 184, !12, i64 184, !12, i64 184, !12, i64 188}
!38 = !{!"s2n_offered_early_data", !6, i64 0}
!39 = !{!"s2n_client_hello", !11, i64 0, !40, i64 24, !11, i64 728, !11, i64 752, !11, i64 776, !7, i64 800, !7, i64 801, !12, i64 802, !12, i64 802, !12, i64 802, !12, i64 802, !12, i64 802, !12, i64 802, !12, i64 802}
!40 = !{!"", !7, i64 0, !11, i64 672, !34, i64 696}
!41 = !{!"s2n_x509_validator", !6, i64 0, !6, i64 8, !7, i64 16, !7, i64 17, !34, i64 18, !6, i64 24, !12, i64 32, !6, i64 40, !42, i64 48, !28, i64 52}
!42 = !{!"s2n_cert_validation_info", !12, i64 0, !12, i64 0}
!43 = !{!"s2n_ticket_fields", !11, i64 0, !12, i64 24}
!44 = !{!"s2n_post_handshake", !35, i64 0, !7, i64 40}
!45 = !{!46, !6, i64 16}
!46 = !{!"s2n_config", !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 0, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 2, !12, i64 2, !12, i64 2, !12, i64 2, !6, i64 8, !6, i64 16, !47, i64 24, !11, i64 56, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !12, i64 128, !12, i64 132, !6, i64 136, !21, i64 144, !6, i64 152, !21, i64 160, !21, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !12, i64 224, !7, i64 228, !12, i64 232, !12, i64 236, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !7, i64 296, !7, i64 297, !48, i64 304, !34, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !12, i64 392, !12, i64 396, !12, i64 400, !6, i64 408, !12, i64 416, !12, i64 420, !6, i64 424, !6, i64 432, !12, i64 440, !11, i64 448}
!47 = !{!"certs_by_type", !7, i64 0}
!48 = !{!"s2n_x509_trust_store", !6, i64 0, !12, i64 8}
!49 = !{!19, !7, i64 1616}
!50 = !{!35, !12, i64 28}
!51 = !{!35, !12, i64 24}
!52 = !{!19, !7, i64 1617}


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

%struct.s2n_debug_info = type { ptr, ptr }
%struct.s2n_blob = type { ptr, i32, i32, i8 }
%struct.s2n_stuffer = type { %struct.s2n_blob, i32, i32, i32, i8 }

@_s2n_debug_info = external thread_local local_unnamed_addr global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local local_unnamed_addr global i32, align 4
@.str.5 = external hidden unnamed_addr constant [90 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [90 x i8], align 1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #0

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare ptr @strrchr(ptr noundef, i32 noundef) local_unnamed_addr #1

declare i32 @s2n_calculate_stacktrace() local_unnamed_addr #2

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

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

declare i32 @s2n_stuffer_skip_write(ptr noundef, i32 noundef) local_unnamed_addr #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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @s2n_conn_find_name_matching_certs(ptr noundef %0) local_unnamed_addr #5 {
  %2 = alloca %struct.s2n_blob, align 8
  %3 = alloca [256 x i8], align 16
  %4 = alloca %struct.s2n_blob, align 8
  %5 = alloca %struct.s2n_stuffer, align 8
  %6 = alloca [256 x i8], align 16
  %7 = alloca %struct.s2n_blob, align 8
  %8 = alloca %struct.s2n_stuffer, align 8
  %9 = getelementptr inbounds i8, ptr %0, i64 2272
  %10 = load i8, ptr %9, align 8, !tbaa !5
  %.not = icmp eq i8 %10, 0
  br i1 %.not, label %108, label %11

11:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %2, i8 0, i64 24, i1 false)
  %12 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %9) #7
  %13 = trunc i64 %12 to i32
  %14 = call i32 @s2n_blob_init(ptr noundef nonnull %2, ptr noundef nonnull %9, i32 noundef %13) #6
  %15 = icmp sgt i32 %14, -1
  br i1 %15, label %16, label %107

16:                                               ; preds = %11
  %17 = getelementptr inbounds i8, ptr %2, i64 8
  %18 = load i32, ptr %17, align 8, !tbaa !8
  %19 = icmp ult i32 %18, 256
  br i1 %19, label %28, label %20

20:                                               ; preds = %16
  %21 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.5, ptr %21, align 8, !tbaa !12
  %22 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.5, i64 21), i32 noundef 47) #7
  %.not33 = icmp eq ptr %22, null
  %23 = getelementptr inbounds i8, ptr %22, i64 1
  %24 = select i1 %.not33, ptr getelementptr inbounds (i8, ptr @.str.5, i64 21), ptr %23
  %25 = getelementptr inbounds i8, ptr %21, i64 8
  store ptr %24, ptr %25, align 8, !tbaa !14
  %26 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %26, align 4, !tbaa !15
  %27 = call i32 @s2n_calculate_stacktrace() #6
  br label %107

28:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %3) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(256) %3, i8 0, i64 256, i1 false)
  %.not34 = icmp eq i32 %18, 0
  br i1 %.not34, label %.critedge42, label %29, !prof !16

29:                                               ; preds = %28
  %30 = load ptr, ptr %2, align 8, !tbaa !17
  %31 = zext nneg i32 %18 to i64
  %32 = call ptr @s2n_ensure_memmove_trace(ptr noundef nonnull %3, ptr noundef %30, i64 noundef %31) #6
  %.not35.not = icmp eq ptr %32, null
  br i1 %.not35.not, label %33, label %..critedge42_crit_edge

..critedge42_crit_edge:                           ; preds = %29
  %.pre = load i32, ptr %17, align 8, !tbaa !8
  br label %.critedge42

33:                                               ; preds = %29
  %34 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.6, ptr %34, align 8, !tbaa !12
  %35 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.6, i64 21), i32 noundef 47) #7
  %.not36 = icmp eq ptr %35, null
  %36 = getelementptr inbounds i8, ptr %35, i64 1
  %37 = select i1 %.not36, ptr getelementptr inbounds (i8, ptr @.str.6, i64 21), ptr %36
  %38 = getelementptr inbounds i8, ptr %34, i64 8
  store ptr %37, ptr %38, align 8, !tbaa !14
  %39 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %39, align 4, !tbaa !15
  %40 = call i32 @s2n_calculate_stacktrace() #6
  br label %106

.critedge42:                                      ; preds = %..critedge42_crit_edge, %28
  %41 = phi i32 [ %.pre, %..critedge42_crit_edge ], [ 0, %28 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %4, i8 0, i64 24, i1 false)
  %42 = call i32 @s2n_blob_init(ptr noundef nonnull %4, ptr noundef nonnull %3, i32 noundef %41) #6
  %43 = icmp sgt i32 %42, -1
  br i1 %43, label %44, label %105

44:                                               ; preds = %.critedge42
  %45 = call i32 @s2n_blob_char_to_lower(ptr noundef nonnull %4) #6
  %46 = icmp sgt i32 %45, -1
  br i1 %46, label %47, label %105

47:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %5, i8 0, i64 40, i1 false)
  %48 = call i32 @s2n_stuffer_init(ptr noundef nonnull %5, ptr noundef nonnull %4) #6
  %49 = icmp sgt i32 %48, -1
  br i1 %49, label %50, label %104

50:                                               ; preds = %47
  %51 = getelementptr inbounds i8, ptr %4, i64 8
  %52 = load i32, ptr %51, align 8, !tbaa !8
  %53 = call i32 @s2n_stuffer_skip_write(ptr noundef nonnull %5, i32 noundef %52) #6
  %54 = icmp sgt i32 %53, -1
  br i1 %54, label %55, label %104

55:                                               ; preds = %50
  %56 = getelementptr inbounds i8, ptr %0, i64 8
  %57 = load ptr, ptr %56, align 8, !tbaa !18
  %58 = getelementptr inbounds i8, ptr %57, i64 16
  %59 = load ptr, ptr %58, align 8, !tbaa !45
  %60 = getelementptr inbounds i8, ptr %0, i64 1552
  %61 = getelementptr inbounds i8, ptr %0, i64 1616
  %62 = call i32 @s2n_find_cert_matches(ptr noundef %59, ptr noundef nonnull %4, ptr noundef nonnull %60, ptr noundef nonnull %61)
  %63 = icmp sgt i32 %62, -1
  br i1 %63, label %64, label %104

64:                                               ; preds = %55
  %65 = load i8, ptr %61, align 8, !tbaa !49
  %.not37 = icmp eq i8 %65, 0
  br i1 %.not37, label %66, label %91

66:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %6) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(256) %6, i8 0, i64 256, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %7, i8 0, i64 24, i1 false)
  %67 = call i32 @s2n_blob_init(ptr noundef nonnull %7, ptr noundef nonnull %6, i32 noundef 256) #6
  %68 = icmp sgt i32 %67, -1
  br i1 %68, label %69, label %.thread

.thread:                                          ; preds = %66
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %6) #6
  br label %104

69:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #6
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %8, i8 0, i64 40, i1 false)
  %70 = call i32 @s2n_stuffer_init(ptr noundef nonnull %8, ptr noundef nonnull %7) #6
  %71 = icmp sgt i32 %70, -1
  br i1 %71, label %72, label %.thread45

72:                                               ; preds = %69
  %73 = call i32 @s2n_create_wildcard_hostname(ptr noundef nonnull %5, ptr noundef nonnull %8)
  %74 = icmp sgt i32 %73, -1
  br i1 %74, label %75, label %.thread45

75:                                               ; preds = %72
  %76 = getelementptr inbounds i8, ptr %8, i64 28
  %77 = load i32, ptr %76, align 4, !tbaa !50
  %78 = getelementptr inbounds i8, ptr %8, i64 24
  %79 = load i32, ptr %78, align 8, !tbaa !51
  %80 = icmp eq i32 %77, %79
  br i1 %80, label %.thread45, label %81

.thread45:                                        ; preds = %69, %72, %75
  %.4.ph = phi i32 [ 0, %75 ], [ -1, %72 ], [ -1, %69 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %6) #6
  br label %104

81:                                               ; preds = %75
  %82 = sub i32 %77, %79
  %83 = getelementptr inbounds i8, ptr %7, i64 8
  store i32 %82, ptr %83, align 8, !tbaa !8
  %84 = load ptr, ptr %56, align 8, !tbaa !18
  %85 = getelementptr inbounds i8, ptr %84, i64 16
  %86 = load ptr, ptr %85, align 8, !tbaa !45
  %87 = getelementptr inbounds i8, ptr %0, i64 1584
  %88 = getelementptr inbounds i8, ptr %0, i64 1617
  %89 = call i32 @s2n_find_cert_matches(ptr noundef %86, ptr noundef nonnull %7, ptr noundef nonnull %87, ptr noundef nonnull %88)
  %90 = icmp sgt i32 %89, -1
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %6) #6
  br i1 %90, label %91, label %104

91:                                               ; preds = %81, %64
  %92 = load i32, ptr %0, align 8
  %93 = and i32 %92, 64
  %.not38 = icmp eq i32 %93, 0
  br i1 %.not38, label %94, label %100

94:                                               ; preds = %91
  %95 = load i8, ptr %61, align 8, !tbaa !49
  %.not39 = icmp eq i8 %95, 0
  br i1 %.not39, label %96, label %100

96:                                               ; preds = %94
  %97 = getelementptr inbounds i8, ptr %0, i64 1617
  %98 = load i8, ptr %97, align 1, !tbaa !52
  %.not40 = icmp eq i8 %98, 0
  %99 = select i1 %.not40, i32 0, i32 64
  br label %100

100:                                              ; preds = %96, %94, %91
  %101 = phi i32 [ 64, %94 ], [ 64, %91 ], [ %99, %96 ]
  %102 = and i32 %92, -65
  %103 = or disjoint i32 %101, %102
  store i32 %103, ptr %0, align 8
  br label %104

104:                                              ; preds = %.thread45, %.thread, %55, %50, %47, %81, %100
  %.6 = phi i32 [ 0, %100 ], [ -1, %81 ], [ -1, %47 ], [ -1, %50 ], [ -1, %55 ], [ -1, %.thread ], [ %.4.ph, %.thread45 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #6
  br label %105

105:                                              ; preds = %44, %.critedge42, %104
  %.7 = phi i32 [ %.6, %104 ], [ -1, %.critedge42 ], [ -1, %44 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  br label %106

106:                                              ; preds = %33, %105
  %.8 = phi i32 [ %.7, %105 ], [ -1, %33 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %3) #6
  br label %107

107:                                              ; preds = %11, %106, %20
  %.9 = phi i32 [ %.8, %106 ], [ -1, %20 ], [ -1, %11 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #6
  br label %108

108:                                              ; preds = %1, %107
  %.10 = phi i32 [ %.9, %107 ], [ 0, %1 ]
  ret i32 %.10
}

declare i32 @s2n_blob_init(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #1

declare ptr @s2n_ensure_memmove_trace(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare i32 @s2n_blob_char_to_lower(ptr noundef) local_unnamed_addr #2

declare i32 @s2n_stuffer_init(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare hidden i32 @s2n_find_cert_matches(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { mustprogress nofree nounwind willreturn memory(argmem: 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 #2 = { "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !11, i64 8}
!9 = !{!"s2n_blob", !10, i64 0, !11, i64 8, !11, i64 12, !11, i64 16}
!10 = !{!"any pointer", !6, i64 0}
!11 = !{!"int", !6, i64 0}
!12 = !{!13, !10, i64 0}
!13 = !{!"s2n_debug_info", !10, i64 0, !10, i64 8}
!14 = !{!13, !10, i64 8}
!15 = !{!11, !11, i64 0}
!16 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!17 = !{!9, !10, i64 0}
!18 = !{!19, !10, i64 8}
!19 = !{!"s2n_connection", !11, i64 0, !11, i64 0, !11, i64 0, !11, i64 0, !11, i64 0, !11, i64 0, !11, i64 0, !11, i64 0, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 2, !11, i64 2, !11, i64 2, !11, i64 2, !11, i64 2, !11, i64 2, !11, i64 2, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !6, i64 80, !6, i64 102, !6, i64 124, !11, i64 148, !11, i64 152, !20, i64 160, !21, i64 168, !21, i64 176, !6, i64 184, !6, i64 216, !6, i64 217, !6, i64 218, !6, i64 219, !6, i64 220, !6, i64 221, !6, i64 222, !10, i64 224, !10, i64 232, !22, i64 240, !10, i64 632, !10, i64 640, !23, i64 648, !29, i64 1144, !32, i64 1688, !10, i64 1752, !6, i64 1760, !11, i64 1764, !6, i64 1768, !35, i64 1776, !35, i64 1816, !35, i64 1856, !35, i64 1896, !11, i64 1936, !21, i64 1944, !6, i64 1952, !35, i64 1960, !6, i64 2000, !6, i64 2001, !6, i64 2002, !28, i64 2003, !36, i64 2004, !36, i64 2008, !37, i64 2016, !34, i64 2208, !11, i64 2212, !34, i64 2216, !21, i64 2224, !6, i64 2232, !21, i64 2240, !21, i64 2248, !21, i64 2256, !36, i64 2264, !36, i64 2268, !6, i64 2272, !6, i64 2528, !11, i64 2784, !9, i64 2792, !11, i64 2816, !9, i64 2824, !9, i64 2848, !9, i64 2872, !39, i64 2896, !41, i64 3704, !10, i64 3760, !10, i64 3768, !6, i64 3776, !11, i64 3780, !9, i64 3784, !11, i64 3808, !43, i64 3816, !6, i64 3848, !35, i64 3992, !9, i64 4032, !9, i64 4056, !28, i64 4080, !28, i64 4081, !28, i64 4082, !34, i64 4084, !34, i64 4086, !11, i64 4088, !11, i64 4092, !9, i64 4096, !11, i64 4120, !44, i64 4128, !36, i64 4176, !6, i64 4180, !6, i64 4181}
!20 = !{!"s2n_timer", !21, i64 0}
!21 = !{!"long", !6, i64 0}
!22 = !{!"s2n_secrets", !6, i64 0, !11, i64 388}
!23 = !{!"s2n_kex_parameters", !24, i64 0, !25, i64 8, !6, i64 24, !25, i64 56, !26, i64 72, !26, i64 184, !6, i64 296, !27, i64 360, !9, i64 448, !9, i64 472}
!24 = !{!"s2n_dh_params", !10, i64 0}
!25 = !{!"s2n_ecc_evp_params", !10, i64 0, !10, i64 8}
!26 = !{!"s2n_kem_group_params", !10, i64 0, !27, i64 8, !25, i64 96}
!27 = !{!"s2n_kem_params", !10, i64 0, !9, i64 8, !9, i64 32, !9, i64 56, !28, i64 80}
!28 = !{!"_Bool", !6, i64 0}
!29 = !{!"s2n_handshake_parameters", !30, i64 0, !30, i64 48, !9, i64 96, !11, i64 120, !31, i64 124, !10, i64 384, !10, i64 392, !10, i64 400, !6, i64 408, !6, i64 440, !6, i64 472, !6, i64 473, !6, i64 474, !6, i64 506}
!30 = !{!"s2n_pkey", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!31 = !{!"s2n_sig_scheme_list", !6, i64 0, !6, i64 256}
!32 = !{!"s2n_psk_parameters", !11, i64 0, !33, i64 8, !34, i64 40, !34, i64 42, !10, i64 48, !11, i64 56}
!33 = !{!"s2n_array", !9, i64 0, !11, i64 24, !11, i64 28}
!34 = !{!"short", !6, i64 0}
!35 = !{!"s2n_stuffer", !9, i64 0, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 36, !11, i64 36}
!36 = !{!"", !11, i64 0}
!37 = !{!"s2n_handshake", !35, i64 0, !10, i64 40, !6, i64 48, !6, i64 56, !6, i64 104, !6, i64 152, !11, i64 156, !11, i64 160, !11, i64 164, !11, i64 168, !38, i64 176, !11, i64 184, !11, i64 184, !11, i64 184, !11, i64 184, !11, i64 188}
!38 = !{!"s2n_offered_early_data", !10, i64 0}
!39 = !{!"s2n_client_hello", !9, i64 0, !40, i64 24, !9, i64 728, !9, i64 752, !9, i64 776, !6, i64 800, !6, i64 801, !11, i64 802, !11, i64 802, !11, i64 802, !11, i64 802, !11, i64 802, !11, i64 802, !11, i64 802}
!40 = !{!"", !6, i64 0, !9, i64 672, !34, i64 696}
!41 = !{!"s2n_x509_validator", !10, i64 0, !10, i64 8, !6, i64 16, !6, i64 17, !34, i64 18, !10, i64 24, !11, i64 32, !10, i64 40, !42, i64 48, !28, i64 52}
!42 = !{!"s2n_cert_validation_info", !11, i64 0, !11, i64 0}
!43 = !{!"s2n_ticket_fields", !9, i64 0, !11, i64 24}
!44 = !{!"s2n_post_handshake", !35, i64 0, !6, i64 40}
!45 = !{!46, !10, i64 16}
!46 = !{!"s2n_config", !11, i64 0, !11, i64 0, !11, i64 0, !11, i64 0, !11, i64 0, !11, i64 0, !11, i64 0, !11, i64 0, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 2, !11, i64 2, !11, i64 2, !11, i64 2, !10, i64 8, !10, i64 16, !47, i64 24, !9, i64 56, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !11, i64 128, !11, i64 132, !10, i64 136, !21, i64 144, !10, i64 152, !21, i64 160, !21, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !11, i64 224, !6, i64 228, !11, i64 232, !11, i64 236, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !6, i64 296, !6, i64 297, !48, i64 304, !34, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360, !10, i64 368, !10, i64 376, !10, i64 384, !11, i64 392, !11, i64 396, !11, i64 400, !10, i64 408, !11, i64 416, !11, i64 420, !10, i64 424, !10, i64 432, !11, i64 440, !9, i64 448}
!47 = !{!"certs_by_type", !6, i64 0}
!48 = !{!"s2n_x509_trust_store", !10, i64 0, !11, i64 8}
!49 = !{!19, !6, i64 1616}
!50 = !{!35, !11, i64 28}
!51 = !{!35, !11, i64 24}
!52 = !{!19, !6, i64 1617}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LowerExpectIntrinsicPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass