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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

@initialized = external hidden global 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
@s2n_mem_malloc_cb = external hidden global ptr, align 8
@.str.11 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [86 x i8], align 1

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

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

declare i32 @s2n_calculate_stacktrace() #2

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

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

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

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

11:                                               ; preds = %2
  %12 = load i8, ptr @initialized, align 1, !tbaa !11, !range !13, !noundef !14
  %13 = trunc i8 %12 to i1
  br i1 %13, label %45, label %14

14:                                               ; preds = %11
  br label %15

15:                                               ; preds = %14
  br label %16

16:                                               ; preds = %15
  %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
  store ptr @.str.11, ptr %18, align 8, !tbaa !15
  %19 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %20 = getelementptr inbounds %struct.s2n_debug_info, ptr %19, i32 0, i32 0
  %21 = load ptr, ptr %20, align 8, !tbaa !15
  %22 = getelementptr inbounds i8, ptr %21, i64 21
  %23 = call ptr @strrchr(ptr noundef %22, i32 noundef 47) #8
  %24 = icmp ne ptr %23, null
  br i1 %24, label %25, label %32

25:                                               ; preds = %16
  %26 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %27 = getelementptr inbounds %struct.s2n_debug_info, ptr %26, i32 0, i32 0
  %28 = load ptr, ptr %27, align 8, !tbaa !15
  %29 = getelementptr inbounds i8, ptr %28, i64 21
  %30 = call ptr @strrchr(ptr noundef %29, i32 noundef 47) #8
  %31 = getelementptr inbounds i8, ptr %30, i64 1
  br label %37

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

37:                                               ; preds = %32, %25
  %38 = phi ptr [ %31, %25 ], [ %36, %32 ]
  %39 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %40 = getelementptr inbounds %struct.s2n_debug_info, ptr %39, i32 0, i32 1
  store ptr %38, ptr %40, align 8, !tbaa !17
  %41 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653196, ptr %41, align 4, !tbaa !9
  %42 = call i32 @s2n_calculate_stacktrace()
  br label %43

43:                                               ; preds = %37
  store i32 -1, ptr %3, align 4
  br label %359

44:                                               ; No predecessors!
  br label %45

45:                                               ; preds = %44, %11
  br label %46

46:                                               ; preds = %45
  br label %47

47:                                               ; preds = %46
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = icmp ne ptr %48, null
  br i1 %49, label %81, label %50

50:                                               ; preds = %47
  br label %51

51:                                               ; preds = %50
  br label %52

52:                                               ; preds = %51
  %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
  store ptr @.str.12, ptr %54, align 8, !tbaa !15
  %55 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %56 = getelementptr inbounds %struct.s2n_debug_info, ptr %55, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !15
  %58 = getelementptr inbounds i8, ptr %57, i64 21
  %59 = call ptr @strrchr(ptr noundef %58, i32 noundef 47) #8
  %60 = icmp ne ptr %59, null
  br i1 %60, label %61, label %68

61:                                               ; preds = %52
  %62 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %63 = getelementptr inbounds %struct.s2n_debug_info, ptr %62, i32 0, i32 0
  %64 = load ptr, ptr %63, align 8, !tbaa !15
  %65 = getelementptr inbounds i8, ptr %64, i64 21
  %66 = call ptr @strrchr(ptr noundef %65, i32 noundef 47) #8
  %67 = getelementptr inbounds i8, ptr %66, i64 1
  br label %73

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

73:                                               ; preds = %68, %61
  %74 = phi ptr [ %67, %61 ], [ %72, %68 ]
  %75 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %76 = getelementptr inbounds %struct.s2n_debug_info, ptr %75, i32 0, i32 1
  store ptr %74, ptr %76, align 8, !tbaa !17
  %77 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %77, align 4, !tbaa !9
  %78 = call i32 @s2n_calculate_stacktrace()
  br label %79

79:                                               ; preds = %73
  store i32 -1, ptr %3, align 4
  br label %359

80:                                               ; No predecessors!
  br label %81

81:                                               ; preds = %80, %47
  br label %82

82:                                               ; preds = %81
  br label %83

83:                                               ; preds = %82
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = call zeroext i1 @s2n_blob_is_growable(ptr noundef %84)
  br i1 %85, label %117, label %86

86:                                               ; preds = %83
  br label %87

87:                                               ; preds = %86
  br label %88

88:                                               ; preds = %87
  %89 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %90 = getelementptr inbounds %struct.s2n_debug_info, ptr %89, i32 0, i32 0
  store ptr @.str.13, ptr %90, align 8, !tbaa !15
  %91 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %92 = getelementptr inbounds %struct.s2n_debug_info, ptr %91, i32 0, i32 0
  %93 = load ptr, ptr %92, align 8, !tbaa !15
  %94 = getelementptr inbounds i8, ptr %93, i64 21
  %95 = call ptr @strrchr(ptr noundef %94, i32 noundef 47) #8
  %96 = icmp ne ptr %95, null
  br i1 %96, label %97, label %104

97:                                               ; preds = %88
  %98 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %99 = getelementptr inbounds %struct.s2n_debug_info, ptr %98, i32 0, i32 0
  %100 = load ptr, ptr %99, align 8, !tbaa !15
  %101 = getelementptr inbounds i8, ptr %100, i64 21
  %102 = call ptr @strrchr(ptr noundef %101, i32 noundef 47) #8
  %103 = getelementptr inbounds i8, ptr %102, i64 1
  br label %109

104:                                              ; preds = %88
  %105 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %106 = getelementptr inbounds %struct.s2n_debug_info, ptr %105, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8, !tbaa !15
  %108 = getelementptr inbounds i8, ptr %107, i64 21
  br label %109

109:                                              ; preds = %104, %97
  %110 = phi ptr [ %103, %97 ], [ %108, %104 ]
  %111 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %112 = getelementptr inbounds %struct.s2n_debug_info, ptr %111, i32 0, i32 1
  store ptr %110, ptr %112, align 8, !tbaa !17
  %113 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653254, ptr %113, align 4, !tbaa !9
  %114 = call i32 @s2n_calculate_stacktrace()
  br label %115

115:                                              ; preds = %109
  store i32 -1, ptr %3, align 4
  br label %359

116:                                              ; No predecessors!
  br label %117

117:                                              ; preds = %116, %83
  br label %118

118:                                              ; preds = %117
  %119 = load i32, ptr %5, align 4, !tbaa !9
  %120 = icmp eq i32 %119, 0
  br i1 %120, label %121, label %124

121:                                              ; preds = %118
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = call i32 @s2n_free(ptr noundef %122)
  store i32 %123, ptr %3, align 4
  br label %359

124:                                              ; preds = %118
  %125 = load i32, ptr %5, align 4, !tbaa !9
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.s2n_blob, ptr %126, i32 0, i32 2
  %128 = load i32, ptr %127, align 4, !tbaa !18
  %129 = icmp ule i32 %125, %128
  br i1 %129, label %130, label %165

130:                                              ; preds = %124
  %131 = load i32, ptr %5, align 4, !tbaa !9
  %132 = load ptr, ptr %4, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.s2n_blob, ptr %132, i32 0, i32 1
  %134 = load i32, ptr %133, align 8, !tbaa !20
  %135 = icmp ult i32 %131, %134
  br i1 %135, label %136, label %161

136:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #9
  call void @llvm.memset.p0.i64(ptr align 8 %6, i8 0, i64 24, i1 false)
  br label %137

137:                                              ; preds = %136
  %138 = load ptr, ptr %4, align 8, !tbaa !5
  %139 = load i32, ptr %5, align 4, !tbaa !9
  %140 = load ptr, ptr %4, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.s2n_blob, ptr %140, i32 0, i32 1
  %142 = load i32, ptr %141, align 8, !tbaa !20
  %143 = load i32, ptr %5, align 4, !tbaa !9
  %144 = sub i32 %142, %143
  %145 = call i32 @s2n_blob_slice(ptr noundef %138, ptr noundef %6, i32 noundef %139, i32 noundef %144)
  %146 = icmp sgt i32 %145, -1
  br i1 %146, label %148, label %147

147:                                              ; preds = %137
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %158

148:                                              ; preds = %137
  br label %149

149:                                              ; preds = %148
  br label %150

150:                                              ; preds = %149
  br label %151

151:                                              ; preds = %150
  %152 = call i32 @s2n_blob_zero(ptr noundef %6)
  %153 = icmp sgt i32 %152, -1
  br i1 %153, label %155, label %154

154:                                              ; preds = %151
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %158

155:                                              ; preds = %151
  br label %156

156:                                              ; preds = %155
  br label %157

157:                                              ; preds = %156
  store i32 0, ptr %7, align 4
  br label %158

158:                                              ; preds = %157, %154, %147
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #9
  %159 = load i32, ptr %7, align 4
  switch i32 %159, label %361 [
    i32 0, label %160
    i32 1, label %359
  ]

160:                                              ; preds = %158
  br label %161

161:                                              ; preds = %160, %130
  %162 = load i32, ptr %5, align 4, !tbaa !9
  %163 = load ptr, ptr %4, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.s2n_blob, ptr %163, i32 0, i32 1
  store i32 %162, ptr %164, align 8, !tbaa !20
  store i32 0, ptr %3, align 4
  br label %359

165:                                              ; preds = %124
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #9
  %166 = getelementptr inbounds %struct.s2n_blob, ptr %8, i32 0, i32 0
  store ptr null, ptr %166, align 8, !tbaa !21
  %167 = getelementptr inbounds %struct.s2n_blob, ptr %8, i32 0, i32 1
  %168 = load i32, ptr %5, align 4, !tbaa !9
  store i32 %168, ptr %167, align 8, !tbaa !20
  %169 = getelementptr inbounds %struct.s2n_blob, ptr %8, i32 0, i32 2
  store i32 0, ptr %169, align 4, !tbaa !18
  %170 = getelementptr inbounds %struct.s2n_blob, ptr %8, i32 0, i32 3
  %171 = load i8, ptr %170, align 8
  %172 = and i8 %171, -2
  %173 = or i8 %172, 1
  store i8 %173, ptr %170, align 8
  %174 = load ptr, ptr @s2n_mem_malloc_cb, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.s2n_blob, ptr %8, i32 0, i32 0
  %176 = getelementptr inbounds %struct.s2n_blob, ptr %8, i32 0, i32 1
  %177 = load i32, ptr %176, align 8, !tbaa !20
  %178 = getelementptr inbounds %struct.s2n_blob, ptr %8, i32 0, i32 2
  %179 = call i32 %174(ptr noundef %175, i32 noundef %177, ptr noundef %178)
  %180 = icmp ne i32 %179, 0
  br i1 %180, label %181, label %185

181:                                              ; preds = %165
  br label %182

182:                                              ; preds = %181
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %358

183:                                              ; No predecessors!
  br label %184

184:                                              ; preds = %183
  br label %185

185:                                              ; preds = %184, %165
  br label %186

186:                                              ; preds = %185
  %187 = getelementptr inbounds %struct.s2n_blob, ptr %8, i32 0, i32 2
  %188 = load i32, ptr %187, align 4, !tbaa !18
  %189 = getelementptr inbounds %struct.s2n_blob, ptr %8, i32 0, i32 1
  %190 = load i32, ptr %189, align 8, !tbaa !20
  %191 = icmp uge i32 %188, %190
  br i1 %191, label %225, label %192

192:                                              ; preds = %186
  br label %193

193:                                              ; preds = %192
  br label %194

194:                                              ; preds = %193
  %195 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %196 = getelementptr inbounds %struct.s2n_debug_info, ptr %195, i32 0, i32 0
  store ptr @.str.14, ptr %196, align 8, !tbaa !15
  %197 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %198 = getelementptr inbounds %struct.s2n_debug_info, ptr %197, i32 0, i32 0
  %199 = load ptr, ptr %198, align 8, !tbaa !15
  %200 = getelementptr inbounds i8, ptr %199, i64 21
  %201 = call ptr @strrchr(ptr noundef %200, i32 noundef 47) #8
  %202 = icmp ne ptr %201, null
  br i1 %202, label %203, label %210

203:                                              ; preds = %194
  %204 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %205 = getelementptr inbounds %struct.s2n_debug_info, ptr %204, i32 0, i32 0
  %206 = load ptr, ptr %205, align 8, !tbaa !15
  %207 = getelementptr inbounds i8, ptr %206, i64 21
  %208 = call ptr @strrchr(ptr noundef %207, i32 noundef 47) #8
  %209 = getelementptr inbounds i8, ptr %208, i64 1
  br label %215

210:                                              ; preds = %194
  %211 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %212 = getelementptr inbounds %struct.s2n_debug_info, ptr %211, i32 0, i32 0
  %213 = load ptr, ptr %212, align 8, !tbaa !15
  %214 = getelementptr inbounds i8, ptr %213, i64 21
  br label %215

215:                                              ; preds = %210, %203
  %216 = phi ptr [ %209, %203 ], [ %214, %210 ]
  %217 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %218 = getelementptr inbounds %struct.s2n_debug_info, ptr %217, i32 0, i32 1
  store ptr %216, ptr %218, align 8, !tbaa !17
  %219 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653185, ptr %219, align 4, !tbaa !9
  %220 = call i32 @s2n_calculate_stacktrace()
  br label %221

221:                                              ; preds = %215
  br label %222

222:                                              ; preds = %221
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %358

223:                                              ; No predecessors!
  br label %224

224:                                              ; preds = %223
  br label %225

225:                                              ; preds = %224, %186
  br label %226

226:                                              ; preds = %225
  br label %227

227:                                              ; preds = %226
  br label %228

228:                                              ; preds = %227
  %229 = getelementptr inbounds %struct.s2n_blob, ptr %8, i32 0, i32 0
  %230 = load ptr, ptr %229, align 8, !tbaa !21
  %231 = icmp ne ptr %230, null
  br i1 %231, label %265, label %232

232:                                              ; preds = %228
  br label %233

233:                                              ; preds = %232
  br label %234

234:                                              ; preds = %233
  %235 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %236 = getelementptr inbounds %struct.s2n_debug_info, ptr %235, i32 0, i32 0
  store ptr @.str.15, ptr %236, align 8, !tbaa !15
  %237 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %238 = getelementptr inbounds %struct.s2n_debug_info, ptr %237, i32 0, i32 0
  %239 = load ptr, ptr %238, align 8, !tbaa !15
  %240 = getelementptr inbounds i8, ptr %239, i64 21
  %241 = call ptr @strrchr(ptr noundef %240, i32 noundef 47) #8
  %242 = icmp ne ptr %241, null
  br i1 %242, label %243, label %250

243:                                              ; preds = %234
  %244 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %245 = getelementptr inbounds %struct.s2n_debug_info, ptr %244, i32 0, i32 0
  %246 = load ptr, ptr %245, align 8, !tbaa !15
  %247 = getelementptr inbounds i8, ptr %246, i64 21
  %248 = call ptr @strrchr(ptr noundef %247, i32 noundef 47) #8
  %249 = getelementptr inbounds i8, ptr %248, i64 1
  br label %255

250:                                              ; preds = %234
  %251 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %252 = getelementptr inbounds %struct.s2n_debug_info, ptr %251, i32 0, i32 0
  %253 = load ptr, ptr %252, align 8, !tbaa !15
  %254 = getelementptr inbounds i8, ptr %253, i64 21
  br label %255

255:                                              ; preds = %250, %243
  %256 = phi ptr [ %249, %243 ], [ %254, %250 ]
  %257 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %258 = getelementptr inbounds %struct.s2n_debug_info, ptr %257, i32 0, i32 1
  store ptr %256, ptr %258, align 8, !tbaa !17
  %259 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653185, ptr %259, align 4, !tbaa !9
  %260 = call i32 @s2n_calculate_stacktrace()
  br label %261

261:                                              ; preds = %255
  br label %262

262:                                              ; preds = %261
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %358

263:                                              ; No predecessors!
  br label %264

264:                                              ; preds = %263
  br label %265

265:                                              ; preds = %264, %228
  br label %266

266:                                              ; preds = %265
  br label %267

267:                                              ; preds = %266
  %268 = load ptr, ptr %4, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.s2n_blob, ptr %268, i32 0, i32 1
  %270 = load i32, ptr %269, align 8, !tbaa !20
  %271 = icmp ne i32 %270, 0
  br i1 %271, label %272, label %342

272:                                              ; preds = %267
  br label %273

273:                                              ; preds = %272
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #9
  %274 = load ptr, ptr %4, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.s2n_blob, ptr %274, i32 0, i32 1
  %276 = load i32, ptr %275, align 8, !tbaa !20
  store i32 %276, ptr %9, align 4, !tbaa !9
  %277 = load i32, ptr %9, align 4, !tbaa !9
  %278 = icmp ne i32 %277, 0
  %279 = xor i1 %278, true
  %280 = xor i1 %279, true
  %281 = zext i1 %280 to i32
  %282 = sext i32 %281 to i64
  %283 = call i64 @llvm.expect.i64(i64 %282, i64 1)
  %284 = icmp ne i64 %283, 0
  br i1 %284, label %285, label %336

285:                                              ; preds = %273
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  %286 = getelementptr inbounds %struct.s2n_blob, ptr %8, i32 0, i32 0
  %287 = load ptr, ptr %286, align 8, !tbaa !21
  %288 = load ptr, ptr %4, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct.s2n_blob, ptr %288, i32 0, i32 0
  %290 = load ptr, ptr %289, align 8, !tbaa !21
  %291 = load i32, ptr %9, align 4, !tbaa !9
  %292 = zext i32 %291 to i64
  %293 = call ptr @s2n_ensure_memmove_trace(ptr noundef %287, ptr noundef %290, i64 noundef %292)
  store ptr %293, ptr %10, align 8, !tbaa !5
  br label %294

294:                                              ; preds = %285
  %295 = load ptr, ptr %10, align 8, !tbaa !5
  %296 = icmp ne ptr %295, null
  br i1 %296, label %330, label %297

297:                                              ; preds = %294
  br label %298

298:                                              ; preds = %297
  br label %299

299:                                              ; preds = %298
  %300 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %301 = getelementptr inbounds %struct.s2n_debug_info, ptr %300, i32 0, i32 0
  store ptr @.str.16, ptr %301, align 8, !tbaa !15
  %302 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %303 = getelementptr inbounds %struct.s2n_debug_info, ptr %302, i32 0, i32 0
  %304 = load ptr, ptr %303, align 8, !tbaa !15
  %305 = getelementptr inbounds i8, ptr %304, i64 21
  %306 = call ptr @strrchr(ptr noundef %305, i32 noundef 47) #8
  %307 = icmp ne ptr %306, null
  br i1 %307, label %308, label %315

308:                                              ; preds = %299
  %309 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %310 = getelementptr inbounds %struct.s2n_debug_info, ptr %309, i32 0, i32 0
  %311 = load ptr, ptr %310, align 8, !tbaa !15
  %312 = getelementptr inbounds i8, ptr %311, i64 21
  %313 = call ptr @strrchr(ptr noundef %312, i32 noundef 47) #8
  %314 = getelementptr inbounds i8, ptr %313, i64 1
  br label %320

315:                                              ; preds = %299
  %316 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %317 = getelementptr inbounds %struct.s2n_debug_info, ptr %316, i32 0, i32 0
  %318 = load ptr, ptr %317, align 8, !tbaa !15
  %319 = getelementptr inbounds i8, ptr %318, i64 21
  br label %320

320:                                              ; preds = %315, %308
  %321 = phi ptr [ %314, %308 ], [ %319, %315 ]
  %322 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %323 = getelementptr inbounds %struct.s2n_debug_info, ptr %322, i32 0, i32 1
  store ptr %321, ptr %323, align 8, !tbaa !17
  %324 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %324, align 4, !tbaa !9
  %325 = call i32 @s2n_calculate_stacktrace()
  br label %326

326:                                              ; preds = %320
  br label %327

327:                                              ; preds = %326
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %333

328:                                              ; No predecessors!
  br label %329

329:                                              ; preds = %328
  br label %330

330:                                              ; preds = %329, %294
  br label %331

331:                                              ; preds = %330
  br label %332

332:                                              ; preds = %331
  store i32 0, ptr %7, align 4
  br label %333

333:                                              ; preds = %332, %327
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  %334 = load i32, ptr %7, align 4
  switch i32 %334, label %337 [
    i32 0, label %335
  ]

335:                                              ; preds = %333
  br label %336

336:                                              ; preds = %335, %273
  store i32 0, ptr %7, align 4
  br label %337

337:                                              ; preds = %336, %333
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #9
  %338 = load i32, ptr %7, align 4
  switch i32 %338, label %358 [
    i32 0, label %339
  ]

339:                                              ; preds = %337
  br label %340

340:                                              ; preds = %339
  br label %341

341:                                              ; preds = %340
  br label %342

342:                                              ; preds = %341, %267
  %343 = load ptr, ptr %4, align 8, !tbaa !5
  %344 = getelementptr inbounds %struct.s2n_blob, ptr %343, i32 0, i32 2
  %345 = load i32, ptr %344, align 4, !tbaa !18
  %346 = icmp ne i32 %345, 0
  br i1 %346, label %347, label %356

347:                                              ; preds = %342
  br label %348

348:                                              ; preds = %347
  %349 = load ptr, ptr %4, align 8, !tbaa !5
  %350 = call i32 @s2n_free(ptr noundef %349)
  %351 = icmp sgt i32 %350, -1
  br i1 %351, label %353, label %352

352:                                              ; preds = %348
  store i32 -1, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %358

353:                                              ; preds = %348
  br label %354

354:                                              ; preds = %353
  br label %355

355:                                              ; preds = %354
  br label %356

356:                                              ; preds = %355, %342
  %357 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %357, ptr align 8 %8, i64 24, i1 false), !tbaa.struct !22
  store i32 0, ptr %3, align 4
  store i32 1, ptr %7, align 4
  br label %358

358:                                              ; preds = %356, %352, %337, %262, %222, %182
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #9
  br label %359

359:                                              ; preds = %358, %161, %158, %121, %115, %79, %43
  %360 = load i32, ptr %3, align 4
  ret i32 %360

361:                                              ; preds = %158
  unreachable
}

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @s2n_blob_is_growable(ptr noundef) #6

; Function Attrs: nounwind uwtable
declare dso_local i32 @s2n_free(ptr noundef) #6

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

declare i32 @s2n_blob_zero(ptr noundef) #2

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !6, i64 0}
!16 = !{!"s2n_debug_info", !6, i64 0, !6, i64 8}
!17 = !{!16, !6, i64 8}
!18 = !{!19, !10, i64 12}
!19 = !{!"s2n_blob", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16}
!20 = !{!19, !10, i64 8}
!21 = !{!19, !6, i64 0}
!22 = !{i64 0, i64 8, !5, i64 8, i64 4, !9, i64 12, i64 4, !9, i64 16, i64 1, !23}
!23 = !{!7, !7, i64 0}


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

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

@initialized = external hidden local_unnamed_addr global 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
@s2n_mem_malloc_cb = external hidden local_unnamed_addr global ptr, align 8
@.str.11 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [86 x i8], align 1

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

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

declare i32 @s2n_calculate_stacktrace() local_unnamed_addr #2

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_realloc(ptr noundef %0, i32 noundef %1) local_unnamed_addr #6 {
  %3 = alloca %struct.s2n_blob, align 8
  %4 = alloca %struct.s2n_blob, align 8
  %5 = load i8, ptr @initialized, align 1, !tbaa !5, !range !9, !noundef !10
  %6 = trunc nuw i8 %5 to i1
  br i1 %6, label %15, label %7

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

15:                                               ; preds = %2
  %.not40 = icmp eq ptr %0, null
  br i1 %.not40, label %16, label %24

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

24:                                               ; preds = %15
  %25 = tail call zeroext i1 @s2n_blob_is_growable(ptr noundef nonnull %0)
  br i1 %25, label %34, label %26

26:                                               ; preds = %24
  %27 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.13, ptr %27, align 8, !tbaa !11
  %28 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.13, i64 21), i32 noundef 47) #7
  %.not42 = icmp eq ptr %28, null
  %29 = getelementptr inbounds i8, ptr %28, i64 1
  %30 = select i1 %.not42, ptr getelementptr inbounds (i8, ptr @.str.13, i64 21), ptr %29
  %31 = getelementptr inbounds i8, ptr %27, i64 8
  store ptr %30, ptr %31, align 8, !tbaa !14
  %32 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653254, ptr %32, align 4, !tbaa !15
  %33 = tail call i32 @s2n_calculate_stacktrace() #8
  br label %101

34:                                               ; preds = %24
  %35 = icmp eq i32 %1, 0
  br i1 %35, label %36, label %38

36:                                               ; preds = %34
  %37 = tail call i32 @s2n_free(ptr noundef nonnull %0)
  br label %101

38:                                               ; preds = %34
  %39 = getelementptr inbounds i8, ptr %0, i64 12
  %40 = load i32, ptr %39, align 4, !tbaa !17
  %.not43 = icmp ult i32 %40, %1
  br i1 %.not43, label %54, label %41

41:                                               ; preds = %38
  %42 = getelementptr inbounds i8, ptr %0, i64 8
  %43 = load i32, ptr %42, align 8, !tbaa !19
  %44 = icmp ugt i32 %43, %1
  br i1 %44, label %45, label %53

45:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %3, i8 0, i64 24, i1 false)
  %46 = sub i32 %43, %1
  %47 = call i32 @s2n_blob_slice(ptr noundef nonnull %0, ptr noundef nonnull %3, i32 noundef %1, i32 noundef %46) #8
  %48 = icmp sgt i32 %47, -1
  br i1 %48, label %49, label %.thread

49:                                               ; preds = %45
  %50 = call i32 @s2n_blob_zero(ptr noundef nonnull %3) #8
  %51 = icmp sgt i32 %50, -1
  br i1 %51, label %52, label %.thread

.thread:                                          ; preds = %45, %49
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #8
  br label %101

52:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #8
  br label %53

53:                                               ; preds = %52, %41
  store i32 %1, ptr %42, align 8, !tbaa !19
  br label %101

54:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #8
  store ptr null, ptr %4, align 8, !tbaa !20
  %55 = getelementptr inbounds i8, ptr %4, i64 8
  store i32 %1, ptr %55, align 8, !tbaa !19
  %56 = getelementptr inbounds i8, ptr %4, i64 12
  store i32 0, ptr %56, align 4, !tbaa !17
  %57 = getelementptr inbounds i8, ptr %4, i64 16
  store i8 -1, ptr %57, align 8
  %58 = load ptr, ptr @s2n_mem_malloc_cb, align 8, !tbaa !21
  %59 = call i32 %58(ptr noundef nonnull %4, i32 noundef %1, ptr noundef nonnull %56) #8
  %.not44 = icmp eq i32 %59, 0
  br i1 %.not44, label %60, label %100

60:                                               ; preds = %54
  %61 = load i32, ptr %56, align 4, !tbaa !17
  %62 = load i32, ptr %55, align 8, !tbaa !19
  %.not45 = icmp ult i32 %61, %62
  br i1 %.not45, label %63, label %71

63:                                               ; preds = %60
  %64 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.14, ptr %64, align 8, !tbaa !11
  %65 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.14, i64 21), i32 noundef 47) #7
  %.not46 = icmp eq ptr %65, null
  %66 = getelementptr inbounds i8, ptr %65, i64 1
  %67 = select i1 %.not46, ptr getelementptr inbounds (i8, ptr @.str.14, i64 21), ptr %66
  %68 = getelementptr inbounds i8, ptr %64, i64 8
  store ptr %67, ptr %68, align 8, !tbaa !14
  %69 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653185, ptr %69, align 4, !tbaa !15
  %70 = call i32 @s2n_calculate_stacktrace() #8
  br label %100

71:                                               ; preds = %60
  %72 = load ptr, ptr %4, align 8, !tbaa !20
  %.not47 = icmp eq ptr %72, null
  br i1 %.not47, label %73, label %81

73:                                               ; preds = %71
  %74 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.15, ptr %74, align 8, !tbaa !11
  %75 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.15, i64 21), i32 noundef 47) #7
  %.not48 = icmp eq ptr %75, null
  %76 = getelementptr inbounds i8, ptr %75, i64 1
  %77 = select i1 %.not48, ptr getelementptr inbounds (i8, ptr @.str.15, i64 21), ptr %76
  %78 = getelementptr inbounds i8, ptr %74, i64 8
  store ptr %77, ptr %78, align 8, !tbaa !14
  %79 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653185, ptr %79, align 4, !tbaa !15
  %80 = call i32 @s2n_calculate_stacktrace() #8
  br label %100

81:                                               ; preds = %71
  %82 = getelementptr inbounds i8, ptr %0, i64 8
  %83 = load i32, ptr %82, align 8, !tbaa !19
  %.not49 = icmp eq i32 %83, 0
  br i1 %.not49, label %.critedge53, label %84

84:                                               ; preds = %81
  %85 = load ptr, ptr %0, align 8, !tbaa !20
  %86 = zext i32 %83 to i64
  %87 = call ptr @s2n_ensure_memmove_trace(ptr noundef nonnull %72, ptr noundef %85, i64 noundef %86) #8
  %.not50.not.not = icmp eq ptr %87, null
  br i1 %.not50.not.not, label %.critedge, label %.critedge53

.critedge:                                        ; preds = %84
  %88 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.16, ptr %88, align 8, !tbaa !11
  %89 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.16, i64 21), i32 noundef 47) #7
  %.not51 = icmp eq ptr %89, null
  %90 = getelementptr inbounds i8, ptr %89, i64 1
  %91 = select i1 %.not51, ptr getelementptr inbounds (i8, ptr @.str.16, i64 21), ptr %90
  %92 = getelementptr inbounds i8, ptr %88, i64 8
  store ptr %91, ptr %92, align 8, !tbaa !14
  %93 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %93, align 4, !tbaa !15
  %94 = call i32 @s2n_calculate_stacktrace() #8
  br label %100

.critedge53:                                      ; preds = %84, %81
  %95 = load i32, ptr %39, align 4, !tbaa !17
  %.not52 = icmp eq i32 %95, 0
  br i1 %.not52, label %99, label %96

96:                                               ; preds = %.critedge53
  %97 = call i32 @s2n_free(ptr noundef nonnull %0)
  %98 = icmp sgt i32 %97, -1
  br i1 %98, label %99, label %100

99:                                               ; preds = %96, %.critedge53
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %4, i64 24, i1 false), !tbaa.struct !22
  br label %100

100:                                              ; preds = %.critedge, %96, %54, %99, %73, %63
  %.4 = phi i32 [ 0, %99 ], [ -1, %.critedge ], [ -1, %73 ], [ -1, %63 ], [ -1, %54 ], [ -1, %96 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  br label %101

101:                                              ; preds = %.thread, %100, %53, %36, %26, %16, %7
  %.5 = phi i32 [ %37, %36 ], [ 0, %53 ], [ %.4, %100 ], [ -1, %26 ], [ -1, %16 ], [ -1, %7 ], [ -1, %.thread ]
  ret i32 %.5
}

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i1 @s2n_blob_is_growable(ptr noundef) local_unnamed_addr #6

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

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

declare i32 @s2n_blob_zero(ptr noundef) local_unnamed_addr #2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #7 = { nounwind willreturn memory(read) }
attributes #8 = { 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 = !{!"_Bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{i8 0, i8 2}
!10 = !{}
!11 = !{!12, !13, i64 0}
!12 = !{!"s2n_debug_info", !13, i64 0, !13, i64 8}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!12, !13, i64 8}
!15 = !{!16, !16, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!18, !16, i64 12}
!18 = !{!"s2n_blob", !13, i64 0, !16, i64 8, !16, i64 12, !16, i64 16}
!19 = !{!18, !16, i64 8}
!20 = !{!18, !13, i64 0}
!21 = !{!13, !13, i64 0}
!22 = !{i64 0, i64 8, !21, i64 8, i64 4, !15, i64 12, i64 4, !15, i64 16, i64 1, !23}
!23 = !{!7, !7, i64 0}


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