; LLVM IR from aws/s2n-tls :: tls (s2n_connection)

; 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_result = type { i32 }
%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_stuffer = type { %struct.s2n_blob, i32, i32, i32, i8 }
%struct.s2n_blob = type { ptr, i32, i32, i8 }
%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.2 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [91 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

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_connection_set_config(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct.s2n_result, align 4
  %8 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  br label %9

9:                                                ; preds = %2
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = icmp ne ptr %10, null
  br i1 %11, label %43, label %12

12:                                               ; preds = %9
  br label %13

13:                                               ; preds = %12
  br label %14

14:                                               ; preds = %13
  %15 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %16 = getelementptr inbounds %struct.s2n_debug_info, ptr %15, i32 0, i32 0
  store ptr @.str.2, ptr %16, align 8, !tbaa !9
  %17 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %18 = getelementptr inbounds %struct.s2n_debug_info, ptr %17, i32 0, i32 0
  %19 = load ptr, ptr %18, align 8, !tbaa !9
  %20 = getelementptr inbounds i8, ptr %19, i64 21
  %21 = call ptr @strrchr(ptr noundef %20, i32 noundef 47) #6
  %22 = icmp ne ptr %21, null
  br i1 %22, label %23, label %30

23:                                               ; preds = %14
  %24 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %25 = getelementptr inbounds %struct.s2n_debug_info, ptr %24, i32 0, i32 0
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  %27 = getelementptr inbounds i8, ptr %26, i64 21
  %28 = call ptr @strrchr(ptr noundef %27, i32 noundef 47) #6
  %29 = getelementptr inbounds i8, ptr %28, i64 1
  br label %35

30:                                               ; preds = %14
  %31 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %32 = getelementptr inbounds %struct.s2n_debug_info, ptr %31, i32 0, i32 0
  %33 = load ptr, ptr %32, align 8, !tbaa !9
  %34 = getelementptr inbounds i8, ptr %33, i64 21
  br label %35

35:                                               ; preds = %30, %23
  %36 = phi ptr [ %29, %23 ], [ %34, %30 ]
  %37 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %38 = getelementptr inbounds %struct.s2n_debug_info, ptr %37, i32 0, i32 1
  store ptr %36, ptr %38, align 8, !tbaa !11
  %39 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %39, align 4, !tbaa !12
  %40 = call i32 @s2n_calculate_stacktrace()
  br label %41

41:                                               ; preds = %35
  store i32 -1, ptr %3, align 4
  br label %370

42:                                               ; No predecessors!
  br label %43

43:                                               ; preds = %42, %9
  br label %44

44:                                               ; preds = %43
  br label %45

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

48:                                               ; preds = %45
  br label %49

49:                                               ; preds = %48
  br label %50

50:                                               ; preds = %49
  %51 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %52 = getelementptr inbounds %struct.s2n_debug_info, ptr %51, i32 0, i32 0
  store ptr @.str.3, ptr %52, align 8, !tbaa !9
  %53 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %54 = getelementptr inbounds %struct.s2n_debug_info, ptr %53, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !9
  %56 = getelementptr inbounds i8, ptr %55, i64 21
  %57 = call ptr @strrchr(ptr noundef %56, i32 noundef 47) #6
  %58 = icmp ne ptr %57, null
  br i1 %58, label %59, label %66

59:                                               ; preds = %50
  %60 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %61 = getelementptr inbounds %struct.s2n_debug_info, ptr %60, i32 0, i32 0
  %62 = load ptr, ptr %61, align 8, !tbaa !9
  %63 = getelementptr inbounds i8, ptr %62, i64 21
  %64 = call ptr @strrchr(ptr noundef %63, i32 noundef 47) #6
  %65 = getelementptr inbounds i8, ptr %64, i64 1
  br label %71

66:                                               ; preds = %50
  %67 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %68 = getelementptr inbounds %struct.s2n_debug_info, ptr %67, i32 0, i32 0
  %69 = load ptr, ptr %68, align 8, !tbaa !9
  %70 = getelementptr inbounds i8, ptr %69, i64 21
  br label %71

71:                                               ; preds = %66, %59
  %72 = phi ptr [ %65, %59 ], [ %70, %66 ]
  %73 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %74 = getelementptr inbounds %struct.s2n_debug_info, ptr %73, i32 0, i32 1
  store ptr %72, ptr %74, align 8, !tbaa !11
  %75 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %75, align 4, !tbaa !12
  %76 = call i32 @s2n_calculate_stacktrace()
  br label %77

77:                                               ; preds = %71
  store i32 -1, ptr %3, align 4
  br label %370

78:                                               ; No predecessors!
  br label %79

79:                                               ; preds = %78, %45
  br label %80

80:                                               ; preds = %79
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.s2n_connection, ptr %81, i32 0, i32 1
  %83 = load ptr, ptr %82, align 8, !tbaa !14
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = icmp eq ptr %83, %84
  br i1 %85, label %86, label %87

86:                                               ; preds = %80
  store i32 0, ptr %3, align 4
  br label %370

87:                                               ; preds = %80
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.s2n_connection, ptr %88, i32 0, i32 2
  %90 = load ptr, ptr %89, align 8, !tbaa !42
  store ptr %90, ptr %6, align 8, !tbaa !5
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = icmp ne ptr %91, null
  br i1 %92, label %93, label %106

93:                                               ; preds = %87
  br label %94

94:                                               ; preds = %93
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  %96 = load ptr, ptr %6, align 8, !tbaa !5
  %97 = call i32 @s2n_config_validate_loaded_certificates(ptr noundef %95, ptr noundef %96)
  %98 = getelementptr inbounds %struct.s2n_result, ptr %7, i32 0, i32 0
  store i32 %97, ptr %98, align 4
  %99 = getelementptr inbounds %struct.s2n_result, ptr %7, i32 0, i32 0
  %100 = load i32, ptr %99, align 4
  %101 = call zeroext i1 @s2n_result_is_ok(i32 %100)
  br i1 %101, label %103, label %102

102:                                              ; preds = %94
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %369

103:                                              ; preds = %94
  br label %104

104:                                              ; preds = %103
  br label %105

105:                                              ; preds = %104
  br label %106

106:                                              ; preds = %105, %87
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = call i32 @s2n_config_get_num_default_certs(ptr noundef %107)
  %109 = icmp sgt i32 %108, 1
  br i1 %109, label %110, label %148

110:                                              ; preds = %106
  %111 = load ptr, ptr %4, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.s2n_connection, ptr %111, i32 0, i32 13
  %113 = load i32, ptr %112, align 4, !tbaa !43
  %114 = icmp eq i32 %113, 1
  br i1 %114, label %115, label %148

115:                                              ; preds = %110
  br label %116

116:                                              ; preds = %115
  br label %117

117:                                              ; preds = %116
  %118 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %119 = getelementptr inbounds %struct.s2n_debug_info, ptr %118, i32 0, i32 0
  store ptr @.str.4, ptr %119, align 8, !tbaa !9
  %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 !9
  %123 = getelementptr inbounds i8, ptr %122, i64 21
  %124 = call ptr @strrchr(ptr noundef %123, i32 noundef 47) #6
  %125 = icmp ne ptr %124, null
  br i1 %125, label %126, label %133

126:                                              ; preds = %117
  %127 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %128 = getelementptr inbounds %struct.s2n_debug_info, ptr %127, i32 0, i32 0
  %129 = load ptr, ptr %128, align 8, !tbaa !9
  %130 = getelementptr inbounds i8, ptr %129, i64 21
  %131 = call ptr @strrchr(ptr noundef %130, i32 noundef 47) #6
  %132 = getelementptr inbounds i8, ptr %131, i64 1
  br label %138

133:                                              ; preds = %117
  %134 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %135 = getelementptr inbounds %struct.s2n_debug_info, ptr %134, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !9
  %137 = getelementptr inbounds i8, ptr %136, i64 21
  br label %138

138:                                              ; preds = %133, %126
  %139 = phi ptr [ %132, %126 ], [ %137, %133 ]
  %140 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %141 = getelementptr inbounds %struct.s2n_debug_info, ptr %140, i32 0, i32 1
  store ptr %139, ptr %141, align 8, !tbaa !11
  %142 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762052, ptr %142, align 4, !tbaa !12
  %143 = call i32 @s2n_calculate_stacktrace()
  br label %144

144:                                              ; preds = %138
  br label %145

145:                                              ; preds = %144
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %369

146:                                              ; No predecessors!
  br label %147

147:                                              ; preds = %146
  br label %148

148:                                              ; preds = %147, %110, %106
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.s2n_connection, ptr %149, i32 0, i32 72
  %151 = call i32 @s2n_x509_validator_wipe(ptr noundef %150)
  %152 = load ptr, ptr %5, align 8, !tbaa !5
  %153 = load i32, ptr %152, align 8
  %154 = lshr i32 %153, 7
  %155 = and i32 %154, 1
  %156 = icmp ne i32 %155, 0
  br i1 %156, label %157, label %167

157:                                              ; preds = %148
  br label %158

158:                                              ; preds = %157
  %159 = load ptr, ptr %4, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.s2n_connection, ptr %159, i32 0, i32 72
  %161 = call i32 @s2n_x509_validator_init_no_x509_validation(ptr noundef %160)
  %162 = icmp sgt i32 %161, -1
  br i1 %162, label %164, label %163

163:                                              ; preds = %158
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %369

164:                                              ; preds = %158
  br label %165

165:                                              ; preds = %164
  br label %166

166:                                              ; preds = %165
  br label %231

167:                                              ; preds = %148
  br label %168

168:                                              ; preds = %167
  %169 = load ptr, ptr %4, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.s2n_connection, ptr %169, i32 0, i32 72
  %171 = load ptr, ptr %5, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.s2n_config, ptr %171, i32 0, i32 37
  %173 = load ptr, ptr %5, align 8, !tbaa !5
  %174 = load i32, ptr %173, align 8
  %175 = lshr i32 %174, 5
  %176 = and i32 %175, 1
  %177 = trunc i32 %176 to i8
  %178 = call i32 @s2n_x509_validator_init(ptr noundef %170, ptr noundef %172, i8 noundef zeroext %177)
  %179 = icmp sgt i32 %178, -1
  br i1 %179, label %181, label %180

180:                                              ; preds = %168
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %369

181:                                              ; preds = %168
  br label %182

182:                                              ; preds = %181
  br label %183

183:                                              ; preds = %182
  %184 = load ptr, ptr %4, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.s2n_connection, ptr %184, i32 0, i32 75
  %186 = load i8, ptr %185, align 8, !tbaa !44
  %187 = icmp ne i8 %186, 0
  br i1 %187, label %211, label %188

188:                                              ; preds = %183
  %189 = load ptr, ptr %5, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.s2n_config, ptr %189, i32 0, i32 28
  %191 = load ptr, ptr %190, align 8, !tbaa !45
  %192 = icmp ne ptr %191, null
  br i1 %192, label %193, label %204

193:                                              ; preds = %188
  %194 = load ptr, ptr %5, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.s2n_config, ptr %194, i32 0, i32 28
  %196 = load ptr, ptr %195, align 8, !tbaa !45
  %197 = load ptr, ptr %4, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.s2n_connection, ptr %197, i32 0, i32 73
  store ptr %196, ptr %198, align 8, !tbaa !49
  %199 = load ptr, ptr %5, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.s2n_config, ptr %199, i32 0, i32 29
  %201 = load ptr, ptr %200, align 8, !tbaa !50
  %202 = load ptr, ptr %4, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.s2n_connection, ptr %202, i32 0, i32 74
  store ptr %201, ptr %203, align 8, !tbaa !51
  br label %210

204:                                              ; preds = %188
  %205 = load ptr, ptr %4, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.s2n_connection, ptr %205, i32 0, i32 73
  store ptr @s2n_default_verify_host, ptr %206, align 8, !tbaa !49
  %207 = load ptr, ptr %4, align 8, !tbaa !5
  %208 = load ptr, ptr %4, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.s2n_connection, ptr %208, i32 0, i32 74
  store ptr %207, ptr %209, align 8, !tbaa !51
  br label %210

210:                                              ; preds = %204, %193
  br label %211

211:                                              ; preds = %210, %183
  %212 = load ptr, ptr %5, align 8, !tbaa !5
  %213 = load i32, ptr %212, align 8
  %214 = lshr i32 %213, 8
  %215 = and i32 %214, 1
  %216 = icmp ne i32 %215, 0
  br i1 %216, label %217, label %230

217:                                              ; preds = %211
  br label %218

218:                                              ; preds = %217
  %219 = load ptr, ptr %4, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.s2n_connection, ptr %219, i32 0, i32 72
  %221 = load ptr, ptr %5, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.s2n_config, ptr %221, i32 0, i32 38
  %223 = load i16, ptr %222, align 8, !tbaa !52
  %224 = call i32 @s2n_x509_validator_set_max_chain_depth(ptr noundef %220, i16 noundef zeroext %223)
  %225 = icmp sgt i32 %224, -1
  br i1 %225, label %227, label %226

226:                                              ; preds = %218
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %369

227:                                              ; preds = %218
  br label %228

228:                                              ; preds = %227
  br label %229

229:                                              ; preds = %228
  br label %230

230:                                              ; preds = %229, %211
  br label %231

231:                                              ; preds = %230, %166
  %232 = load ptr, ptr %5, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct.s2n_config, ptr %232, i32 0, i32 36
  %234 = load i8, ptr %233, align 1, !tbaa !53
  %235 = zext i8 %234 to i16
  %236 = load ptr, ptr %4, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.s2n_connection, ptr %236, i32 0, i32 87
  store i16 %235, ptr %237, align 4, !tbaa !54
  %238 = load ptr, ptr %4, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.s2n_connection, ptr %238, i32 0, i32 33
  %240 = getelementptr inbounds %struct.s2n_psk_parameters, ptr %239, i32 0, i32 1
  %241 = getelementptr inbounds %struct.s2n_array, ptr %240, i32 0, i32 1
  %242 = load i32, ptr %241, align 8, !tbaa !55
  %243 = icmp eq i32 %242, 0
  br i1 %243, label %244, label %266

244:                                              ; preds = %231
  %245 = load ptr, ptr %4, align 8, !tbaa !5
  %246 = load i32, ptr %245, align 8
  %247 = lshr i32 %246, 12
  %248 = and i32 %247, 1
  %249 = icmp ne i32 %248, 0
  br i1 %249, label %266, label %250

250:                                              ; preds = %244
  br label %251

251:                                              ; preds = %250
  %252 = load ptr, ptr %4, align 8, !tbaa !5
  %253 = load ptr, ptr %5, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.s2n_config, ptr %253, i32 0, i32 48
  %255 = load i32, ptr %254, align 4, !tbaa !56
  %256 = call i32 @s2n_connection_set_psk_mode(ptr noundef %252, i32 noundef %255)
  %257 = icmp sgt i32 %256, -1
  br i1 %257, label %259, label %258

258:                                              ; preds = %251
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %369

259:                                              ; preds = %251
  br label %260

260:                                              ; preds = %259
  br label %261

261:                                              ; preds = %260
  %262 = load ptr, ptr %4, align 8, !tbaa !5
  %263 = load i32, ptr %262, align 8
  %264 = and i32 %263, -4097
  %265 = or i32 %264, 0
  store i32 %265, ptr %262, align 8
  br label %266

266:                                              ; preds = %261, %244, %231
  %267 = load ptr, ptr %5, align 8, !tbaa !5
  %268 = load i32, ptr %267, align 8
  %269 = lshr i32 %268, 11
  %270 = and i32 %269, 1
  %271 = icmp ne i32 %270, 0
  br i1 %271, label %272, label %314

272:                                              ; preds = %266
  br label %273

273:                                              ; preds = %272
  %274 = load ptr, ptr %5, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.s2n_config, ptr %274, i32 0, i32 39
  %276 = load ptr, ptr %275, align 8, !tbaa !57
  %277 = icmp ne ptr %276, null
  br i1 %277, label %311, label %278

278:                                              ; preds = %273
  br label %279

279:                                              ; preds = %278
  br label %280

280:                                              ; preds = %279
  %281 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %282 = getelementptr inbounds %struct.s2n_debug_info, ptr %281, i32 0, i32 0
  store ptr @.str.5, ptr %282, align 8, !tbaa !9
  %283 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %284 = getelementptr inbounds %struct.s2n_debug_info, ptr %283, i32 0, i32 0
  %285 = load ptr, ptr %284, align 8, !tbaa !9
  %286 = getelementptr inbounds i8, ptr %285, i64 21
  %287 = call ptr @strrchr(ptr noundef %286, i32 noundef 47) #6
  %288 = icmp ne ptr %287, null
  br i1 %288, label %289, label %296

289:                                              ; preds = %280
  %290 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %291 = getelementptr inbounds %struct.s2n_debug_info, ptr %290, i32 0, i32 0
  %292 = load ptr, ptr %291, align 8, !tbaa !9
  %293 = getelementptr inbounds i8, ptr %292, i64 21
  %294 = call ptr @strrchr(ptr noundef %293, i32 noundef 47) #6
  %295 = getelementptr inbounds i8, ptr %294, i64 1
  br label %301

296:                                              ; preds = %280
  %297 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %298 = getelementptr inbounds %struct.s2n_debug_info, ptr %297, i32 0, i32 0
  %299 = load ptr, ptr %298, align 8, !tbaa !9
  %300 = getelementptr inbounds i8, ptr %299, i64 21
  br label %301

301:                                              ; preds = %296, %289
  %302 = phi ptr [ %295, %289 ], [ %300, %296 ]
  %303 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %304 = getelementptr inbounds %struct.s2n_debug_info, ptr %303, i32 0, i32 1
  store ptr %302, ptr %304, align 8, !tbaa !11
  %305 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762116, ptr %305, align 4, !tbaa !12
  %306 = call i32 @s2n_calculate_stacktrace()
  br label %307

307:                                              ; preds = %301
  br label %308

308:                                              ; preds = %307
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %369

309:                                              ; No predecessors!
  br label %310

310:                                              ; preds = %309
  br label %311

311:                                              ; preds = %310, %273
  br label %312

312:                                              ; preds = %311
  br label %313

313:                                              ; preds = %312
  br label %314

314:                                              ; preds = %313, %266
  %315 = load ptr, ptr %5, align 8, !tbaa !5
  %316 = load i32, ptr %315, align 8
  %317 = lshr i32 %316, 1
  %318 = and i32 %317, 1
  %319 = icmp ne i32 %318, 0
  br i1 %319, label %320, label %329

320:                                              ; preds = %314
  br label %321

321:                                              ; preds = %320
  %322 = load ptr, ptr %4, align 8, !tbaa !5
  %323 = call i32 @s2n_connection_enable_quic(ptr noundef %322)
  %324 = icmp sgt i32 %323, -1
  br i1 %324, label %326, label %325

325:                                              ; preds = %321
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %369

326:                                              ; preds = %321
  br label %327

327:                                              ; preds = %326
  br label %328

328:                                              ; preds = %327
  br label %329

329:                                              ; preds = %328, %314
  %330 = load ptr, ptr %5, align 8, !tbaa !5
  %331 = getelementptr inbounds %struct.s2n_config, ptr %330, i32 0, i32 52
  %332 = load i32, ptr %331, align 4, !tbaa !58
  %333 = icmp ne i32 %332, 0
  br i1 %333, label %334, label %339

334:                                              ; preds = %329
  %335 = load ptr, ptr %4, align 8, !tbaa !5
  %336 = load i32, ptr %335, align 8
  %337 = and i32 %336, -32769
  %338 = or i32 %337, 32768
  store i32 %338, ptr %335, align 8
  br label %339

339:                                              ; preds = %334, %329
  %340 = load ptr, ptr %5, align 8, !tbaa !5
  %341 = load i32, ptr %340, align 8
  %342 = lshr i32 %341, 15
  %343 = and i32 %342, 1
  %344 = load ptr, ptr %4, align 8, !tbaa !5
  %345 = load i32, ptr %344, align 8
  %346 = and i32 %343, 1
  %347 = shl i32 %346, 20
  %348 = and i32 %345, -1048577
  %349 = or i32 %348, %347
  store i32 %349, ptr %344, align 8
  %350 = load ptr, ptr %5, align 8, !tbaa !5
  %351 = load i32, ptr %350, align 8
  %352 = lshr i32 %351, 16
  %353 = and i32 %352, 1
  %354 = icmp ne i32 %353, 0
  br i1 %354, label %355, label %365

355:                                              ; preds = %339
  %356 = load ptr, ptr %4, align 8, !tbaa !5
  %357 = getelementptr inbounds %struct.s2n_connection, ptr %356, i32 0, i32 13
  %358 = load i32, ptr %357, align 4, !tbaa !43
  %359 = icmp eq i32 %358, 1
  br i1 %359, label %360, label %365

360:                                              ; preds = %355
  %361 = load ptr, ptr %4, align 8, !tbaa !5
  %362 = load i32, ptr %361, align 8
  %363 = and i32 %362, -1048577
  %364 = or i32 %363, 1048576
  store i32 %364, ptr %361, align 8
  br label %365

365:                                              ; preds = %360, %355, %339
  %366 = load ptr, ptr %5, align 8, !tbaa !5
  %367 = load ptr, ptr %4, align 8, !tbaa !5
  %368 = getelementptr inbounds %struct.s2n_connection, ptr %367, i32 0, i32 1
  store ptr %366, ptr %368, align 8, !tbaa !14
  store i32 0, ptr %3, align 4
  store i32 1, ptr %8, align 4
  br label %369

369:                                              ; preds = %365, %325, %308, %258, %226, %180, %163, %145, %102
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %370

370:                                              ; preds = %369, %86, %77, %41
  %371 = load i32, ptr %3, align 4
  ret i32 %371
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @s2n_result_is_ok(i32) #2

; 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 nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #3

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

declare i32 @s2n_calculate_stacktrace() #5

declare i32 @s2n_x509_validator_wipe(ptr noundef) #5

declare i32 @s2n_config_validate_loaded_certificates(ptr noundef, ptr noundef) #5

declare i32 @s2n_config_get_num_default_certs(ptr noundef) #5

declare i32 @s2n_x509_validator_init_no_x509_validation(ptr noundef) #5

declare i32 @s2n_x509_validator_init(ptr noundef, ptr noundef, i8 noundef zeroext) #5

; Function Attrs: nounwind uwtable
declare hidden zeroext i8 @s2n_default_verify_host(ptr noundef, i64 noundef, ptr noundef) #1

declare i32 @s2n_x509_validator_set_max_chain_depth(ptr noundef, i16 noundef zeroext) #5

declare i32 @s2n_connection_set_psk_mode(ptr noundef, i32 noundef) #5

declare i32 @s2n_connection_enable_quic(ptr noundef) #5

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #5 = { "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 willreturn memory(read) }
attributes #7 = { 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, !6, i64 0}
!10 = !{!"s2n_debug_info", !6, i64 0, !6, i64 8}
!11 = !{!10, !6, i64 8}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !6, i64 8}
!15 = !{!"s2n_connection", !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 2, !13, i64 2, !13, i64 2, !13, i64 2, !13, i64 2, !13, i64 2, !13, 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, !13, i64 148, !13, i64 152, !16, i64 160, !17, i64 168, !17, 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, !18, i64 240, !6, i64 632, !6, i64 640, !19, i64 648, !26, i64 1144, !29, i64 1688, !6, i64 1752, !7, i64 1760, !13, i64 1764, !7, i64 1768, !32, i64 1776, !32, i64 1816, !32, i64 1856, !32, i64 1896, !13, i64 1936, !17, i64 1944, !7, i64 1952, !32, i64 1960, !7, i64 2000, !7, i64 2001, !7, i64 2002, !25, i64 2003, !33, i64 2004, !33, i64 2008, !34, i64 2016, !31, i64 2208, !13, i64 2212, !31, i64 2216, !17, i64 2224, !7, i64 2232, !17, i64 2240, !17, i64 2248, !17, i64 2256, !33, i64 2264, !33, i64 2268, !7, i64 2272, !7, i64 2528, !13, i64 2784, !24, i64 2792, !13, i64 2816, !24, i64 2824, !24, i64 2848, !24, i64 2872, !36, i64 2896, !38, i64 3704, !6, i64 3760, !6, i64 3768, !7, i64 3776, !13, i64 3780, !24, i64 3784, !13, i64 3808, !40, i64 3816, !7, i64 3848, !32, i64 3992, !24, i64 4032, !24, i64 4056, !25, i64 4080, !25, i64 4081, !25, i64 4082, !31, i64 4084, !31, i64 4086, !13, i64 4088, !13, i64 4092, !24, i64 4096, !13, i64 4120, !41, i64 4128, !33, i64 4176, !7, i64 4180, !7, i64 4181}
!16 = !{!"s2n_timer", !17, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!"s2n_secrets", !7, i64 0, !13, i64 388}
!19 = !{!"s2n_kex_parameters", !20, i64 0, !21, i64 8, !7, i64 24, !21, i64 56, !22, i64 72, !22, i64 184, !7, i64 296, !23, i64 360, !24, i64 448, !24, i64 472}
!20 = !{!"s2n_dh_params", !6, i64 0}
!21 = !{!"s2n_ecc_evp_params", !6, i64 0, !6, i64 8}
!22 = !{!"s2n_kem_group_params", !6, i64 0, !23, i64 8, !21, i64 96}
!23 = !{!"s2n_kem_params", !6, i64 0, !24, i64 8, !24, i64 32, !24, i64 56, !25, i64 80}
!24 = !{!"s2n_blob", !6, i64 0, !13, i64 8, !13, i64 12, !13, i64 16}
!25 = !{!"_Bool", !7, i64 0}
!26 = !{!"s2n_handshake_parameters", !27, i64 0, !27, i64 48, !24, i64 96, !13, i64 120, !28, 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}
!27 = !{!"s2n_pkey", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!28 = !{!"s2n_sig_scheme_list", !7, i64 0, !7, i64 256}
!29 = !{!"s2n_psk_parameters", !13, i64 0, !30, i64 8, !31, i64 40, !31, i64 42, !6, i64 48, !13, i64 56}
!30 = !{!"s2n_array", !24, i64 0, !13, i64 24, !13, i64 28}
!31 = !{!"short", !7, i64 0}
!32 = !{!"s2n_stuffer", !24, i64 0, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !13, i64 36, !13, i64 36}
!33 = !{!"", !13, i64 0}
!34 = !{!"s2n_handshake", !32, i64 0, !6, i64 40, !7, i64 48, !7, i64 56, !7, i64 104, !7, i64 152, !13, i64 156, !13, i64 160, !13, i64 164, !13, i64 168, !35, i64 176, !13, i64 184, !13, i64 184, !13, i64 184, !13, i64 184, !13, i64 188}
!35 = !{!"s2n_offered_early_data", !6, i64 0}
!36 = !{!"s2n_client_hello", !24, i64 0, !37, i64 24, !24, i64 728, !24, i64 752, !24, i64 776, !7, i64 800, !7, i64 801, !13, i64 802, !13, i64 802, !13, i64 802, !13, i64 802, !13, i64 802, !13, i64 802, !13, i64 802}
!37 = !{!"", !7, i64 0, !24, i64 672, !31, i64 696}
!38 = !{!"s2n_x509_validator", !6, i64 0, !6, i64 8, !7, i64 16, !7, i64 17, !31, i64 18, !6, i64 24, !13, i64 32, !6, i64 40, !39, i64 48, !25, i64 52}
!39 = !{!"s2n_cert_validation_info", !13, i64 0, !13, i64 0}
!40 = !{!"s2n_ticket_fields", !24, i64 0, !13, i64 24}
!41 = !{!"s2n_post_handshake", !32, i64 0, !7, i64 40}
!42 = !{!15, !6, i64 16}
!43 = !{!15, !13, i64 148}
!44 = !{!15, !7, i64 3776}
!45 = !{!46, !6, i64 240}
!46 = !{!"s2n_config", !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 2, !13, i64 2, !13, i64 2, !13, i64 2, !6, i64 8, !6, i64 16, !47, i64 24, !24, i64 56, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !13, i64 128, !13, i64 132, !6, i64 136, !17, i64 144, !6, i64 152, !17, i64 160, !17, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !13, i64 224, !7, i64 228, !13, i64 232, !13, 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, !31, 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, !13, i64 392, !13, i64 396, !13, i64 400, !6, i64 408, !13, i64 416, !13, i64 420, !6, i64 424, !6, i64 432, !13, i64 440, !24, i64 448}
!47 = !{!"certs_by_type", !7, i64 0}
!48 = !{!"s2n_x509_trust_store", !6, i64 0, !13, i64 8}
!49 = !{!15, !6, i64 3760}
!50 = !{!46, !6, i64 248}
!51 = !{!15, !6, i64 3768}
!52 = !{!46, !31, i64 320}
!53 = !{!46, !7, i64 297}
!54 = !{!15, !31, i64 4084}
!55 = !{!15, !13, i64 1720}
!56 = !{!46, !13, i64 396}
!57 = !{!46, !6, i64 328}
!58 = !{!46, !13, i64 420}


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

@_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.2 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [91 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @s2n_connection_set_config(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %3, label %11

3:                                                ; preds = %2
  %4 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.2, ptr %4, align 8, !tbaa !5
  %5 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.2, i64 21), i32 noundef 47) #5
  %.not56 = icmp eq ptr %5, null
  %6 = getelementptr inbounds i8, ptr %5, i64 1
  %7 = select i1 %.not56, ptr getelementptr inbounds (i8, ptr @.str.2, i64 21), ptr %6
  %8 = getelementptr inbounds i8, ptr %4, i64 8
  store ptr %7, ptr %8, align 8, !tbaa !10
  %9 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %9, align 4, !tbaa !11
  %10 = tail call i32 @s2n_calculate_stacktrace() #6
  br label %139

11:                                               ; preds = %2
  %.not57 = icmp eq ptr %1, null
  br i1 %.not57, label %12, label %20

12:                                               ; preds = %11
  %13 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.3, ptr %13, align 8, !tbaa !5
  %14 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.3, i64 21), i32 noundef 47) #5
  %.not58 = icmp eq ptr %14, null
  %15 = getelementptr inbounds i8, ptr %14, i64 1
  %16 = select i1 %.not58, ptr getelementptr inbounds (i8, ptr @.str.3, i64 21), ptr %15
  %17 = getelementptr inbounds i8, ptr %13, i64 8
  store ptr %16, ptr %17, align 8, !tbaa !10
  %18 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %18, align 4, !tbaa !11
  %19 = tail call i32 @s2n_calculate_stacktrace() #6
  br label %139

20:                                               ; preds = %11
  %21 = getelementptr inbounds i8, ptr %0, i64 8
  %22 = load ptr, ptr %21, align 8, !tbaa !13
  %23 = icmp eq ptr %22, %1
  br i1 %23, label %139, label %24

24:                                               ; preds = %20
  %25 = getelementptr inbounds i8, ptr %0, i64 16
  %26 = load ptr, ptr %25, align 8, !tbaa !41
  %.not59 = icmp eq ptr %26, null
  br i1 %.not59, label %30, label %27

27:                                               ; preds = %24
  %28 = tail call i32 @s2n_config_validate_loaded_certificates(ptr noundef nonnull %1, ptr noundef nonnull %26) #6
  %29 = tail call zeroext i1 @s2n_result_is_ok(i32 %28)
  br i1 %29, label %30, label %139

30:                                               ; preds = %27, %24
  %31 = tail call i32 @s2n_config_get_num_default_certs(ptr noundef nonnull %1) #6
  %32 = icmp sgt i32 %31, 1
  br i1 %32, label %33, label %45

33:                                               ; preds = %30
  %34 = getelementptr inbounds i8, ptr %0, i64 148
  %35 = load i32, ptr %34, align 4, !tbaa !42
  %36 = icmp eq i32 %35, 1
  br i1 %36, label %37, label %45

37:                                               ; preds = %33
  %38 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.4, ptr %38, align 8, !tbaa !5
  %39 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.4, i64 21), i32 noundef 47) #5
  %.not71 = icmp eq ptr %39, null
  %40 = getelementptr inbounds i8, ptr %39, i64 1
  %41 = select i1 %.not71, ptr getelementptr inbounds (i8, ptr @.str.4, i64 21), ptr %40
  %42 = getelementptr inbounds i8, ptr %38, i64 8
  store ptr %41, ptr %42, align 8, !tbaa !10
  %43 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762052, ptr %43, align 4, !tbaa !11
  %44 = tail call i32 @s2n_calculate_stacktrace() #6
  br label %139

45:                                               ; preds = %33, %30
  %46 = getelementptr inbounds i8, ptr %0, i64 3704
  %47 = tail call i32 @s2n_x509_validator_wipe(ptr noundef nonnull %46) #6
  %48 = load i32, ptr %1, align 8
  %49 = and i32 %48, 128
  %.not60 = icmp eq i32 %49, 0
  br i1 %.not60, label %53, label %50

50:                                               ; preds = %45
  %51 = tail call i32 @s2n_x509_validator_init_no_x509_validation(ptr noundef nonnull %46) #6
  %52 = icmp sgt i32 %51, -1
  br i1 %52, label %80, label %139

53:                                               ; preds = %45
  %54 = getelementptr inbounds i8, ptr %1, i64 304
  %55 = trunc i32 %48 to i8
  %56 = lshr i8 %55, 5
  %57 = and i8 %56, 1
  %58 = tail call i32 @s2n_x509_validator_init(ptr noundef nonnull %46, ptr noundef nonnull %54, i8 noundef zeroext %57) #6
  %59 = icmp sgt i32 %58, -1
  br i1 %59, label %60, label %139

60:                                               ; preds = %53
  %61 = getelementptr inbounds i8, ptr %0, i64 3776
  %62 = load i8, ptr %61, align 8, !tbaa !43
  %.not61 = icmp eq i8 %62, 0
  br i1 %.not61, label %63, label %72

63:                                               ; preds = %60
  %64 = getelementptr inbounds i8, ptr %1, i64 240
  %65 = load ptr, ptr %64, align 8, !tbaa !44
  %.not62 = icmp eq ptr %65, null
  %66 = getelementptr inbounds i8, ptr %0, i64 3760
  br i1 %.not62, label %70, label %67

67:                                               ; preds = %63
  store ptr %65, ptr %66, align 8, !tbaa !48
  %68 = getelementptr inbounds i8, ptr %1, i64 248
  %69 = load ptr, ptr %68, align 8, !tbaa !49
  br label %.sink.split

70:                                               ; preds = %63
  store ptr @s2n_default_verify_host, ptr %66, align 8, !tbaa !48
  br label %.sink.split

.sink.split:                                      ; preds = %70, %67
  %.sink = phi ptr [ %69, %67 ], [ %0, %70 ]
  %71 = getelementptr inbounds i8, ptr %0, i64 3768
  store ptr %.sink, ptr %71, align 8, !tbaa !50
  br label %72

72:                                               ; preds = %.sink.split, %60
  %73 = load i32, ptr %1, align 8
  %74 = and i32 %73, 256
  %.not63 = icmp eq i32 %74, 0
  br i1 %.not63, label %80, label %75

75:                                               ; preds = %72
  %76 = getelementptr inbounds i8, ptr %1, i64 320
  %77 = load i16, ptr %76, align 8, !tbaa !51
  %78 = tail call i32 @s2n_x509_validator_set_max_chain_depth(ptr noundef nonnull %46, i16 noundef zeroext %77) #6
  %79 = icmp sgt i32 %78, -1
  br i1 %79, label %80, label %139

80:                                               ; preds = %72, %75, %50
  %81 = getelementptr inbounds i8, ptr %1, i64 297
  %82 = load i8, ptr %81, align 1, !tbaa !52
  %83 = zext i8 %82 to i16
  %84 = getelementptr inbounds i8, ptr %0, i64 4084
  store i16 %83, ptr %84, align 4, !tbaa !53
  %85 = getelementptr inbounds i8, ptr %0, i64 1720
  %86 = load i32, ptr %85, align 8, !tbaa !54
  %87 = icmp eq i32 %86, 0
  br i1 %87, label %88, label %99

88:                                               ; preds = %80
  %89 = load i32, ptr %0, align 8
  %90 = and i32 %89, 4096
  %.not64 = icmp eq i32 %90, 0
  br i1 %.not64, label %91, label %99

91:                                               ; preds = %88
  %92 = getelementptr inbounds i8, ptr %1, i64 396
  %93 = load i32, ptr %92, align 4, !tbaa !55
  %94 = tail call i32 @s2n_connection_set_psk_mode(ptr noundef nonnull %0, i32 noundef %93) #6
  %95 = icmp sgt i32 %94, -1
  br i1 %95, label %96, label %139

96:                                               ; preds = %91
  %97 = load i32, ptr %0, align 8
  %98 = and i32 %97, -4097
  store i32 %98, ptr %0, align 8
  br label %99

99:                                               ; preds = %96, %88, %80
  %100 = load i32, ptr %1, align 8
  %101 = and i32 %100, 2048
  %.not65 = icmp eq i32 %101, 0
  br i1 %.not65, label %113, label %102

102:                                              ; preds = %99
  %103 = getelementptr inbounds i8, ptr %1, i64 328
  %104 = load ptr, ptr %103, align 8, !tbaa !56
  %.not66 = icmp eq ptr %104, null
  br i1 %.not66, label %105, label %113

105:                                              ; preds = %102
  %106 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.5, ptr %106, align 8, !tbaa !5
  %107 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.5, i64 21), i32 noundef 47) #5
  %.not67 = icmp eq ptr %107, null
  %108 = getelementptr inbounds i8, ptr %107, i64 1
  %109 = select i1 %.not67, ptr getelementptr inbounds (i8, ptr @.str.5, i64 21), ptr %108
  %110 = getelementptr inbounds i8, ptr %106, i64 8
  store ptr %109, ptr %110, align 8, !tbaa !10
  %111 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762116, ptr %111, align 4, !tbaa !11
  %112 = tail call i32 @s2n_calculate_stacktrace() #6
  br label %139

113:                                              ; preds = %102, %99
  %114 = and i32 %100, 2
  %.not68 = icmp eq i32 %114, 0
  br i1 %.not68, label %118, label %115

115:                                              ; preds = %113
  %116 = tail call i32 @s2n_connection_enable_quic(ptr noundef nonnull %0) #6
  %117 = icmp sgt i32 %116, -1
  br i1 %117, label %118, label %139

118:                                              ; preds = %115, %113
  %119 = getelementptr inbounds i8, ptr %1, i64 420
  %120 = load i32, ptr %119, align 4, !tbaa !57
  %.not69 = icmp eq i32 %120, 0
  %.pre = load i32, ptr %0, align 8
  br i1 %.not69, label %123, label %121

121:                                              ; preds = %118
  %122 = or i32 %.pre, 32768
  store i32 %122, ptr %0, align 8
  br label %123

123:                                              ; preds = %121, %118
  %124 = phi i32 [ %122, %121 ], [ %.pre, %118 ]
  %125 = load i32, ptr %1, align 8
  %126 = shl i32 %125, 5
  %127 = and i32 %126, 1048576
  %128 = and i32 %124, -1048577
  %129 = or disjoint i32 %128, %127
  store i32 %129, ptr %0, align 8
  %130 = load i32, ptr %1, align 8
  %131 = and i32 %130, 65536
  %.not70 = icmp eq i32 %131, 0
  br i1 %.not70, label %138, label %132

132:                                              ; preds = %123
  %133 = getelementptr inbounds i8, ptr %0, i64 148
  %134 = load i32, ptr %133, align 4, !tbaa !42
  %135 = icmp eq i32 %134, 1
  br i1 %135, label %136, label %138

136:                                              ; preds = %132
  %137 = or i32 %124, 1048576
  store i32 %137, ptr %0, align 8
  br label %138

138:                                              ; preds = %136, %132, %123
  store ptr %1, ptr %21, align 8, !tbaa !13
  br label %139

139:                                              ; preds = %37, %105, %138, %27, %50, %53, %75, %91, %115, %20, %12, %3
  %.1 = phi i32 [ -1, %12 ], [ -1, %3 ], [ 0, %20 ], [ -1, %37 ], [ 0, %138 ], [ -1, %105 ], [ -1, %27 ], [ -1, %50 ], [ -1, %53 ], [ -1, %75 ], [ -1, %91 ], [ -1, %115 ]
  ret i32 %.1
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i1 @s2n_result_is_ok(i32) local_unnamed_addr #1

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

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

declare i32 @s2n_calculate_stacktrace() local_unnamed_addr #4

declare i32 @s2n_x509_validator_wipe(ptr noundef) local_unnamed_addr #4

declare i32 @s2n_config_validate_loaded_certificates(ptr noundef, ptr noundef) local_unnamed_addr #4

declare i32 @s2n_config_get_num_default_certs(ptr noundef) local_unnamed_addr #4

declare i32 @s2n_x509_validator_init_no_x509_validation(ptr noundef) local_unnamed_addr #4

declare i32 @s2n_x509_validator_init(ptr noundef, ptr noundef, i8 noundef zeroext) local_unnamed_addr #4

; Function Attrs: nounwind uwtable
declare hidden zeroext i8 @s2n_default_verify_host(ptr noundef, i64 noundef, ptr noundef) #0

declare i32 @s2n_x509_validator_set_max_chain_depth(ptr noundef, i16 noundef zeroext) local_unnamed_addr #4

declare i32 @s2n_connection_set_psk_mode(ptr noundef, i32 noundef) local_unnamed_addr #4

declare i32 @s2n_connection_enable_quic(ptr noundef) local_unnamed_addr #4

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


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