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

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

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

@_s2n_debug_info = external thread_local global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local global i32, align 4
@.str.3 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [95 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: nounwind uwtable
define dso_local i32 @assert_kem_params_free(ptr noundef %0) #3 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  br label %4

4:                                                ; preds = %1
  %5 = load ptr, ptr %3, align 8, !tbaa !5
  %6 = getelementptr inbounds %struct.s2n_kem_params, ptr %5, i32 0, i32 2
  %7 = getelementptr inbounds %struct.s2n_blob, ptr %6, i32 0, i32 0
  %8 = load ptr, ptr %7, align 8, !tbaa !9
  %9 = icmp eq ptr null, %8
  br i1 %9, label %41, label %10

10:                                               ; preds = %4
  br label %11

11:                                               ; preds = %10
  br label %12

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

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

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

33:                                               ; preds = %28, %21
  %34 = phi ptr [ %27, %21 ], [ %32, %28 ]
  %35 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %36 = getelementptr inbounds %struct.s2n_debug_info, ptr %35, i32 0, i32 1
  store ptr %34, ptr %36, align 8, !tbaa !16
  %37 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %37, align 4, !tbaa !17
  %38 = call i32 @s2n_calculate_stacktrace()
  br label %39

39:                                               ; preds = %33
  store i32 -1, ptr %2, align 4
  br label %355

40:                                               ; No predecessors!
  br label %41

41:                                               ; preds = %40, %4
  br label %42

42:                                               ; preds = %41
  br label %43

43:                                               ; preds = %42
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.s2n_kem_params, ptr %44, i32 0, i32 2
  %46 = getelementptr inbounds %struct.s2n_blob, ptr %45, i32 0, i32 1
  %47 = load i32, ptr %46, align 8, !tbaa !18
  %48 = icmp eq i32 0, %47
  br i1 %48, label %80, label %49

49:                                               ; preds = %43
  br label %50

50:                                               ; preds = %49
  br label %51

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

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

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

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

78:                                               ; preds = %72
  store i32 -1, ptr %2, align 4
  br label %355

79:                                               ; No predecessors!
  br label %80

80:                                               ; preds = %79, %43
  br label %81

81:                                               ; preds = %80
  br label %82

82:                                               ; preds = %81
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.s2n_kem_params, ptr %83, i32 0, i32 2
  %85 = getelementptr inbounds %struct.s2n_blob, ptr %84, i32 0, i32 2
  %86 = load i32, ptr %85, align 4, !tbaa !19
  %87 = icmp eq i32 0, %86
  br i1 %87, label %119, label %88

88:                                               ; preds = %82
  br label %89

89:                                               ; preds = %88
  br label %90

90:                                               ; preds = %89
  %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
  store ptr @.str.5, ptr %92, align 8, !tbaa !14
  %93 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %94 = getelementptr inbounds %struct.s2n_debug_info, ptr %93, i32 0, i32 0
  %95 = load ptr, ptr %94, align 8, !tbaa !14
  %96 = getelementptr inbounds i8, ptr %95, i64 21
  %97 = call ptr @strrchr(ptr noundef %96, i32 noundef 47) #4
  %98 = icmp ne ptr %97, null
  br i1 %98, label %99, label %106

99:                                               ; preds = %90
  %100 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %101 = getelementptr inbounds %struct.s2n_debug_info, ptr %100, i32 0, i32 0
  %102 = load ptr, ptr %101, align 8, !tbaa !14
  %103 = getelementptr inbounds i8, ptr %102, i64 21
  %104 = call ptr @strrchr(ptr noundef %103, i32 noundef 47) #4
  %105 = getelementptr inbounds i8, ptr %104, i64 1
  br label %111

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

111:                                              ; preds = %106, %99
  %112 = phi ptr [ %105, %99 ], [ %110, %106 ]
  %113 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %114 = getelementptr inbounds %struct.s2n_debug_info, ptr %113, i32 0, i32 1
  store ptr %112, ptr %114, align 8, !tbaa !16
  %115 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %115, align 4, !tbaa !17
  %116 = call i32 @s2n_calculate_stacktrace()
  br label %117

117:                                              ; preds = %111
  store i32 -1, ptr %2, align 4
  br label %355

118:                                              ; No predecessors!
  br label %119

119:                                              ; preds = %118, %82
  br label %120

120:                                              ; preds = %119
  br label %121

121:                                              ; preds = %120
  %122 = load ptr, ptr %3, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.s2n_kem_params, ptr %122, i32 0, i32 1
  %124 = getelementptr inbounds %struct.s2n_blob, ptr %123, i32 0, i32 0
  %125 = load ptr, ptr %124, align 8, !tbaa !20
  %126 = icmp eq ptr null, %125
  br i1 %126, label %158, label %127

127:                                              ; preds = %121
  br label %128

128:                                              ; preds = %127
  br label %129

129:                                              ; preds = %128
  %130 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %131 = getelementptr inbounds %struct.s2n_debug_info, ptr %130, i32 0, i32 0
  store ptr @.str.6, ptr %131, align 8, !tbaa !14
  %132 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %133 = getelementptr inbounds %struct.s2n_debug_info, ptr %132, i32 0, i32 0
  %134 = load ptr, ptr %133, align 8, !tbaa !14
  %135 = getelementptr inbounds i8, ptr %134, i64 21
  %136 = call ptr @strrchr(ptr noundef %135, i32 noundef 47) #4
  %137 = icmp ne ptr %136, null
  br i1 %137, label %138, label %145

138:                                              ; preds = %129
  %139 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %140 = getelementptr inbounds %struct.s2n_debug_info, ptr %139, i32 0, i32 0
  %141 = load ptr, ptr %140, align 8, !tbaa !14
  %142 = getelementptr inbounds i8, ptr %141, i64 21
  %143 = call ptr @strrchr(ptr noundef %142, i32 noundef 47) #4
  %144 = getelementptr inbounds i8, ptr %143, i64 1
  br label %150

145:                                              ; preds = %129
  %146 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %147 = getelementptr inbounds %struct.s2n_debug_info, ptr %146, i32 0, i32 0
  %148 = load ptr, ptr %147, align 8, !tbaa !14
  %149 = getelementptr inbounds i8, ptr %148, i64 21
  br label %150

150:                                              ; preds = %145, %138
  %151 = phi ptr [ %144, %138 ], [ %149, %145 ]
  %152 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %153 = getelementptr inbounds %struct.s2n_debug_info, ptr %152, i32 0, i32 1
  store ptr %151, ptr %153, align 8, !tbaa !16
  %154 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %154, align 4, !tbaa !17
  %155 = call i32 @s2n_calculate_stacktrace()
  br label %156

156:                                              ; preds = %150
  store i32 -1, ptr %2, align 4
  br label %355

157:                                              ; No predecessors!
  br label %158

158:                                              ; preds = %157, %121
  br label %159

159:                                              ; preds = %158
  br label %160

160:                                              ; preds = %159
  %161 = load ptr, ptr %3, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.s2n_kem_params, ptr %161, i32 0, i32 1
  %163 = getelementptr inbounds %struct.s2n_blob, ptr %162, i32 0, i32 1
  %164 = load i32, ptr %163, align 8, !tbaa !21
  %165 = icmp eq i32 0, %164
  br i1 %165, label %197, label %166

166:                                              ; preds = %160
  br label %167

167:                                              ; preds = %166
  br label %168

168:                                              ; preds = %167
  %169 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %170 = getelementptr inbounds %struct.s2n_debug_info, ptr %169, i32 0, i32 0
  store ptr @.str.7, ptr %170, align 8, !tbaa !14
  %171 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %172 = getelementptr inbounds %struct.s2n_debug_info, ptr %171, i32 0, i32 0
  %173 = load ptr, ptr %172, align 8, !tbaa !14
  %174 = getelementptr inbounds i8, ptr %173, i64 21
  %175 = call ptr @strrchr(ptr noundef %174, i32 noundef 47) #4
  %176 = icmp ne ptr %175, null
  br i1 %176, label %177, label %184

177:                                              ; preds = %168
  %178 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %179 = getelementptr inbounds %struct.s2n_debug_info, ptr %178, i32 0, i32 0
  %180 = load ptr, ptr %179, align 8, !tbaa !14
  %181 = getelementptr inbounds i8, ptr %180, i64 21
  %182 = call ptr @strrchr(ptr noundef %181, i32 noundef 47) #4
  %183 = getelementptr inbounds i8, ptr %182, i64 1
  br label %189

184:                                              ; preds = %168
  %185 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %186 = getelementptr inbounds %struct.s2n_debug_info, ptr %185, i32 0, i32 0
  %187 = load ptr, ptr %186, align 8, !tbaa !14
  %188 = getelementptr inbounds i8, ptr %187, i64 21
  br label %189

189:                                              ; preds = %184, %177
  %190 = phi ptr [ %183, %177 ], [ %188, %184 ]
  %191 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %192 = getelementptr inbounds %struct.s2n_debug_info, ptr %191, i32 0, i32 1
  store ptr %190, ptr %192, align 8, !tbaa !16
  %193 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %193, align 4, !tbaa !17
  %194 = call i32 @s2n_calculate_stacktrace()
  br label %195

195:                                              ; preds = %189
  store i32 -1, ptr %2, align 4
  br label %355

196:                                              ; No predecessors!
  br label %197

197:                                              ; preds = %196, %160
  br label %198

198:                                              ; preds = %197
  br label %199

199:                                              ; preds = %198
  %200 = load ptr, ptr %3, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.s2n_kem_params, ptr %200, i32 0, i32 1
  %202 = getelementptr inbounds %struct.s2n_blob, ptr %201, i32 0, i32 2
  %203 = load i32, ptr %202, align 4, !tbaa !22
  %204 = icmp eq i32 0, %203
  br i1 %204, label %236, label %205

205:                                              ; preds = %199
  br label %206

206:                                              ; preds = %205
  br label %207

207:                                              ; preds = %206
  %208 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %209 = getelementptr inbounds %struct.s2n_debug_info, ptr %208, i32 0, i32 0
  store ptr @.str.8, ptr %209, align 8, !tbaa !14
  %210 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %211 = getelementptr inbounds %struct.s2n_debug_info, ptr %210, i32 0, i32 0
  %212 = load ptr, ptr %211, align 8, !tbaa !14
  %213 = getelementptr inbounds i8, ptr %212, i64 21
  %214 = call ptr @strrchr(ptr noundef %213, i32 noundef 47) #4
  %215 = icmp ne ptr %214, null
  br i1 %215, label %216, label %223

216:                                              ; preds = %207
  %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 0
  %219 = load ptr, ptr %218, align 8, !tbaa !14
  %220 = getelementptr inbounds i8, ptr %219, i64 21
  %221 = call ptr @strrchr(ptr noundef %220, i32 noundef 47) #4
  %222 = getelementptr inbounds i8, ptr %221, i64 1
  br label %228

223:                                              ; preds = %207
  %224 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %225 = getelementptr inbounds %struct.s2n_debug_info, ptr %224, i32 0, i32 0
  %226 = load ptr, ptr %225, align 8, !tbaa !14
  %227 = getelementptr inbounds i8, ptr %226, i64 21
  br label %228

228:                                              ; preds = %223, %216
  %229 = phi ptr [ %222, %216 ], [ %227, %223 ]
  %230 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %231 = getelementptr inbounds %struct.s2n_debug_info, ptr %230, i32 0, i32 1
  store ptr %229, ptr %231, align 8, !tbaa !16
  %232 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %232, align 4, !tbaa !17
  %233 = call i32 @s2n_calculate_stacktrace()
  br label %234

234:                                              ; preds = %228
  store i32 -1, ptr %2, align 4
  br label %355

235:                                              ; No predecessors!
  br label %236

236:                                              ; preds = %235, %199
  br label %237

237:                                              ; preds = %236
  br label %238

238:                                              ; preds = %237
  %239 = load ptr, ptr %3, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.s2n_kem_params, ptr %239, i32 0, i32 3
  %241 = getelementptr inbounds %struct.s2n_blob, ptr %240, i32 0, i32 0
  %242 = load ptr, ptr %241, align 8, !tbaa !23
  %243 = icmp eq ptr null, %242
  br i1 %243, label %275, label %244

244:                                              ; preds = %238
  br label %245

245:                                              ; preds = %244
  br label %246

246:                                              ; preds = %245
  %247 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %248 = getelementptr inbounds %struct.s2n_debug_info, ptr %247, i32 0, i32 0
  store ptr @.str.9, ptr %248, align 8, !tbaa !14
  %249 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %250 = getelementptr inbounds %struct.s2n_debug_info, ptr %249, i32 0, i32 0
  %251 = load ptr, ptr %250, align 8, !tbaa !14
  %252 = getelementptr inbounds i8, ptr %251, i64 21
  %253 = call ptr @strrchr(ptr noundef %252, i32 noundef 47) #4
  %254 = icmp ne ptr %253, null
  br i1 %254, label %255, label %262

255:                                              ; preds = %246
  %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
  %258 = load ptr, ptr %257, align 8, !tbaa !14
  %259 = getelementptr inbounds i8, ptr %258, i64 21
  %260 = call ptr @strrchr(ptr noundef %259, i32 noundef 47) #4
  %261 = getelementptr inbounds i8, ptr %260, i64 1
  br label %267

262:                                              ; preds = %246
  %263 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %264 = getelementptr inbounds %struct.s2n_debug_info, ptr %263, i32 0, i32 0
  %265 = load ptr, ptr %264, align 8, !tbaa !14
  %266 = getelementptr inbounds i8, ptr %265, i64 21
  br label %267

267:                                              ; preds = %262, %255
  %268 = phi ptr [ %261, %255 ], [ %266, %262 ]
  %269 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %270 = getelementptr inbounds %struct.s2n_debug_info, ptr %269, i32 0, i32 1
  store ptr %268, ptr %270, align 8, !tbaa !16
  %271 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %271, align 4, !tbaa !17
  %272 = call i32 @s2n_calculate_stacktrace()
  br label %273

273:                                              ; preds = %267
  store i32 -1, ptr %2, align 4
  br label %355

274:                                              ; No predecessors!
  br label %275

275:                                              ; preds = %274, %238
  br label %276

276:                                              ; preds = %275
  br label %277

277:                                              ; preds = %276
  %278 = load ptr, ptr %3, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.s2n_kem_params, ptr %278, i32 0, i32 3
  %280 = getelementptr inbounds %struct.s2n_blob, ptr %279, i32 0, i32 1
  %281 = load i32, ptr %280, align 8, !tbaa !24
  %282 = icmp eq i32 0, %281
  br i1 %282, label %314, label %283

283:                                              ; preds = %277
  br label %284

284:                                              ; preds = %283
  br label %285

285:                                              ; preds = %284
  %286 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %287 = getelementptr inbounds %struct.s2n_debug_info, ptr %286, i32 0, i32 0
  store ptr @.str.10, ptr %287, align 8, !tbaa !14
  %288 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %289 = getelementptr inbounds %struct.s2n_debug_info, ptr %288, i32 0, i32 0
  %290 = load ptr, ptr %289, align 8, !tbaa !14
  %291 = getelementptr inbounds i8, ptr %290, i64 21
  %292 = call ptr @strrchr(ptr noundef %291, i32 noundef 47) #4
  %293 = icmp ne ptr %292, null
  br i1 %293, label %294, label %301

294:                                              ; preds = %285
  %295 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %296 = getelementptr inbounds %struct.s2n_debug_info, ptr %295, i32 0, i32 0
  %297 = load ptr, ptr %296, align 8, !tbaa !14
  %298 = getelementptr inbounds i8, ptr %297, i64 21
  %299 = call ptr @strrchr(ptr noundef %298, i32 noundef 47) #4
  %300 = getelementptr inbounds i8, ptr %299, i64 1
  br label %306

301:                                              ; preds = %285
  %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 !14
  %305 = getelementptr inbounds i8, ptr %304, i64 21
  br label %306

306:                                              ; preds = %301, %294
  %307 = phi ptr [ %300, %294 ], [ %305, %301 ]
  %308 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %309 = getelementptr inbounds %struct.s2n_debug_info, ptr %308, i32 0, i32 1
  store ptr %307, ptr %309, align 8, !tbaa !16
  %310 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %310, align 4, !tbaa !17
  %311 = call i32 @s2n_calculate_stacktrace()
  br label %312

312:                                              ; preds = %306
  store i32 -1, ptr %2, align 4
  br label %355

313:                                              ; No predecessors!
  br label %314

314:                                              ; preds = %313, %277
  br label %315

315:                                              ; preds = %314
  br label %316

316:                                              ; preds = %315
  %317 = load ptr, ptr %3, align 8, !tbaa !5
  %318 = getelementptr inbounds %struct.s2n_kem_params, ptr %317, i32 0, i32 3
  %319 = getelementptr inbounds %struct.s2n_blob, ptr %318, i32 0, i32 2
  %320 = load i32, ptr %319, align 4, !tbaa !25
  %321 = icmp eq i32 0, %320
  br i1 %321, label %353, label %322

322:                                              ; preds = %316
  br label %323

323:                                              ; preds = %322
  br label %324

324:                                              ; preds = %323
  %325 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %326 = getelementptr inbounds %struct.s2n_debug_info, ptr %325, i32 0, i32 0
  store ptr @.str.11, ptr %326, align 8, !tbaa !14
  %327 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %328 = getelementptr inbounds %struct.s2n_debug_info, ptr %327, i32 0, i32 0
  %329 = load ptr, ptr %328, align 8, !tbaa !14
  %330 = getelementptr inbounds i8, ptr %329, i64 21
  %331 = call ptr @strrchr(ptr noundef %330, i32 noundef 47) #4
  %332 = icmp ne ptr %331, null
  br i1 %332, label %333, label %340

333:                                              ; preds = %324
  %334 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %335 = getelementptr inbounds %struct.s2n_debug_info, ptr %334, i32 0, i32 0
  %336 = load ptr, ptr %335, align 8, !tbaa !14
  %337 = getelementptr inbounds i8, ptr %336, i64 21
  %338 = call ptr @strrchr(ptr noundef %337, i32 noundef 47) #4
  %339 = getelementptr inbounds i8, ptr %338, i64 1
  br label %345

340:                                              ; preds = %324
  %341 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %342 = getelementptr inbounds %struct.s2n_debug_info, ptr %341, i32 0, i32 0
  %343 = load ptr, ptr %342, align 8, !tbaa !14
  %344 = getelementptr inbounds i8, ptr %343, i64 21
  br label %345

345:                                              ; preds = %340, %333
  %346 = phi ptr [ %339, %333 ], [ %344, %340 ]
  %347 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %348 = getelementptr inbounds %struct.s2n_debug_info, ptr %347, i32 0, i32 1
  store ptr %346, ptr %348, align 8, !tbaa !16
  %349 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %349, align 4, !tbaa !17
  %350 = call i32 @s2n_calculate_stacktrace()
  br label %351

351:                                              ; preds = %345
  store i32 -1, ptr %2, align 4
  br label %355

352:                                              ; No predecessors!
  br label %353

353:                                              ; preds = %352, %316
  br label %354

354:                                              ; preds = %353
  store i32 0, ptr %2, align 4
  br label %355

355:                                              ; preds = %354, %351, %312, %273, %234, %195, %156, %117, %78, %39
  %356 = load i32, ptr %2, align 4
  ret i32 %356
}

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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!10, !6, i64 32}
!10 = !{!"s2n_kem_params", !6, i64 0, !11, i64 8, !11, i64 32, !11, i64 56, !13, i64 80}
!11 = !{!"s2n_blob", !6, i64 0, !12, i64 8, !12, i64 12, !12, i64 16}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_Bool", !7, i64 0}
!14 = !{!15, !6, i64 0}
!15 = !{!"s2n_debug_info", !6, i64 0, !6, i64 8}
!16 = !{!15, !6, i64 8}
!17 = !{!12, !12, i64 0}
!18 = !{!10, !12, i64 40}
!19 = !{!10, !12, i64 44}
!20 = !{!10, !6, i64 8}
!21 = !{!10, !12, i64 16}
!22 = !{!10, !12, i64 20}
!23 = !{!10, !6, i64 56}
!24 = !{!10, !12, i64 64}
!25 = !{!10, !12, i64 68}


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

%struct.s2n_debug_info = type { ptr, ptr }

@_s2n_debug_info = external thread_local local_unnamed_addr global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local local_unnamed_addr global i32, align 4
@.str.3 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [95 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [95 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: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @assert_kem_params_free(ptr nocapture noundef readonly %0) local_unnamed_addr #3 {
  %2 = getelementptr inbounds i8, ptr %0, i64 32
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %4 = icmp eq ptr %3, null
  br i1 %4, label %5, label %.sink.split

5:                                                ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 40
  %7 = load i32, ptr %6, align 8, !tbaa !13
  %8 = icmp eq i32 %7, 0
  br i1 %8, label %9, label %.sink.split

9:                                                ; preds = %5
  %10 = getelementptr inbounds i8, ptr %0, i64 44
  %11 = load i32, ptr %10, align 4, !tbaa !14
  %12 = icmp eq i32 %11, 0
  br i1 %12, label %13, label %.sink.split

13:                                               ; preds = %9
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  %15 = load ptr, ptr %14, align 8, !tbaa !15
  %16 = icmp eq ptr %15, null
  br i1 %16, label %17, label %.sink.split

17:                                               ; preds = %13
  %18 = getelementptr inbounds i8, ptr %0, i64 16
  %19 = load i32, ptr %18, align 8, !tbaa !16
  %20 = icmp eq i32 %19, 0
  br i1 %20, label %21, label %.sink.split

21:                                               ; preds = %17
  %22 = getelementptr inbounds i8, ptr %0, i64 20
  %23 = load i32, ptr %22, align 4, !tbaa !17
  %24 = icmp eq i32 %23, 0
  br i1 %24, label %25, label %.sink.split

25:                                               ; preds = %21
  %26 = getelementptr inbounds i8, ptr %0, i64 56
  %27 = load ptr, ptr %26, align 8, !tbaa !18
  %28 = icmp eq ptr %27, null
  br i1 %28, label %29, label %.sink.split

29:                                               ; preds = %25
  %30 = getelementptr inbounds i8, ptr %0, i64 64
  %31 = load i32, ptr %30, align 8, !tbaa !19
  %32 = icmp eq i32 %31, 0
  br i1 %32, label %33, label %.sink.split

33:                                               ; preds = %29
  %34 = getelementptr inbounds i8, ptr %0, i64 68
  %35 = load i32, ptr %34, align 4, !tbaa !20
  %36 = icmp eq i32 %35, 0
  br i1 %36, label %44, label %.sink.split

.sink.split:                                      ; preds = %33, %29, %25, %21, %17, %13, %9, %5, %1
  %.str.11.sink = phi ptr [ @.str.3, %1 ], [ @.str.4, %5 ], [ @.str.5, %9 ], [ @.str.6, %13 ], [ @.str.7, %17 ], [ @.str.8, %21 ], [ @.str.9, %25 ], [ @.str.10, %29 ], [ @.str.11, %33 ]
  %.sink31 = phi ptr [ getelementptr inbounds (i8, ptr @.str.3, i64 21), %1 ], [ getelementptr inbounds (i8, ptr @.str.4, i64 21), %5 ], [ getelementptr inbounds (i8, ptr @.str.5, i64 21), %9 ], [ getelementptr inbounds (i8, ptr @.str.6, i64 21), %13 ], [ getelementptr inbounds (i8, ptr @.str.7, i64 21), %17 ], [ getelementptr inbounds (i8, ptr @.str.8, i64 21), %21 ], [ getelementptr inbounds (i8, ptr @.str.9, i64 21), %25 ], [ getelementptr inbounds (i8, ptr @.str.10, i64 21), %29 ], [ getelementptr inbounds (i8, ptr @.str.11, i64 21), %33 ]
  %37 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr %.str.11.sink, ptr %37, align 8, !tbaa !21
  %38 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) %.sink31, i32 noundef 47) #4
  %.not25 = icmp eq ptr %38, null
  %39 = getelementptr inbounds i8, ptr %38, i64 1
  %40 = select i1 %.not25, ptr %.sink31, ptr %39
  %41 = getelementptr inbounds i8, ptr %37, i64 8
  store ptr %40, ptr %41, align 8, !tbaa !23
  %42 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %42, align 4, !tbaa !24
  %43 = tail call i32 @s2n_calculate_stacktrace() #5
  br label %44

44:                                               ; preds = %.sink.split, %33
  %.0 = phi i32 [ 0, %33 ], [ -1, %.sink.split ]
  ret i32 %.0
}

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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind willreturn memory(read) }
attributes #5 = { nounwind }

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

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


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