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

; 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_hmac_state = type { i32, i16, i32, i16, i8, %struct.s2n_hash_state, %struct.s2n_hash_state, %struct.s2n_hash_state, %struct.s2n_hash_state, [128 x i8], [64 x i8] }
%struct.s2n_hash_state = type { ptr, i32, i8, i64, %union.anon }
%union.anon = type { %struct.s2n_hash_evp_digest }
%struct.s2n_hash_evp_digest = type { %struct.s2n_evp_digest, %struct.s2n_evp_digest }
%struct.s2n_evp_digest = type { ptr, ptr }
%struct.s2n_blob = type { ptr, 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.0, i32 }
%union.anon.0 = 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_post_handshake = type { %struct.s2n_stuffer, [4 x i8] }
%struct.s2n_atomic_flag = type { i32 }

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

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_verify_cbc(ptr noundef %0, ptr noundef %1, ptr noundef %2) #0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i8, align 1
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca [64 x i8], align 16
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca i8, align 1
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #5
  store i8 0, ptr %8, align 1, !tbaa !9
  br label %21

21:                                               ; preds = %3
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.s2n_hmac_state, ptr %22, i32 0, i32 0
  %24 = load i32, ptr %23, align 8, !tbaa !10
  %25 = call i32 @s2n_hmac_digest_size(i32 noundef %24, ptr noundef %8)
  %26 = icmp sgt i32 %25, -1
  br i1 %26, label %28, label %27

27:                                               ; preds = %21
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %390

28:                                               ; preds = %21
  br label %29

29:                                               ; preds = %28
  br label %30

30:                                               ; preds = %29
  br label %31

31:                                               ; preds = %30
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.s2n_blob, ptr %32, i32 0, i32 1
  %34 = load i32, ptr %33, align 8, !tbaa !16
  %35 = load i8, ptr %8, align 1, !tbaa !9
  %36 = zext i8 %35 to i32
  %37 = icmp ugt i32 %34, %36
  br i1 %37, label %71, label %38

38:                                               ; preds = %31
  br label %39

39:                                               ; preds = %38
  br label %40

40:                                               ; preds = %39
  %41 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %42 = getelementptr inbounds %struct.s2n_debug_info, ptr %41, i32 0, i32 0
  store ptr @.str, ptr %42, align 8, !tbaa !18
  %43 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %44 = getelementptr inbounds %struct.s2n_debug_info, ptr %43, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8, !tbaa !18
  %46 = getelementptr inbounds i8, ptr %45, i64 21
  %47 = call ptr @strrchr(ptr noundef %46, i32 noundef 47) #6
  %48 = icmp ne ptr %47, null
  br i1 %48, label %49, label %56

49:                                               ; preds = %40
  %50 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %51 = getelementptr inbounds %struct.s2n_debug_info, ptr %50, i32 0, i32 0
  %52 = load ptr, ptr %51, align 8, !tbaa !18
  %53 = getelementptr inbounds i8, ptr %52, i64 21
  %54 = call ptr @strrchr(ptr noundef %53, i32 noundef 47) #6
  %55 = getelementptr inbounds i8, ptr %54, i64 1
  br label %61

56:                                               ; preds = %40
  %57 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %58 = getelementptr inbounds %struct.s2n_debug_info, ptr %57, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8, !tbaa !18
  %60 = getelementptr inbounds i8, ptr %59, i64 21
  br label %61

61:                                               ; preds = %56, %49
  %62 = phi ptr [ %55, %49 ], [ %60, %56 ]
  %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 1
  store ptr %62, ptr %64, align 8, !tbaa !20
  %65 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %65, align 4, !tbaa !21
  %66 = call i32 @s2n_calculate_stacktrace()
  br label %67

67:                                               ; preds = %61
  br label %68

68:                                               ; preds = %67
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %390

69:                                               ; No predecessors!
  br label %70

70:                                               ; preds = %69
  br label %71

71:                                               ; preds = %70, %31
  br label %72

72:                                               ; preds = %71
  br label %73

73:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.s2n_blob, ptr %74, i32 0, i32 1
  %76 = load i32, ptr %75, align 8, !tbaa !16
  %77 = load i8, ptr %8, align 1, !tbaa !9
  %78 = zext i8 %77 to i32
  %79 = sub i32 %76, %78
  store i32 %79, ptr %10, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #5
  %80 = load ptr, ptr %7, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.s2n_blob, ptr %80, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8, !tbaa !22
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.s2n_blob, ptr %83, i32 0, i32 1
  %85 = load i32, ptr %84, align 8, !tbaa !16
  %86 = sub i32 %85, 1
  %87 = zext i32 %86 to i64
  %88 = getelementptr inbounds i8, ptr %82, i64 %87
  %89 = load i8, ptr %88, align 1, !tbaa !9
  store i8 %89, ptr %11, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #5
  %90 = load i32, ptr %10, align 4, !tbaa !21
  %91 = load i8, ptr %11, align 1, !tbaa !9
  %92 = zext i8 %91 to i32
  %93 = sub nsw i32 %90, %92
  %94 = sub nsw i32 %93, 1
  %95 = icmp sgt i32 %94, 0
  br i1 %95, label %96, label %102

96:                                               ; preds = %73
  %97 = load i32, ptr %10, align 4, !tbaa !21
  %98 = load i8, ptr %11, align 1, !tbaa !9
  %99 = zext i8 %98 to i32
  %100 = sub nsw i32 %97, %99
  %101 = sub nsw i32 %100, 1
  br label %103

102:                                              ; preds = %73
  br label %103

103:                                              ; preds = %102, %96
  %104 = phi i32 [ %101, %96 ], [ 0, %102 ]
  store i32 %104, ptr %12, align 4, !tbaa !21
  br label %105

105:                                              ; preds = %103
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  %107 = load ptr, ptr %7, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.s2n_blob, ptr %107, i32 0, i32 0
  %109 = load ptr, ptr %108, align 8, !tbaa !22
  %110 = load i32, ptr %12, align 4, !tbaa !21
  %111 = call i32 @s2n_hmac_update(ptr noundef %106, ptr noundef %109, i32 noundef %110)
  %112 = icmp sgt i32 %111, -1
  br i1 %112, label %114, label %113

113:                                              ; preds = %105
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %389

114:                                              ; preds = %105
  br label %115

115:                                              ; preds = %114
  br label %116

116:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.s2n_hmac_state, ptr %117, i32 0, i32 2
  %119 = load i32, ptr %118, align 8, !tbaa !23
  store i32 %119, ptr %13, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 64, ptr %14) #5
  br label %120

120:                                              ; preds = %116
  %121 = load i8, ptr %8, align 1, !tbaa !9
  %122 = zext i8 %121 to i64
  %123 = icmp ule i64 %122, 64
  br i1 %123, label %157, label %124

124:                                              ; preds = %120
  br label %125

125:                                              ; preds = %124
  br label %126

126:                                              ; preds = %125
  %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
  store ptr @.str.1, ptr %128, align 8, !tbaa !18
  %129 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %130 = getelementptr inbounds %struct.s2n_debug_info, ptr %129, i32 0, i32 0
  %131 = load ptr, ptr %130, align 8, !tbaa !18
  %132 = getelementptr inbounds i8, ptr %131, i64 21
  %133 = call ptr @strrchr(ptr noundef %132, i32 noundef 47) #6
  %134 = icmp ne ptr %133, null
  br i1 %134, label %135, label %142

135:                                              ; preds = %126
  %136 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %137 = getelementptr inbounds %struct.s2n_debug_info, ptr %136, i32 0, i32 0
  %138 = load ptr, ptr %137, align 8, !tbaa !18
  %139 = getelementptr inbounds i8, ptr %138, i64 21
  %140 = call ptr @strrchr(ptr noundef %139, i32 noundef 47) #6
  %141 = getelementptr inbounds i8, ptr %140, i64 1
  br label %147

142:                                              ; preds = %126
  %143 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %144 = getelementptr inbounds %struct.s2n_debug_info, ptr %143, i32 0, i32 0
  %145 = load ptr, ptr %144, align 8, !tbaa !18
  %146 = getelementptr inbounds i8, ptr %145, i64 21
  br label %147

147:                                              ; preds = %142, %135
  %148 = phi ptr [ %141, %135 ], [ %146, %142 ]
  %149 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %150 = getelementptr inbounds %struct.s2n_debug_info, ptr %149, i32 0, i32 1
  store ptr %148, ptr %150, align 8, !tbaa !20
  %151 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %151, align 4, !tbaa !21
  %152 = call i32 @s2n_calculate_stacktrace()
  br label %153

153:                                              ; preds = %147
  br label %154

154:                                              ; preds = %153
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %388

155:                                              ; No predecessors!
  br label %156

156:                                              ; preds = %155
  br label %157

157:                                              ; preds = %156, %120
  br label %158

158:                                              ; preds = %157
  br label %159

159:                                              ; preds = %158
  br label %160

160:                                              ; preds = %159
  %161 = load ptr, ptr %6, align 8, !tbaa !5
  %162 = getelementptr inbounds [64 x i8], ptr %14, i64 0, i64 0
  %163 = load i8, ptr %8, align 1, !tbaa !9
  %164 = zext i8 %163 to i32
  %165 = call i32 @s2n_hmac_digest_two_compression_rounds(ptr noundef %161, ptr noundef %162, i32 noundef %164)
  %166 = icmp sgt i32 %165, -1
  br i1 %166, label %168, label %167

167:                                              ; preds = %160
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %388

168:                                              ; preds = %160
  br label %169

169:                                              ; preds = %168
  br label %170

170:                                              ; preds = %169
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %171 = load ptr, ptr %7, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.s2n_blob, ptr %171, i32 0, i32 0
  %173 = load ptr, ptr %172, align 8, !tbaa !22
  %174 = load i32, ptr %12, align 4, !tbaa !21
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds i8, ptr %173, i64 %175
  %177 = getelementptr inbounds [64 x i8], ptr %14, i64 0, i64 0
  %178 = load i8, ptr %8, align 1, !tbaa !9
  %179 = zext i8 %178 to i32
  %180 = call zeroext i1 @s2n_constant_time_equals(ptr noundef %176, ptr noundef %177, i32 noundef %179)
  %181 = zext i1 %180 to i32
  %182 = xor i32 %181, 1
  store i32 %182, ptr %15, align 4, !tbaa !21
  br label %183

183:                                              ; preds = %170
  %184 = load ptr, ptr %6, align 8, !tbaa !5
  %185 = call i32 @s2n_hmac_reset(ptr noundef %184)
  %186 = icmp sgt i32 %185, -1
  br i1 %186, label %188, label %187

187:                                              ; preds = %183
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %387

188:                                              ; preds = %183
  br label %189

189:                                              ; preds = %188
  br label %190

190:                                              ; preds = %189
  br label %191

191:                                              ; preds = %190
  %192 = load ptr, ptr %6, align 8, !tbaa !5
  %193 = load ptr, ptr %7, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.s2n_blob, ptr %193, i32 0, i32 0
  %195 = load ptr, ptr %194, align 8, !tbaa !22
  %196 = load i32, ptr %13, align 4, !tbaa !21
  %197 = call i32 @s2n_hmac_update(ptr noundef %192, ptr noundef %195, i32 noundef %196)
  %198 = icmp sgt i32 %197, -1
  br i1 %198, label %200, label %199

199:                                              ; preds = %191
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %387

200:                                              ; preds = %191
  br label %201

201:                                              ; preds = %200
  br label %202

202:                                              ; preds = %201
  br label %203

203:                                              ; preds = %202
  %204 = load ptr, ptr %6, align 8, !tbaa !5
  %205 = load ptr, ptr %7, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.s2n_blob, ptr %205, i32 0, i32 0
  %207 = load ptr, ptr %206, align 8, !tbaa !22
  %208 = load i32, ptr %12, align 4, !tbaa !21
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds i8, ptr %207, i64 %209
  %211 = load i8, ptr %8, align 1, !tbaa !9
  %212 = zext i8 %211 to i32
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds i8, ptr %210, i64 %213
  %215 = load ptr, ptr %7, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.s2n_blob, ptr %215, i32 0, i32 1
  %217 = load i32, ptr %216, align 8, !tbaa !16
  %218 = load i32, ptr %12, align 4, !tbaa !21
  %219 = sub i32 %217, %218
  %220 = load i8, ptr %8, align 1, !tbaa !9
  %221 = zext i8 %220 to i32
  %222 = sub i32 %219, %221
  %223 = sub i32 %222, 1
  %224 = call i32 @s2n_hmac_update(ptr noundef %204, ptr noundef %214, i32 noundef %223)
  %225 = icmp sgt i32 %224, -1
  br i1 %225, label %227, label %226

226:                                              ; preds = %203
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %387

227:                                              ; preds = %203
  br label %228

228:                                              ; preds = %227
  br label %229

229:                                              ; preds = %228
  %230 = load ptr, ptr %5, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.s2n_connection, ptr %230, i32 0, i32 23
  %232 = load i8, ptr %231, align 4, !tbaa !24
  %233 = zext i8 %232 to i32
  %234 = icmp eq i32 %233, 30
  br i1 %234, label %235, label %238

235:                                              ; preds = %229
  %236 = load i32, ptr %15, align 4, !tbaa !21
  %237 = sub nsw i32 0, %236
  store i32 %237, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %387

238:                                              ; preds = %229
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %239 = load i32, ptr %10, align 4, !tbaa !21
  %240 = sub nsw i32 %239, 1
  %241 = icmp slt i32 255, %240
  br i1 %241, label %242, label %243

242:                                              ; preds = %238
  br label %246

243:                                              ; preds = %238
  %244 = load i32, ptr %10, align 4, !tbaa !21
  %245 = sub nsw i32 %244, 1
  br label %246

246:                                              ; preds = %243, %242
  %247 = phi i32 [ 255, %242 ], [ %245, %243 ]
  store i32 %247, ptr %16, align 4, !tbaa !21
  br label %248

248:                                              ; preds = %246
  %249 = load i32, ptr %16, align 4, !tbaa !21
  %250 = load i8, ptr %11, align 1, !tbaa !9
  %251 = zext i8 %250 to i32
  %252 = icmp uge i32 %249, %251
  br i1 %252, label %286, label %253

253:                                              ; preds = %248
  br label %254

254:                                              ; preds = %253
  br label %255

255:                                              ; preds = %254
  %256 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %257 = getelementptr inbounds %struct.s2n_debug_info, ptr %256, i32 0, i32 0
  store ptr @.str.2, ptr %257, align 8, !tbaa !18
  %258 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %259 = getelementptr inbounds %struct.s2n_debug_info, ptr %258, i32 0, i32 0
  %260 = load ptr, ptr %259, align 8, !tbaa !18
  %261 = getelementptr inbounds i8, ptr %260, i64 21
  %262 = call ptr @strrchr(ptr noundef %261, i32 noundef 47) #6
  %263 = icmp ne ptr %262, null
  br i1 %263, label %264, label %271

264:                                              ; preds = %255
  %265 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %266 = getelementptr inbounds %struct.s2n_debug_info, ptr %265, i32 0, i32 0
  %267 = load ptr, ptr %266, align 8, !tbaa !18
  %268 = getelementptr inbounds i8, ptr %267, i64 21
  %269 = call ptr @strrchr(ptr noundef %268, i32 noundef 47) #6
  %270 = getelementptr inbounds i8, ptr %269, i64 1
  br label %276

271:                                              ; preds = %255
  %272 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %273 = getelementptr inbounds %struct.s2n_debug_info, ptr %272, i32 0, i32 0
  %274 = load ptr, ptr %273, align 8, !tbaa !18
  %275 = getelementptr inbounds i8, ptr %274, i64 21
  br label %276

276:                                              ; preds = %271, %264
  %277 = phi ptr [ %270, %264 ], [ %275, %271 ]
  %278 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %279 = getelementptr inbounds %struct.s2n_debug_info, ptr %278, i32 0, i32 1
  store ptr %277, ptr %279, align 8, !tbaa !20
  %280 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %280, align 4, !tbaa !21
  %281 = call i32 @s2n_calculate_stacktrace()
  br label %282

282:                                              ; preds = %276
  br label %283

283:                                              ; preds = %282
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %386

284:                                              ; No predecessors!
  br label %285

285:                                              ; preds = %284
  br label %286

286:                                              ; preds = %285, %248
  br label %287

287:                                              ; preds = %286
  br label %288

288:                                              ; preds = %287
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %289 = load i32, ptr %16, align 4, !tbaa !21
  %290 = load i8, ptr %11, align 1, !tbaa !9
  %291 = zext i8 %290 to i32
  %292 = sub i32 %289, %291
  store i32 %292, ptr %17, align 4, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  store i64 0, ptr %18, align 8, !tbaa !49
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %293 = load ptr, ptr %7, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.s2n_blob, ptr %293, i32 0, i32 1
  %295 = load i32, ptr %294, align 8, !tbaa !16
  %296 = sub i32 %295, 1
  %297 = load i32, ptr %16, align 4, !tbaa !21
  %298 = sub i32 %296, %297
  %299 = zext i32 %298 to i64
  store i64 %299, ptr %19, align 8, !tbaa !49
  br label %300

300:                                              ; preds = %340, %288
  %301 = load i64, ptr %18, align 8, !tbaa !49
  %302 = load i32, ptr %16, align 4, !tbaa !21
  %303 = zext i32 %302 to i64
  %304 = icmp ult i64 %301, %303
  br i1 %304, label %305, label %312

305:                                              ; preds = %300
  %306 = load i64, ptr %19, align 8, !tbaa !49
  %307 = load ptr, ptr %7, align 8, !tbaa !5
  %308 = getelementptr inbounds %struct.s2n_blob, ptr %307, i32 0, i32 1
  %309 = load i32, ptr %308, align 8, !tbaa !16
  %310 = zext i32 %309 to i64
  %311 = icmp ult i64 %306, %310
  br label %312

312:                                              ; preds = %305, %300
  %313 = phi i1 [ false, %300 ], [ %311, %305 ]
  br i1 %313, label %315, label %314

314:                                              ; preds = %312
  store i32 32, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  br label %345

315:                                              ; preds = %312
  call void @llvm.lifetime.start.p0(i64 1, ptr %20) #5
  %316 = load i64, ptr %18, align 8, !tbaa !49
  %317 = load i32, ptr %17, align 4, !tbaa !21
  %318 = zext i32 %317 to i64
  %319 = icmp uge i64 %316, %318
  %320 = zext i1 %319 to i32
  %321 = mul nsw i32 %320, 8
  %322 = shl i32 255, %321
  %323 = xor i32 %322, -1
  %324 = trunc i32 %323 to i8
  store i8 %324, ptr %20, align 1, !tbaa !9
  %325 = load ptr, ptr %7, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.s2n_blob, ptr %325, i32 0, i32 0
  %327 = load ptr, ptr %326, align 8, !tbaa !22
  %328 = load i64, ptr %19, align 8, !tbaa !49
  %329 = getelementptr inbounds i8, ptr %327, i64 %328
  %330 = load i8, ptr %329, align 1, !tbaa !9
  %331 = zext i8 %330 to i32
  %332 = load i8, ptr %11, align 1, !tbaa !9
  %333 = zext i8 %332 to i32
  %334 = xor i32 %331, %333
  %335 = load i8, ptr %20, align 1, !tbaa !9
  %336 = zext i8 %335 to i32
  %337 = and i32 %334, %336
  %338 = load i32, ptr %15, align 4, !tbaa !21
  %339 = or i32 %338, %337
  store i32 %339, ptr %15, align 4, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 1, ptr %20) #5
  br label %340

340:                                              ; preds = %315
  %341 = load i64, ptr %18, align 8, !tbaa !49
  %342 = add i64 %341, 1
  store i64 %342, ptr %18, align 8, !tbaa !49
  %343 = load i64, ptr %19, align 8, !tbaa !49
  %344 = add i64 %343, 1
  store i64 %344, ptr %19, align 8, !tbaa !49
  br label %300, !llvm.loop !50

345:                                              ; preds = %314
  br label %346

346:                                              ; preds = %345
  %347 = load i32, ptr %15, align 4, !tbaa !21
  %348 = icmp ne i32 %347, 0
  br i1 %348, label %349, label %382

349:                                              ; preds = %346
  br label %350

350:                                              ; preds = %349
  br label %351

351:                                              ; preds = %350
  %352 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %353 = getelementptr inbounds %struct.s2n_debug_info, ptr %352, i32 0, i32 0
  store ptr @.str.3, ptr %353, align 8, !tbaa !18
  %354 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %355 = getelementptr inbounds %struct.s2n_debug_info, ptr %354, i32 0, i32 0
  %356 = load ptr, ptr %355, align 8, !tbaa !18
  %357 = getelementptr inbounds i8, ptr %356, i64 21
  %358 = call ptr @strrchr(ptr noundef %357, i32 noundef 47) #6
  %359 = icmp ne ptr %358, null
  br i1 %359, label %360, label %367

360:                                              ; preds = %351
  %361 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %362 = getelementptr inbounds %struct.s2n_debug_info, ptr %361, i32 0, i32 0
  %363 = load ptr, ptr %362, align 8, !tbaa !18
  %364 = getelementptr inbounds i8, ptr %363, i64 21
  %365 = call ptr @strrchr(ptr noundef %364, i32 noundef 47) #6
  %366 = getelementptr inbounds i8, ptr %365, i64 1
  br label %372

367:                                              ; preds = %351
  %368 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %369 = getelementptr inbounds %struct.s2n_debug_info, ptr %368, i32 0, i32 0
  %370 = load ptr, ptr %369, align 8, !tbaa !18
  %371 = getelementptr inbounds i8, ptr %370, i64 21
  br label %372

372:                                              ; preds = %367, %360
  %373 = phi ptr [ %366, %360 ], [ %371, %367 ]
  %374 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %375 = getelementptr inbounds %struct.s2n_debug_info, ptr %374, i32 0, i32 1
  store ptr %373, ptr %375, align 8, !tbaa !20
  %376 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544350, ptr %376, align 4, !tbaa !21
  %377 = call i32 @s2n_calculate_stacktrace()
  br label %378

378:                                              ; preds = %372
  br label %379

379:                                              ; preds = %378
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %385

380:                                              ; No predecessors!
  br label %381

381:                                              ; preds = %380
  br label %382

382:                                              ; preds = %381, %346
  br label %383

383:                                              ; preds = %382
  br label %384

384:                                              ; preds = %383
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %385

385:                                              ; preds = %384, %379
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %386

386:                                              ; preds = %385, %283
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %387

387:                                              ; preds = %386, %235, %226, %199, %187
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %388

388:                                              ; preds = %387, %167, %154
  call void @llvm.lifetime.end.p0(i64 64, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %389

389:                                              ; preds = %388, %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %390

390:                                              ; preds = %389, %68, %27
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #5
  %391 = load i32, ptr %4, align 4
  ret i32 %391
}

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

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

; 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() #2

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

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

declare zeroext i1 @s2n_constant_time_equals(ptr noundef, ptr noundef, i32 noundef) #2

declare i32 @s2n_hmac_reset(ptr noundef) #2

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

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = { nounwind }
attributes #6 = { 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 0}
!11 = !{!"s2n_hmac_state", !12, i64 0, !13, i64 4, !12, i64 8, !13, i64 12, !7, i64 14, !14, i64 16, !14, i64 72, !14, i64 128, !14, i64 184, !7, i64 240, !7, i64 368}
!12 = !{!"int", !7, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = !{!"s2n_hash_state", !6, i64 0, !12, i64 8, !7, i64 12, !15, i64 16, !7, i64 24}
!15 = !{!"long", !7, i64 0}
!16 = !{!17, !12, i64 8}
!17 = !{!"s2n_blob", !6, i64 0, !12, i64 8, !12, i64 12, !12, i64 16}
!18 = !{!19, !6, i64 0}
!19 = !{!"s2n_debug_info", !6, i64 0, !6, i64 8}
!20 = !{!19, !6, i64 8}
!21 = !{!12, !12, i64 0}
!22 = !{!17, !6, i64 0}
!23 = !{!11, !12, i64 8}
!24 = !{!25, !7, i64 220}
!25 = !{!"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, !26, i64 160, !15, i64 168, !15, 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, !27, i64 240, !6, i64 632, !6, i64 640, !28, i64 648, !34, i64 1144, !37, i64 1688, !6, i64 1752, !7, i64 1760, !12, i64 1764, !7, i64 1768, !39, i64 1776, !39, i64 1816, !39, i64 1856, !39, i64 1896, !12, i64 1936, !15, i64 1944, !7, i64 1952, !39, i64 1960, !7, i64 2000, !7, i64 2001, !7, i64 2002, !33, i64 2003, !40, i64 2004, !40, i64 2008, !41, i64 2016, !13, i64 2208, !12, i64 2212, !13, i64 2216, !15, i64 2224, !7, i64 2232, !15, i64 2240, !15, i64 2248, !15, i64 2256, !40, i64 2264, !40, i64 2268, !7, i64 2272, !7, i64 2528, !12, i64 2784, !17, i64 2792, !12, i64 2816, !17, i64 2824, !17, i64 2848, !17, i64 2872, !43, i64 2896, !45, i64 3704, !6, i64 3760, !6, i64 3768, !7, i64 3776, !12, i64 3780, !17, i64 3784, !12, i64 3808, !47, i64 3816, !7, i64 3848, !39, i64 3992, !17, i64 4032, !17, i64 4056, !33, i64 4080, !33, i64 4081, !33, i64 4082, !13, i64 4084, !13, i64 4086, !12, i64 4088, !12, i64 4092, !17, i64 4096, !12, i64 4120, !48, i64 4128, !40, i64 4176, !7, i64 4180, !7, i64 4181}
!26 = !{!"s2n_timer", !15, i64 0}
!27 = !{!"s2n_secrets", !7, i64 0, !12, i64 388}
!28 = !{!"s2n_kex_parameters", !29, i64 0, !30, i64 8, !7, i64 24, !30, i64 56, !31, i64 72, !31, i64 184, !7, i64 296, !32, i64 360, !17, i64 448, !17, i64 472}
!29 = !{!"s2n_dh_params", !6, i64 0}
!30 = !{!"s2n_ecc_evp_params", !6, i64 0, !6, i64 8}
!31 = !{!"s2n_kem_group_params", !6, i64 0, !32, i64 8, !30, i64 96}
!32 = !{!"s2n_kem_params", !6, i64 0, !17, i64 8, !17, i64 32, !17, i64 56, !33, i64 80}
!33 = !{!"_Bool", !7, i64 0}
!34 = !{!"s2n_handshake_parameters", !35, i64 0, !35, i64 48, !17, i64 96, !12, i64 120, !36, 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}
!35 = !{!"s2n_pkey", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!36 = !{!"s2n_sig_scheme_list", !7, i64 0, !7, i64 256}
!37 = !{!"s2n_psk_parameters", !12, i64 0, !38, i64 8, !13, i64 40, !13, i64 42, !6, i64 48, !12, i64 56}
!38 = !{!"s2n_array", !17, i64 0, !12, i64 24, !12, i64 28}
!39 = !{!"s2n_stuffer", !17, i64 0, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 36, !12, i64 36}
!40 = !{!"", !12, i64 0}
!41 = !{!"s2n_handshake", !39, 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, !42, i64 176, !12, i64 184, !12, i64 184, !12, i64 184, !12, i64 184, !12, i64 188}
!42 = !{!"s2n_offered_early_data", !6, i64 0}
!43 = !{!"s2n_client_hello", !17, i64 0, !44, i64 24, !17, i64 728, !17, i64 752, !17, 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}
!44 = !{!"", !7, i64 0, !17, i64 672, !13, i64 696}
!45 = !{!"s2n_x509_validator", !6, i64 0, !6, i64 8, !7, i64 16, !7, i64 17, !13, i64 18, !6, i64 24, !12, i64 32, !6, i64 40, !46, i64 48, !33, i64 52}
!46 = !{!"s2n_cert_validation_info", !12, i64 0, !12, i64 0}
!47 = !{!"s2n_ticket_fields", !17, i64 0, !12, i64 24}
!48 = !{!"s2n_post_handshake", !39, i64 0, !7, i64 40}
!49 = !{!15, !15, i64 0}
!50 = distinct !{!50, !51}
!51 = !{!"llvm.loop.mustprogress"}


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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @s2n_verify_cbc(ptr nocapture noundef readonly %0, ptr noundef %1, ptr nocapture noundef readonly %2) local_unnamed_addr #0 {
  %4 = alloca i8, align 1
  %5 = alloca [64 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #6
  store i8 0, ptr %4, align 1, !tbaa !5
  %6 = load i32, ptr %1, align 8, !tbaa !8
  %7 = call i32 @s2n_hmac_digest_size(i32 noundef %6, ptr noundef nonnull %4) #6
  %8 = icmp sgt i32 %7, -1
  br i1 %8, label %9, label %132

9:                                                ; preds = %3
  %10 = getelementptr inbounds i8, ptr %2, i64 8
  %11 = load i32, ptr %10, align 8, !tbaa !15
  %12 = load i8, ptr %4, align 1, !tbaa !5
  %13 = zext i8 %12 to i32
  %14 = icmp ugt i32 %11, %13
  br i1 %14, label %23, label %15

15:                                               ; preds = %9
  %16 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str, ptr %16, align 8, !tbaa !17
  %17 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str, i64 21), i32 noundef 47) #7
  %.not = icmp eq ptr %17, null
  %18 = getelementptr inbounds i8, ptr %17, i64 1
  %19 = select i1 %.not, ptr getelementptr inbounds (i8, ptr @.str, i64 21), ptr %18
  %20 = getelementptr inbounds i8, ptr %16, i64 8
  store ptr %19, ptr %20, align 8, !tbaa !19
  %21 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %21, align 4, !tbaa !20
  %22 = call i32 @s2n_calculate_stacktrace() #6
  br label %132

23:                                               ; preds = %9
  %24 = sub i32 %11, %13
  %25 = load ptr, ptr %2, align 8, !tbaa !21
  %26 = add i32 %11, -1
  %27 = zext i32 %26 to i64
  %28 = getelementptr inbounds i8, ptr %25, i64 %27
  %29 = load i8, ptr %28, align 1, !tbaa !5
  %30 = zext i8 %29 to i32
  %31 = xor i32 %30, -1
  %32 = add i32 %24, %31
  %33 = call i32 @llvm.smax.i32(i32 %32, i32 0)
  %34 = call i32 @s2n_hmac_update(ptr noundef nonnull %1, ptr noundef %25, i32 noundef %33) #6
  %35 = icmp sgt i32 %34, -1
  br i1 %35, label %36, label %132

36:                                               ; preds = %23
  %37 = getelementptr inbounds i8, ptr %1, i64 8
  %38 = load i32, ptr %37, align 8, !tbaa !22
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %5) #6
  %39 = load i8, ptr %4, align 1, !tbaa !5
  %40 = icmp ult i8 %39, 65
  br i1 %40, label %41, label %.sink.split

41:                                               ; preds = %36
  %42 = zext nneg i8 %39 to i32
  %43 = call i32 @s2n_hmac_digest_two_compression_rounds(ptr noundef nonnull %1, ptr noundef nonnull %5, i32 noundef %42) #6
  %44 = icmp sgt i32 %43, -1
  br i1 %44, label %45, label %131

45:                                               ; preds = %41
  %46 = load ptr, ptr %2, align 8, !tbaa !21
  %47 = zext nneg i32 %33 to i64
  %48 = getelementptr inbounds i8, ptr %46, i64 %47
  %49 = load i8, ptr %4, align 1, !tbaa !5
  %50 = zext i8 %49 to i32
  %51 = call zeroext i1 @s2n_constant_time_equals(ptr noundef %48, ptr noundef nonnull %5, i32 noundef %50) #6
  %52 = xor i1 %51, true
  %.neg = sext i1 %52 to i32
  %53 = zext i1 %52 to i32
  %54 = call i32 @s2n_hmac_reset(ptr noundef nonnull %1) #6
  %55 = icmp sgt i32 %54, -1
  br i1 %55, label %56, label %131

56:                                               ; preds = %45
  %57 = load ptr, ptr %2, align 8, !tbaa !21
  %58 = call i32 @s2n_hmac_update(ptr noundef nonnull %1, ptr noundef %57, i32 noundef %38) #6
  %59 = icmp sgt i32 %58, -1
  br i1 %59, label %60, label %131

60:                                               ; preds = %56
  %61 = load ptr, ptr %2, align 8, !tbaa !21
  %62 = getelementptr inbounds i8, ptr %61, i64 %47
  %63 = load i8, ptr %4, align 1, !tbaa !5
  %64 = zext i8 %63 to i32
  %65 = zext i8 %63 to i64
  %66 = getelementptr inbounds i8, ptr %62, i64 %65
  %67 = load i32, ptr %10, align 8, !tbaa !15
  %68 = add nuw i32 %33, %64
  %69 = xor i32 %68, -1
  %70 = add i32 %67, %69
  %71 = call i32 @s2n_hmac_update(ptr noundef nonnull %1, ptr noundef %66, i32 noundef %70) #6
  %72 = icmp sgt i32 %71, -1
  br i1 %72, label %73, label %131

73:                                               ; preds = %60
  %74 = getelementptr inbounds i8, ptr %0, i64 220
  %75 = load i8, ptr %74, align 4, !tbaa !23
  %76 = icmp eq i8 %75, 30
  br i1 %76, label %131, label %77

77:                                               ; preds = %73
  %78 = call i32 @llvm.smin.i32(i32 %24, i32 256)
  %79 = add nsw i32 %78, -1
  %.not61 = icmp ult i32 %79, %30
  br i1 %.not61, label %.sink.split, label %80

80:                                               ; preds = %77
  %81 = load i32, ptr %10, align 8, !tbaa !15
  %82 = sub i32 %81, %78
  %83 = zext i32 %79 to i64
  %84 = zext i32 %81 to i64
  %85 = icmp ne i32 %79, 0
  %86 = icmp ult i32 %82, %81
  %or.cond67 = select i1 %85, i1 %86, i1 false
  br i1 %or.cond67, label %.lr.ph, label %.critedge

.lr.ph:                                           ; preds = %80
  %87 = zext i32 %82 to i64
  %88 = sub i32 %79, %30
  %89 = zext i32 %88 to i64
  %90 = load ptr, ptr %2, align 8, !tbaa !21
  %91 = xor i64 %87, -1
  %92 = add nsw i64 %91, %84
  %93 = freeze i64 %92
  %94 = add nsw i64 %83, -1
  %umin = call i64 @llvm.umin.i64(i64 %93, i64 %94)
  %95 = add nsw i64 %umin, 1
  %min.iters.check = icmp ult i64 %95, 8
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph
  %.04970.ph = phi i64 [ %87, %.lr.ph ], [ %ind.end, %middle.block ]
  %.05069.ph = phi i64 [ 0, %.lr.ph ], [ %n.vec, %middle.block ]
  %.05168.ph = phi i32 [ %53, %.lr.ph ], [ %111, %middle.block ]
  br label %scalar.ph

vector.ph:                                        ; preds = %.lr.ph
  %n.vec = and i64 %95, -8
  %ind.end = add i64 %n.vec, %87
  %96 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %53, i64 0
  %broadcast.splatinsert = insertelement <4 x i64> poison, i64 %89, i64 0
  %broadcast.splat = shufflevector <4 x i64> %broadcast.splatinsert, <4 x i64> poison, <4 x i32> zeroinitializer
  %broadcast.splatinsert85 = insertelement <4 x i8> poison, i8 %29, i64 0
  %broadcast.splat86 = shufflevector <4 x i8> %broadcast.splatinsert85, <4 x i8> poison, <4 x i32> zeroinitializer
  %invariant.gep = getelementptr i8, ptr %90, i64 %87
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <4 x i64> [ <i64 0, i64 1, i64 2, i64 3>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ %96, %vector.ph ], [ %108, %vector.body ]
  %vec.phi83 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %109, %vector.body ]
  %step.add = add <4 x i64> %vec.ind, <i64 4, i64 4, i64 4, i64 4>
  %97 = icmp ult <4 x i64> %vec.ind, %broadcast.splat
  %98 = icmp ult <4 x i64> %step.add, %broadcast.splat
  %gep = getelementptr i8, ptr %invariant.gep, i64 %index
  %99 = getelementptr inbounds i8, ptr %gep, i64 4
  %wide.load = load <4 x i8>, ptr %gep, align 1, !tbaa !5
  %wide.load84 = load <4 x i8>, ptr %99, align 1, !tbaa !5
  %100 = xor <4 x i8> %wide.load, %broadcast.splat86
  %101 = xor <4 x i8> %wide.load84, %broadcast.splat86
  %102 = zext <4 x i8> %100 to <4 x i32>
  %103 = zext <4 x i8> %101 to <4 x i32>
  %104 = select <4 x i1> %97, <4 x i32> zeroinitializer, <4 x i32> <i32 255, i32 255, i32 255, i32 255>
  %105 = select <4 x i1> %98, <4 x i32> zeroinitializer, <4 x i32> <i32 255, i32 255, i32 255, i32 255>
  %106 = and <4 x i32> %104, %102
  %107 = and <4 x i32> %105, %103
  %108 = or <4 x i32> %106, %vec.phi
  %109 = or <4 x i32> %107, %vec.phi83
  %index.next = add nuw i64 %index, 8
  %vec.ind.next = add <4 x i64> %vec.ind, <i64 8, i64 8, i64 8, i64 8>
  %110 = icmp eq i64 %index.next, %n.vec
  br i1 %110, label %middle.block, label %vector.body, !llvm.loop !48

middle.block:                                     ; preds = %vector.body
  %bin.rdx = or <4 x i32> %109, %108
  %111 = call i32 @llvm.vector.reduce.or.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %95, %n.vec
  br i1 %cmp.n, label %.critedge.loopexit, label %scalar.ph.preheader

.critedge.loopexit:                               ; preds = %scalar.ph, %middle.block
  %.lcssa = phi i32 [ %111, %middle.block ], [ %119, %scalar.ph ]
  %112 = icmp eq i32 %.lcssa, 0
  br i1 %112, label %131, label %.sink.split

.critedge:                                        ; preds = %80
  br i1 %51, label %131, label %.sink.split

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %.04970 = phi i64 [ %121, %scalar.ph ], [ %.04970.ph, %scalar.ph.preheader ]
  %.05069 = phi i64 [ %120, %scalar.ph ], [ %.05069.ph, %scalar.ph.preheader ]
  %.05168 = phi i32 [ %119, %scalar.ph ], [ %.05168.ph, %scalar.ph.preheader ]
  %.not65.not = icmp ult i64 %.05069, %89
  %113 = getelementptr inbounds i8, ptr %90, i64 %.04970
  %114 = load i8, ptr %113, align 1, !tbaa !5
  %115 = xor i8 %114, %29
  %116 = zext i8 %115 to i32
  %117 = select i1 %.not65.not, i32 0, i32 255
  %118 = and i32 %117, %116
  %119 = or i32 %118, %.05168
  %120 = add nuw nsw i64 %.05069, 1
  %121 = add nuw nsw i64 %.04970, 1
  %122 = icmp ult i64 %120, %83
  %123 = icmp ult i64 %121, %84
  %or.cond = select i1 %122, i1 %123, i1 false
  br i1 %or.cond, label %scalar.ph, label %.critedge.loopexit, !llvm.loop !52

.sink.split:                                      ; preds = %.critedge, %.critedge.loopexit, %77, %36
  %.str.3.sink = phi ptr [ @.str.1, %36 ], [ @.str.2, %77 ], [ @.str.3, %.critedge.loopexit ], [ @.str.3, %.critedge ]
  %.sink79 = phi ptr [ getelementptr inbounds (i8, ptr @.str.1, i64 21), %36 ], [ getelementptr inbounds (i8, ptr @.str.2, i64 21), %77 ], [ getelementptr inbounds (i8, ptr @.str.3, i64 21), %.critedge.loopexit ], [ getelementptr inbounds (i8, ptr @.str.3, i64 21), %.critedge ]
  %.sink = phi i32 [ 402653194, %36 ], [ 402653194, %77 ], [ 335544350, %.critedge.loopexit ], [ 335544350, %.critedge ]
  %124 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr %.str.3.sink, ptr %124, align 8, !tbaa !17
  %125 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) %.sink79, i32 noundef 47) #7
  %.not64 = icmp eq ptr %125, null
  %126 = getelementptr inbounds i8, ptr %125, i64 1
  %127 = select i1 %.not64, ptr %.sink79, ptr %126
  %128 = getelementptr inbounds i8, ptr %124, i64 8
  store ptr %127, ptr %128, align 8, !tbaa !19
  %129 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 %.sink, ptr %129, align 4, !tbaa !20
  %130 = call i32 @s2n_calculate_stacktrace() #6
  br label %131

131:                                              ; preds = %.sink.split, %.critedge.loopexit, %45, %56, %60, %73, %.critedge, %41
  %.3 = phi i32 [ -1, %41 ], [ -1, %45 ], [ -1, %56 ], [ -1, %60 ], [ %.neg, %73 ], [ 0, %.critedge ], [ 0, %.critedge.loopexit ], [ -1, %.sink.split ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %5) #6
  br label %132

132:                                              ; preds = %131, %23, %3, %15
  %.5 = phi i32 [ -1, %15 ], [ -1, %3 ], [ %.3, %131 ], [ -1, %23 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  ret i32 %.5
}

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

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

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

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

declare i32 @s2n_calculate_stacktrace() local_unnamed_addr #2

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

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

declare zeroext i1 @s2n_constant_time_equals(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @s2n_hmac_reset(ptr noundef) local_unnamed_addr #2

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #5

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.vector.reduce.or.v4i32(<4 x i32>) #5

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 speculatable willreturn memory(none) }
attributes #4 = { 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !10, i64 0}
!9 = !{!"s2n_hmac_state", !10, i64 0, !11, i64 4, !10, i64 8, !11, i64 12, !6, i64 14, !12, i64 16, !12, i64 72, !12, i64 128, !12, i64 184, !6, i64 240, !6, i64 368}
!10 = !{!"int", !6, i64 0}
!11 = !{!"short", !6, i64 0}
!12 = !{!"s2n_hash_state", !13, i64 0, !10, i64 8, !6, i64 12, !14, i64 16, !6, i64 24}
!13 = !{!"any pointer", !6, i64 0}
!14 = !{!"long", !6, i64 0}
!15 = !{!16, !10, i64 8}
!16 = !{!"s2n_blob", !13, i64 0, !10, i64 8, !10, i64 12, !10, i64 16}
!17 = !{!18, !13, i64 0}
!18 = !{!"s2n_debug_info", !13, i64 0, !13, i64 8}
!19 = !{!18, !13, i64 8}
!20 = !{!10, !10, i64 0}
!21 = !{!16, !13, i64 0}
!22 = !{!9, !10, i64 8}
!23 = !{!24, !6, i64 220}
!24 = !{!"s2n_connection", !10, i64 0, !10, i64 0, !10, i64 0, !10, i64 0, !10, i64 0, !10, i64 0, !10, i64 0, !10, i64 0, !10, i64 1, !10, i64 1, !10, i64 1, !10, i64 1, !10, i64 1, !10, i64 1, !10, i64 1, !10, i64 1, !10, i64 2, !10, i64 2, !10, i64 2, !10, i64 2, !10, i64 2, !10, i64 2, !10, i64 2, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !13, i64 72, !6, i64 80, !6, i64 102, !6, i64 124, !10, i64 148, !10, i64 152, !25, i64 160, !14, i64 168, !14, 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, !13, i64 224, !13, i64 232, !26, i64 240, !13, i64 632, !13, i64 640, !27, i64 648, !33, i64 1144, !36, i64 1688, !13, i64 1752, !6, i64 1760, !10, i64 1764, !6, i64 1768, !38, i64 1776, !38, i64 1816, !38, i64 1856, !38, i64 1896, !10, i64 1936, !14, i64 1944, !6, i64 1952, !38, i64 1960, !6, i64 2000, !6, i64 2001, !6, i64 2002, !32, i64 2003, !39, i64 2004, !39, i64 2008, !40, i64 2016, !11, i64 2208, !10, i64 2212, !11, i64 2216, !14, i64 2224, !6, i64 2232, !14, i64 2240, !14, i64 2248, !14, i64 2256, !39, i64 2264, !39, i64 2268, !6, i64 2272, !6, i64 2528, !10, i64 2784, !16, i64 2792, !10, i64 2816, !16, i64 2824, !16, i64 2848, !16, i64 2872, !42, i64 2896, !44, i64 3704, !13, i64 3760, !13, i64 3768, !6, i64 3776, !10, i64 3780, !16, i64 3784, !10, i64 3808, !46, i64 3816, !6, i64 3848, !38, i64 3992, !16, i64 4032, !16, i64 4056, !32, i64 4080, !32, i64 4081, !32, i64 4082, !11, i64 4084, !11, i64 4086, !10, i64 4088, !10, i64 4092, !16, i64 4096, !10, i64 4120, !47, i64 4128, !39, i64 4176, !6, i64 4180, !6, i64 4181}
!25 = !{!"s2n_timer", !14, i64 0}
!26 = !{!"s2n_secrets", !6, i64 0, !10, i64 388}
!27 = !{!"s2n_kex_parameters", !28, i64 0, !29, i64 8, !6, i64 24, !29, i64 56, !30, i64 72, !30, i64 184, !6, i64 296, !31, i64 360, !16, i64 448, !16, i64 472}
!28 = !{!"s2n_dh_params", !13, i64 0}
!29 = !{!"s2n_ecc_evp_params", !13, i64 0, !13, i64 8}
!30 = !{!"s2n_kem_group_params", !13, i64 0, !31, i64 8, !29, i64 96}
!31 = !{!"s2n_kem_params", !13, i64 0, !16, i64 8, !16, i64 32, !16, i64 56, !32, i64 80}
!32 = !{!"_Bool", !6, i64 0}
!33 = !{!"s2n_handshake_parameters", !34, i64 0, !34, i64 48, !16, i64 96, !10, i64 120, !35, i64 124, !13, i64 384, !13, i64 392, !13, i64 400, !6, i64 408, !6, i64 440, !6, i64 472, !6, i64 473, !6, i64 474, !6, i64 506}
!34 = !{!"s2n_pkey", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40}
!35 = !{!"s2n_sig_scheme_list", !6, i64 0, !6, i64 256}
!36 = !{!"s2n_psk_parameters", !10, i64 0, !37, i64 8, !11, i64 40, !11, i64 42, !13, i64 48, !10, i64 56}
!37 = !{!"s2n_array", !16, i64 0, !10, i64 24, !10, i64 28}
!38 = !{!"s2n_stuffer", !16, i64 0, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 36, !10, i64 36}
!39 = !{!"", !10, i64 0}
!40 = !{!"s2n_handshake", !38, i64 0, !13, i64 40, !6, i64 48, !6, i64 56, !6, i64 104, !6, i64 152, !10, i64 156, !10, i64 160, !10, i64 164, !10, i64 168, !41, i64 176, !10, i64 184, !10, i64 184, !10, i64 184, !10, i64 184, !10, i64 188}
!41 = !{!"s2n_offered_early_data", !13, i64 0}
!42 = !{!"s2n_client_hello", !16, i64 0, !43, i64 24, !16, i64 728, !16, i64 752, !16, i64 776, !6, i64 800, !6, i64 801, !10, i64 802, !10, i64 802, !10, i64 802, !10, i64 802, !10, i64 802, !10, i64 802, !10, i64 802}
!43 = !{!"", !6, i64 0, !16, i64 672, !11, i64 696}
!44 = !{!"s2n_x509_validator", !13, i64 0, !13, i64 8, !6, i64 16, !6, i64 17, !11, i64 18, !13, i64 24, !10, i64 32, !13, i64 40, !45, i64 48, !32, i64 52}
!45 = !{!"s2n_cert_validation_info", !10, i64 0, !10, i64 0}
!46 = !{!"s2n_ticket_fields", !16, i64 0, !10, i64 24}
!47 = !{!"s2n_post_handshake", !38, i64 0, !6, i64 40}
!48 = distinct !{!48, !49, !50, !51}
!49 = !{!"llvm.loop.mustprogress"}
!50 = !{!"llvm.loop.isvectorized", i32 1}
!51 = !{!"llvm.loop.unroll.runtime.disable"}
!52 = distinct !{!52, !49, !51, !50}


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