; LLVM IR from aws/s2n-tls :: tests/unit (s2n_drbg_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_stuffer = type { %struct.s2n_blob, i32, i32, i32, i8 }
%struct.s2n_blob = type { ptr, i32, i32, i8 }
%struct.s2n_result = type { i32 }
%struct.s2n_drbg = type { i64, ptr, [16 x i8], i64 }

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @nist_fake_entropy_init_cleanup() #0

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

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

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

declare i32 @s2n_stuffer_read(ptr noundef, ptr noundef) #3

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

; Function Attrs: nounwind uwtable
define dso_local i32 @check_drgb_version(i32 noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) #0 {
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %struct.s2n_stuffer, align 8
  %15 = alloca %struct.s2n_stuffer, align 8
  %16 = alloca %struct.s2n_stuffer, align 8
  %17 = alloca %struct.s2n_result, align 4
  %18 = alloca i32, align 4
  %19 = alloca %struct.s2n_result, align 4
  %20 = alloca %struct.s2n_result, align 4
  %21 = alloca i32, align 4
  %22 = alloca [48 x i8], align 16
  %23 = alloca %struct.s2n_drbg, align 8
  %24 = alloca %struct.s2n_blob, align 8
  %25 = alloca %struct.s2n_result, align 4
  %26 = alloca %struct.s2n_result, align 4
  %27 = alloca %struct.s2n_result, align 4
  %28 = alloca [16 x i8], align 16
  %29 = alloca [64 x i8], align 16
  %30 = alloca %struct.s2n_blob, align 8
  %31 = alloca %struct.s2n_result, align 4
  %32 = alloca %struct.s2n_result, align 4
  %33 = alloca [64 x i8], align 16
  %34 = alloca %struct.s2n_result, align 4
  store i32 %0, ptr %8, align 4, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !9
  store i32 %2, ptr %10, align 4, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !9
  store ptr %4, ptr %12, align 8, !tbaa !9
  store ptr %5, ptr %13, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 40, ptr %14) #7
  call void @llvm.memset.p0.i64(ptr align 8 %14, i8 0, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #7
  call void @llvm.memset.p0.i64(ptr align 8 %15, i8 0, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr %16) #7
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 40, i1 false)
  br label %35

35:                                               ; preds = %6
  %36 = load ptr, ptr %11, align 8, !tbaa !9
  %37 = call i32 @s2n_stuffer_alloc_from_hex(ptr noundef %14, ptr noundef %36)
  %38 = getelementptr inbounds %struct.s2n_result, ptr %17, i32 0, i32 0
  store i32 %37, ptr %38, align 4
  %39 = getelementptr inbounds %struct.s2n_result, ptr %17, i32 0, i32 0
  %40 = load i32, ptr %39, align 4
  %41 = call zeroext i1 @s2n_result_is_ok(i32 %40)
  br i1 %41, label %43, label %42

42:                                               ; preds = %35
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %458

43:                                               ; preds = %35
  br label %44

44:                                               ; preds = %43
  br label %45

45:                                               ; preds = %44
  br label %46

46:                                               ; preds = %45
  %47 = load ptr, ptr %13, align 8, !tbaa !9
  %48 = call i32 @s2n_stuffer_alloc_from_hex(ptr noundef %15, ptr noundef %47)
  %49 = getelementptr inbounds %struct.s2n_result, ptr %19, i32 0, i32 0
  store i32 %48, ptr %49, align 4
  %50 = getelementptr inbounds %struct.s2n_result, ptr %19, i32 0, i32 0
  %51 = load i32, ptr %50, align 4
  %52 = call zeroext i1 @s2n_result_is_ok(i32 %51)
  br i1 %52, label %54, label %53

53:                                               ; preds = %46
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %458

54:                                               ; preds = %46
  br label %55

55:                                               ; preds = %54
  br label %56

56:                                               ; preds = %55
  br label %57

57:                                               ; preds = %56
  %58 = load ptr, ptr %12, align 8, !tbaa !9
  %59 = call i32 @s2n_stuffer_alloc_from_hex(ptr noundef %16, ptr noundef %58)
  %60 = getelementptr inbounds %struct.s2n_result, ptr %20, i32 0, i32 0
  store i32 %59, ptr %60, align 4
  %61 = getelementptr inbounds %struct.s2n_result, ptr %20, i32 0, i32 0
  %62 = load i32, ptr %61, align 4
  %63 = call zeroext i1 @s2n_result_is_ok(i32 %62)
  br i1 %63, label %65, label %64

64:                                               ; preds = %57
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %458

65:                                               ; preds = %57
  br label %66

66:                                               ; preds = %65
  br label %67

67:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %68

68:                                               ; preds = %452, %67
  %69 = load i32, ptr %21, align 4, !tbaa !5
  %70 = icmp slt i32 %69, 14
  br i1 %70, label %72, label %71

71:                                               ; preds = %68
  store i32 8, ptr %18, align 4
  br label %455

72:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 48, ptr %22) #7
  call void @llvm.memset.p0.i64(ptr align 16 %22, i8 0, i64 48, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr %23) #7
  call void @llvm.memset.p0.i64(ptr align 8 %23, i8 0, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #7
  call void @llvm.memset.p0.i64(ptr align 8 %24, i8 0, i64 24, i1 false)
  br label %73

73:                                               ; preds = %72
  %74 = getelementptr inbounds [48 x i8], ptr %22, i64 0, i64 0
  %75 = load i32, ptr %10, align 4, !tbaa !5
  %76 = call i32 @s2n_blob_init(ptr noundef %24, ptr noundef %74, i32 noundef %75)
  %77 = icmp sgt i32 %76, -1
  br i1 %77, label %79, label %78

78:                                               ; preds = %73
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %449

79:                                               ; preds = %73
  br label %80

80:                                               ; preds = %79
  br label %81

81:                                               ; preds = %80
  br label %82

82:                                               ; preds = %81
  %83 = call i32 @s2n_stuffer_read(ptr noundef %14, ptr noundef %24)
  %84 = icmp sgt i32 %83, -1
  br i1 %84, label %86, label %85

85:                                               ; preds = %82
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %449

86:                                               ; preds = %82
  br label %87

87:                                               ; preds = %86
  br label %88

88:                                               ; preds = %87
  br label %89

89:                                               ; preds = %88
  %90 = call i32 @s2n_rand_cleanup()
  %91 = getelementptr inbounds %struct.s2n_result, ptr %25, i32 0, i32 0
  store i32 %90, ptr %91, align 4
  %92 = getelementptr inbounds %struct.s2n_result, ptr %25, i32 0, i32 0
  %93 = load i32, ptr %92, align 4
  %94 = call zeroext i1 @s2n_result_is_ok(i32 %93)
  br i1 %94, label %96, label %95

95:                                               ; preds = %89
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %449

96:                                               ; preds = %89
  br label %97

97:                                               ; preds = %96
  br label %98

98:                                               ; preds = %97
  br label %99

99:                                               ; preds = %98
  %100 = load ptr, ptr %9, align 8, !tbaa !9
  %101 = load ptr, ptr %9, align 8, !tbaa !9
  %102 = call i32 @s2n_rand_set_callbacks(ptr noundef @nist_fake_entropy_init_cleanup, ptr noundef @nist_fake_entropy_init_cleanup, ptr noundef %100, ptr noundef %101)
  %103 = icmp sgt i32 %102, -1
  br i1 %103, label %105, label %104

104:                                              ; preds = %99
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %449

105:                                              ; preds = %99
  br label %106

106:                                              ; preds = %105
  br label %107

107:                                              ; preds = %106
  br label %108

108:                                              ; preds = %107
  %109 = call i32 @s2n_rand_init()
  %110 = getelementptr inbounds %struct.s2n_result, ptr %26, i32 0, i32 0
  store i32 %109, ptr %110, align 4
  %111 = getelementptr inbounds %struct.s2n_result, ptr %26, i32 0, i32 0
  %112 = load i32, ptr %111, align 4
  %113 = call zeroext i1 @s2n_result_is_ok(i32 %112)
  br i1 %113, label %115, label %114

114:                                              ; preds = %108
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %449

115:                                              ; preds = %108
  br label %116

116:                                              ; preds = %115
  br label %117

117:                                              ; preds = %116
  br label %118

118:                                              ; preds = %117
  %119 = load i32, ptr %8, align 4, !tbaa !5
  %120 = call i32 @s2n_drbg_instantiate(ptr noundef %23, ptr noundef %24, i32 noundef %119)
  %121 = getelementptr inbounds %struct.s2n_result, ptr %27, i32 0, i32 0
  store i32 %120, ptr %121, align 4
  %122 = getelementptr inbounds %struct.s2n_result, ptr %27, i32 0, i32 0
  %123 = load i32, ptr %122, align 4
  %124 = call zeroext i1 @s2n_result_is_ok(i32 %123)
  br i1 %124, label %126, label %125

125:                                              ; preds = %118
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %449

126:                                              ; preds = %118
  br label %127

127:                                              ; preds = %126
  br label %128

128:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #7
  br label %129

129:                                              ; preds = %128
  %130 = getelementptr inbounds [16 x i8], ptr %28, i64 0, i64 0
  %131 = call i32 @s2n_stuffer_read_bytes(ptr noundef %16, ptr noundef %130, i32 noundef 16)
  %132 = icmp sgt i32 %131, -1
  br i1 %132, label %134, label %133

133:                                              ; preds = %129
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %448

134:                                              ; preds = %129
  br label %135

135:                                              ; preds = %134
  br label %136

136:                                              ; preds = %135
  br label %137

137:                                              ; preds = %136
  %138 = getelementptr inbounds [16 x i8], ptr %28, i64 0, i64 0
  %139 = getelementptr inbounds %struct.s2n_drbg, ptr %23, i32 0, i32 2
  %140 = getelementptr inbounds [16 x i8], ptr %139, i64 0, i64 0
  %141 = call i32 @memcmp(ptr noundef %138, ptr noundef %140, i64 noundef 16) #8
  %142 = icmp eq i32 %141, 0
  br i1 %142, label %176, label %143

143:                                              ; preds = %137
  br label %144

144:                                              ; preds = %143
  br label %145

145:                                              ; preds = %144
  %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
  store ptr @.str, ptr %147, align 8, !tbaa !11
  %148 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %149 = getelementptr inbounds %struct.s2n_debug_info, ptr %148, i32 0, i32 0
  %150 = load ptr, ptr %149, align 8, !tbaa !11
  %151 = getelementptr inbounds i8, ptr %150, i64 21
  %152 = call ptr @strrchr(ptr noundef %151, i32 noundef 47) #8
  %153 = icmp ne ptr %152, null
  br i1 %153, label %154, label %161

154:                                              ; preds = %145
  %155 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %156 = getelementptr inbounds %struct.s2n_debug_info, ptr %155, i32 0, i32 0
  %157 = load ptr, ptr %156, align 8, !tbaa !11
  %158 = getelementptr inbounds i8, ptr %157, i64 21
  %159 = call ptr @strrchr(ptr noundef %158, i32 noundef 47) #8
  %160 = getelementptr inbounds i8, ptr %159, i64 1
  br label %166

161:                                              ; preds = %145
  %162 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %163 = getelementptr inbounds %struct.s2n_debug_info, ptr %162, i32 0, i32 0
  %164 = load ptr, ptr %163, align 8, !tbaa !11
  %165 = getelementptr inbounds i8, ptr %164, i64 21
  br label %166

166:                                              ; preds = %161, %154
  %167 = phi ptr [ %160, %154 ], [ %165, %161 ]
  %168 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %169 = getelementptr inbounds %struct.s2n_debug_info, ptr %168, i32 0, i32 1
  store ptr %167, ptr %169, align 8, !tbaa !13
  %170 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %170, align 4, !tbaa !5
  %171 = call i32 @s2n_calculate_stacktrace()
  br label %172

172:                                              ; preds = %166
  br label %173

173:                                              ; preds = %172
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %448

174:                                              ; No predecessors!
  br label %175

175:                                              ; preds = %174
  br label %176

176:                                              ; preds = %175, %137
  br label %177

177:                                              ; preds = %176
  br label %178

178:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 64, ptr %29) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %30) #7
  call void @llvm.memset.p0.i64(ptr align 8 %30, i8 0, i64 24, i1 false)
  br label %179

179:                                              ; preds = %178
  %180 = getelementptr inbounds [64 x i8], ptr %29, i64 0, i64 0
  %181 = call i32 @s2n_blob_init(ptr noundef %30, ptr noundef %180, i32 noundef 64)
  %182 = icmp sgt i32 %181, -1
  br i1 %182, label %184, label %183

183:                                              ; preds = %179
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %447

184:                                              ; preds = %179
  br label %185

185:                                              ; preds = %184
  br label %186

186:                                              ; preds = %185
  br label %187

187:                                              ; preds = %186
  %188 = call i32 @s2n_drbg_generate(ptr noundef %23, ptr noundef %30)
  %189 = getelementptr inbounds %struct.s2n_result, ptr %31, i32 0, i32 0
  store i32 %188, ptr %189, align 4
  %190 = getelementptr inbounds %struct.s2n_result, ptr %31, i32 0, i32 0
  %191 = load i32, ptr %190, align 4
  %192 = call zeroext i1 @s2n_result_is_ok(i32 %191)
  br i1 %192, label %194, label %193

193:                                              ; preds = %187
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %447

194:                                              ; preds = %187
  br label %195

195:                                              ; preds = %194
  br label %196

196:                                              ; preds = %195
  br label %197

197:                                              ; preds = %196
  %198 = getelementptr inbounds [16 x i8], ptr %28, i64 0, i64 0
  %199 = call i32 @s2n_stuffer_read_bytes(ptr noundef %16, ptr noundef %198, i32 noundef 16)
  %200 = icmp sgt i32 %199, -1
  br i1 %200, label %202, label %201

201:                                              ; preds = %197
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %447

202:                                              ; preds = %197
  br label %203

203:                                              ; preds = %202
  br label %204

204:                                              ; preds = %203
  br label %205

205:                                              ; preds = %204
  %206 = getelementptr inbounds [16 x i8], ptr %28, i64 0, i64 0
  %207 = getelementptr inbounds %struct.s2n_drbg, ptr %23, i32 0, i32 2
  %208 = getelementptr inbounds [16 x i8], ptr %207, i64 0, i64 0
  %209 = call i32 @memcmp(ptr noundef %206, ptr noundef %208, i64 noundef 16) #8
  %210 = icmp eq i32 %209, 0
  br i1 %210, label %244, label %211

211:                                              ; preds = %205
  br label %212

212:                                              ; preds = %211
  br label %213

213:                                              ; preds = %212
  %214 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %215 = getelementptr inbounds %struct.s2n_debug_info, ptr %214, i32 0, i32 0
  store ptr @.str.1, ptr %215, align 8, !tbaa !11
  %216 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %217 = getelementptr inbounds %struct.s2n_debug_info, ptr %216, i32 0, i32 0
  %218 = load ptr, ptr %217, align 8, !tbaa !11
  %219 = getelementptr inbounds i8, ptr %218, i64 21
  %220 = call ptr @strrchr(ptr noundef %219, i32 noundef 47) #8
  %221 = icmp ne ptr %220, null
  br i1 %221, label %222, label %229

222:                                              ; preds = %213
  %223 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %224 = getelementptr inbounds %struct.s2n_debug_info, ptr %223, i32 0, i32 0
  %225 = load ptr, ptr %224, align 8, !tbaa !11
  %226 = getelementptr inbounds i8, ptr %225, i64 21
  %227 = call ptr @strrchr(ptr noundef %226, i32 noundef 47) #8
  %228 = getelementptr inbounds i8, ptr %227, i64 1
  br label %234

229:                                              ; preds = %213
  %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 0
  %232 = load ptr, ptr %231, align 8, !tbaa !11
  %233 = getelementptr inbounds i8, ptr %232, i64 21
  br label %234

234:                                              ; preds = %229, %222
  %235 = phi ptr [ %228, %222 ], [ %233, %229 ]
  %236 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %237 = getelementptr inbounds %struct.s2n_debug_info, ptr %236, i32 0, i32 1
  store ptr %235, ptr %237, align 8, !tbaa !13
  %238 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %238, align 4, !tbaa !5
  %239 = call i32 @s2n_calculate_stacktrace()
  br label %240

240:                                              ; preds = %234
  br label %241

241:                                              ; preds = %240
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %447

242:                                              ; No predecessors!
  br label %243

243:                                              ; preds = %242
  br label %244

244:                                              ; preds = %243, %205
  br label %245

245:                                              ; preds = %244
  br label %246

246:                                              ; preds = %245
  br label %247

247:                                              ; preds = %246
  %248 = call i32 @s2n_drbg_generate(ptr noundef %23, ptr noundef %30)
  %249 = getelementptr inbounds %struct.s2n_result, ptr %32, i32 0, i32 0
  store i32 %248, ptr %249, align 4
  %250 = getelementptr inbounds %struct.s2n_result, ptr %32, i32 0, i32 0
  %251 = load i32, ptr %250, align 4
  %252 = call zeroext i1 @s2n_result_is_ok(i32 %251)
  br i1 %252, label %254, label %253

253:                                              ; preds = %247
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %447

254:                                              ; preds = %247
  br label %255

255:                                              ; preds = %254
  br label %256

256:                                              ; preds = %255
  br label %257

257:                                              ; preds = %256
  %258 = getelementptr inbounds [16 x i8], ptr %28, i64 0, i64 0
  %259 = call i32 @s2n_stuffer_read_bytes(ptr noundef %16, ptr noundef %258, i32 noundef 16)
  %260 = icmp sgt i32 %259, -1
  br i1 %260, label %262, label %261

261:                                              ; preds = %257
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %447

262:                                              ; preds = %257
  br label %263

263:                                              ; preds = %262
  br label %264

264:                                              ; preds = %263
  br label %265

265:                                              ; preds = %264
  %266 = getelementptr inbounds [16 x i8], ptr %28, i64 0, i64 0
  %267 = getelementptr inbounds %struct.s2n_drbg, ptr %23, i32 0, i32 2
  %268 = getelementptr inbounds [16 x i8], ptr %267, i64 0, i64 0
  %269 = call i32 @memcmp(ptr noundef %266, ptr noundef %268, i64 noundef 16) #8
  %270 = icmp eq i32 %269, 0
  br i1 %270, label %304, label %271

271:                                              ; preds = %265
  br label %272

272:                                              ; preds = %271
  br label %273

273:                                              ; preds = %272
  %274 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %275 = getelementptr inbounds %struct.s2n_debug_info, ptr %274, i32 0, i32 0
  store ptr @.str.2, ptr %275, align 8, !tbaa !11
  %276 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %277 = getelementptr inbounds %struct.s2n_debug_info, ptr %276, i32 0, i32 0
  %278 = load ptr, ptr %277, align 8, !tbaa !11
  %279 = getelementptr inbounds i8, ptr %278, i64 21
  %280 = call ptr @strrchr(ptr noundef %279, i32 noundef 47) #8
  %281 = icmp ne ptr %280, null
  br i1 %281, label %282, label %289

282:                                              ; preds = %273
  %283 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %284 = getelementptr inbounds %struct.s2n_debug_info, ptr %283, i32 0, i32 0
  %285 = load ptr, ptr %284, align 8, !tbaa !11
  %286 = getelementptr inbounds i8, ptr %285, i64 21
  %287 = call ptr @strrchr(ptr noundef %286, i32 noundef 47) #8
  %288 = getelementptr inbounds i8, ptr %287, i64 1
  br label %294

289:                                              ; preds = %273
  %290 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %291 = getelementptr inbounds %struct.s2n_debug_info, ptr %290, i32 0, i32 0
  %292 = load ptr, ptr %291, align 8, !tbaa !11
  %293 = getelementptr inbounds i8, ptr %292, i64 21
  br label %294

294:                                              ; preds = %289, %282
  %295 = phi ptr [ %288, %282 ], [ %293, %289 ]
  %296 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %297 = getelementptr inbounds %struct.s2n_debug_info, ptr %296, i32 0, i32 1
  store ptr %295, ptr %297, align 8, !tbaa !13
  %298 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %298, align 4, !tbaa !5
  %299 = call i32 @s2n_calculate_stacktrace()
  br label %300

300:                                              ; preds = %294
  br label %301

301:                                              ; preds = %300
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %447

302:                                              ; No predecessors!
  br label %303

303:                                              ; preds = %302
  br label %304

304:                                              ; preds = %303, %265
  br label %305

305:                                              ; preds = %304
  br label %306

306:                                              ; preds = %305
  call void @llvm.lifetime.start.p0(i64 64, ptr %33) #7
  br label %307

307:                                              ; preds = %306
  %308 = getelementptr inbounds [64 x i8], ptr %33, i64 0, i64 0
  %309 = call i32 @s2n_stuffer_read_bytes(ptr noundef %15, ptr noundef %308, i32 noundef 64)
  %310 = icmp sgt i32 %309, -1
  br i1 %310, label %312, label %311

311:                                              ; preds = %307
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %446

312:                                              ; preds = %307
  br label %313

313:                                              ; preds = %312
  br label %314

314:                                              ; preds = %313
  br label %315

315:                                              ; preds = %314
  %316 = getelementptr inbounds [64 x i8], ptr %33, i64 0, i64 0
  %317 = getelementptr inbounds [64 x i8], ptr %29, i64 0, i64 0
  %318 = call i32 @memcmp(ptr noundef %316, ptr noundef %317, i64 noundef 64) #8
  %319 = icmp eq i32 %318, 0
  br i1 %319, label %353, label %320

320:                                              ; preds = %315
  br label %321

321:                                              ; preds = %320
  br label %322

322:                                              ; preds = %321
  %323 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %324 = getelementptr inbounds %struct.s2n_debug_info, ptr %323, i32 0, i32 0
  store ptr @.str.3, ptr %324, align 8, !tbaa !11
  %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
  %327 = load ptr, ptr %326, align 8, !tbaa !11
  %328 = getelementptr inbounds i8, ptr %327, i64 21
  %329 = call ptr @strrchr(ptr noundef %328, i32 noundef 47) #8
  %330 = icmp ne ptr %329, null
  br i1 %330, label %331, label %338

331:                                              ; preds = %322
  %332 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %333 = getelementptr inbounds %struct.s2n_debug_info, ptr %332, i32 0, i32 0
  %334 = load ptr, ptr %333, align 8, !tbaa !11
  %335 = getelementptr inbounds i8, ptr %334, i64 21
  %336 = call ptr @strrchr(ptr noundef %335, i32 noundef 47) #8
  %337 = getelementptr inbounds i8, ptr %336, i64 1
  br label %343

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

343:                                              ; preds = %338, %331
  %344 = phi ptr [ %337, %331 ], [ %342, %338 ]
  %345 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %346 = getelementptr inbounds %struct.s2n_debug_info, ptr %345, i32 0, i32 1
  store ptr %344, ptr %346, align 8, !tbaa !13
  %347 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %347, align 4, !tbaa !5
  %348 = call i32 @s2n_calculate_stacktrace()
  br label %349

349:                                              ; preds = %343
  br label %350

350:                                              ; preds = %349
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %446

351:                                              ; No predecessors!
  br label %352

352:                                              ; preds = %351
  br label %353

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

354:                                              ; preds = %353
  br label %355

355:                                              ; preds = %354
  %356 = load i32, ptr %8, align 4, !tbaa !5
  %357 = icmp eq i32 %356, 0
  br i1 %357, label %361, label %358

358:                                              ; preds = %355
  %359 = load i32, ptr %8, align 4, !tbaa !5
  %360 = icmp eq i32 %359, 1
  br i1 %360, label %361, label %402

361:                                              ; preds = %358, %355
  br label %362

362:                                              ; preds = %361
  %363 = getelementptr inbounds %struct.s2n_drbg, ptr %23, i32 0, i32 3
  %364 = load i64, ptr %363, align 8, !tbaa !14
  %365 = icmp eq i64 %364, 2
  br i1 %365, label %399, label %366

366:                                              ; preds = %362
  br label %367

367:                                              ; preds = %366
  br label %368

368:                                              ; preds = %367
  %369 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %370 = getelementptr inbounds %struct.s2n_debug_info, ptr %369, i32 0, i32 0
  store ptr @.str.4, ptr %370, align 8, !tbaa !11
  %371 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %372 = getelementptr inbounds %struct.s2n_debug_info, ptr %371, i32 0, i32 0
  %373 = load ptr, ptr %372, align 8, !tbaa !11
  %374 = getelementptr inbounds i8, ptr %373, i64 21
  %375 = call ptr @strrchr(ptr noundef %374, i32 noundef 47) #8
  %376 = icmp ne ptr %375, null
  br i1 %376, label %377, label %384

377:                                              ; preds = %368
  %378 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %379 = getelementptr inbounds %struct.s2n_debug_info, ptr %378, i32 0, i32 0
  %380 = load ptr, ptr %379, align 8, !tbaa !11
  %381 = getelementptr inbounds i8, ptr %380, i64 21
  %382 = call ptr @strrchr(ptr noundef %381, i32 noundef 47) #8
  %383 = getelementptr inbounds i8, ptr %382, i64 1
  br label %389

384:                                              ; preds = %368
  %385 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %386 = getelementptr inbounds %struct.s2n_debug_info, ptr %385, i32 0, i32 0
  %387 = load ptr, ptr %386, align 8, !tbaa !11
  %388 = getelementptr inbounds i8, ptr %387, i64 21
  br label %389

389:                                              ; preds = %384, %377
  %390 = phi ptr [ %383, %377 ], [ %388, %384 ]
  %391 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %392 = getelementptr inbounds %struct.s2n_debug_info, ptr %391, i32 0, i32 1
  store ptr %390, ptr %392, align 8, !tbaa !13
  %393 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %393, align 4, !tbaa !5
  %394 = call i32 @s2n_calculate_stacktrace()
  br label %395

395:                                              ; preds = %389
  br label %396

396:                                              ; preds = %395
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %446

397:                                              ; No predecessors!
  br label %398

398:                                              ; preds = %397
  br label %399

399:                                              ; preds = %398, %362
  br label %400

400:                                              ; preds = %399
  br label %401

401:                                              ; preds = %400
  br label %435

402:                                              ; preds = %358
  br label %403

403:                                              ; preds = %402
  br label %404

404:                                              ; preds = %403
  %405 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %406 = getelementptr inbounds %struct.s2n_debug_info, ptr %405, i32 0, i32 0
  store ptr @.str.5, ptr %406, align 8, !tbaa !11
  %407 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %408 = getelementptr inbounds %struct.s2n_debug_info, ptr %407, i32 0, i32 0
  %409 = load ptr, ptr %408, align 8, !tbaa !11
  %410 = getelementptr inbounds i8, ptr %409, i64 21
  %411 = call ptr @strrchr(ptr noundef %410, i32 noundef 47) #8
  %412 = icmp ne ptr %411, null
  br i1 %412, label %413, label %420

413:                                              ; preds = %404
  %414 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %415 = getelementptr inbounds %struct.s2n_debug_info, ptr %414, i32 0, i32 0
  %416 = load ptr, ptr %415, align 8, !tbaa !11
  %417 = getelementptr inbounds i8, ptr %416, i64 21
  %418 = call ptr @strrchr(ptr noundef %417, i32 noundef 47) #8
  %419 = getelementptr inbounds i8, ptr %418, i64 1
  br label %425

420:                                              ; preds = %404
  %421 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %422 = getelementptr inbounds %struct.s2n_debug_info, ptr %421, i32 0, i32 0
  %423 = load ptr, ptr %422, align 8, !tbaa !11
  %424 = getelementptr inbounds i8, ptr %423, i64 21
  br label %425

425:                                              ; preds = %420, %413
  %426 = phi ptr [ %419, %413 ], [ %424, %420 ]
  %427 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %428 = getelementptr inbounds %struct.s2n_debug_info, ptr %427, i32 0, i32 1
  store ptr %426, ptr %428, align 8, !tbaa !13
  %429 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653221, ptr %429, align 4, !tbaa !5
  %430 = call i32 @s2n_calculate_stacktrace()
  br label %431

431:                                              ; preds = %425
  br label %432

432:                                              ; preds = %431
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %446

433:                                              ; No predecessors!
  br label %434

434:                                              ; preds = %433
  br label %435

435:                                              ; preds = %434, %401
  br label %436

436:                                              ; preds = %435
  %437 = call i32 @s2n_drbg_wipe(ptr noundef %23)
  %438 = getelementptr inbounds %struct.s2n_result, ptr %34, i32 0, i32 0
  store i32 %437, ptr %438, align 4
  %439 = getelementptr inbounds %struct.s2n_result, ptr %34, i32 0, i32 0
  %440 = load i32, ptr %439, align 4
  %441 = call zeroext i1 @s2n_result_is_ok(i32 %440)
  br i1 %441, label %443, label %442

442:                                              ; preds = %436
  store i32 -1, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %446

443:                                              ; preds = %436
  br label %444

444:                                              ; preds = %443
  br label %445

445:                                              ; preds = %444
  store i32 0, ptr %18, align 4
  br label %446

446:                                              ; preds = %445, %442, %432, %396, %350, %311
  call void @llvm.lifetime.end.p0(i64 64, ptr %33) #7
  br label %447

447:                                              ; preds = %446, %301, %261, %253, %241, %201, %193, %183
  call void @llvm.lifetime.end.p0(i64 24, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr %29) #7
  br label %448

448:                                              ; preds = %447, %173, %133
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #7
  br label %449

449:                                              ; preds = %448, %125, %114, %104, %95, %85, %78
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %22) #7
  %450 = load i32, ptr %18, align 4
  switch i32 %450, label %455 [
    i32 0, label %451
  ]

451:                                              ; preds = %449
  br label %452

452:                                              ; preds = %451
  %453 = load i32, ptr %21, align 4, !tbaa !5
  %454 = add nsw i32 %453, 1
  store i32 %454, ptr %21, align 4, !tbaa !5
  br label %68, !llvm.loop !17

455:                                              ; preds = %449, %71
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  %456 = load i32, ptr %18, align 4
  switch i32 %456, label %458 [
    i32 8, label %457
  ]

457:                                              ; preds = %455
  store i32 0, ptr %7, align 4
  store i32 1, ptr %18, align 4
  br label %458

458:                                              ; preds = %457, %455, %64, %53, %42
  %459 = call i32 @s2n_stuffer_free(ptr noundef %16)
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #7
  %460 = call i32 @s2n_stuffer_free(ptr noundef %15)
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #7
  %461 = call i32 @s2n_stuffer_free(ptr noundef %14)
  call void @llvm.lifetime.end.p0(i64 40, ptr %14) #7
  %462 = load i32, ptr %7, align 4
  ret i32 %462
}

declare i32 @s2n_stuffer_free(ptr noundef) #3

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

declare i32 @s2n_stuffer_alloc_from_hex(ptr noundef, ptr noundef) #3

declare i32 @s2n_rand_cleanup() #3

declare i32 @s2n_rand_set_callbacks(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #3

declare i32 @s2n_rand_init() #3

declare i32 @s2n_drbg_instantiate(ptr noundef, ptr noundef, i32 noundef) #3

declare i32 @s2n_stuffer_read_bytes(ptr noundef, ptr noundef, i32 noundef) #3

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 noundef) #5

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

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

declare i32 @s2n_calculate_stacktrace() #3

declare i32 @s2n_drbg_generate(ptr noundef, ptr noundef) #3

declare i32 @s2n_drbg_wipe(ptr noundef) #3

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"s2n_debug_info", !10, i64 0, !10, i64 8}
!13 = !{!12, !10, i64 8}
!14 = !{!15, !16, i64 32}
!15 = !{!"s2n_drbg", !16, i64 0, !10, i64 8, !7, i64 16, !16, i64 32}
!16 = !{!"long", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"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 }
%struct.s2n_stuffer = type { %struct.s2n_blob, i32, i32, i32, i8 }
%struct.s2n_blob = type { ptr, i32, i32, i8 }
%struct.s2n_drbg = type { i64, ptr, [16 x i8], i64 }

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @nist_fake_entropy_init_cleanup() #0

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

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

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

declare i32 @s2n_stuffer_read(ptr noundef, ptr noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
define dso_local i32 @check_drgb_version(i32 noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #0 {
  %7 = alloca %struct.s2n_stuffer, align 8
  %8 = alloca %struct.s2n_stuffer, align 8
  %9 = alloca %struct.s2n_stuffer, align 8
  %10 = alloca [48 x i8], align 16
  %11 = alloca %struct.s2n_drbg, align 8
  %12 = alloca %struct.s2n_blob, align 8
  %13 = alloca [16 x i8], align 16
  %14 = alloca [64 x i8], align 16
  %15 = alloca %struct.s2n_blob, align 8
  %16 = alloca [64 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %7, i8 0, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %8, i8 0, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %9, i8 0, i64 40, i1 false)
  %17 = call i32 @s2n_stuffer_alloc_from_hex(ptr noundef nonnull %7, ptr noundef %3) #8
  %18 = call zeroext i1 @s2n_result_is_ok(i32 %17)
  br i1 %18, label %19, label %109

19:                                               ; preds = %6
  %20 = call i32 @s2n_stuffer_alloc_from_hex(ptr noundef nonnull %8, ptr noundef %5) #8
  %21 = call zeroext i1 @s2n_result_is_ok(i32 %20)
  br i1 %21, label %22, label %109

22:                                               ; preds = %19
  %23 = call i32 @s2n_stuffer_alloc_from_hex(ptr noundef nonnull %9, ptr noundef %4) #8
  %24 = call zeroext i1 @s2n_result_is_ok(i32 %23)
  br i1 %24, label %.preheader, label %109

.preheader:                                       ; preds = %22
  %25 = getelementptr inbounds i8, ptr %11, i64 16
  %or.cond = icmp ult i32 %0, 2
  %26 = getelementptr inbounds i8, ptr %11, i64 32
  br label %27

27:                                               ; preds = %.preheader, %105
  %28 = phi i1 [ true, %.preheader ], [ %107, %105 ]
  %.02867 = phi i32 [ 0, %.preheader ], [ %106, %105 ]
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %10) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(48) %10, i8 0, i64 48, i1 false)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %11) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %11, i8 0, i64 40, i1 false)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %12, i8 0, i64 24, i1 false)
  %29 = call i32 @s2n_blob_init(ptr noundef nonnull %12, ptr noundef nonnull %10, i32 noundef %2) #8
  %30 = icmp sgt i32 %29, -1
  br i1 %30, label %31, label %.thread

31:                                               ; preds = %27
  %32 = call i32 @s2n_stuffer_read(ptr noundef nonnull %7, ptr noundef nonnull %12) #8
  %33 = icmp sgt i32 %32, -1
  br i1 %33, label %34, label %.thread

34:                                               ; preds = %31
  %35 = call i32 @s2n_rand_cleanup() #8
  %36 = call zeroext i1 @s2n_result_is_ok(i32 %35)
  br i1 %36, label %37, label %.thread

37:                                               ; preds = %34
  %38 = call i32 @s2n_rand_set_callbacks(ptr noundef nonnull @nist_fake_entropy_init_cleanup, ptr noundef nonnull @nist_fake_entropy_init_cleanup, ptr noundef %1, ptr noundef %1) #8
  %39 = icmp sgt i32 %38, -1
  br i1 %39, label %40, label %.thread

40:                                               ; preds = %37
  %41 = call i32 @s2n_rand_init() #8
  %42 = call zeroext i1 @s2n_result_is_ok(i32 %41)
  br i1 %42, label %43, label %.thread

43:                                               ; preds = %40
  %44 = call i32 @s2n_drbg_instantiate(ptr noundef nonnull %11, ptr noundef nonnull %12, i32 noundef %0) #8
  %45 = call zeroext i1 @s2n_result_is_ok(i32 %44)
  br i1 %45, label %46, label %.thread

46:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #8
  %47 = call i32 @s2n_stuffer_read_bytes(ptr noundef nonnull %9, ptr noundef nonnull %13, i32 noundef 16) #8
  %48 = icmp sgt i32 %47, -1
  br i1 %48, label %49, label %.thread46

49:                                               ; preds = %46
  %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(16) %13, ptr noundef nonnull dereferenceable(16) %25, i64 16)
  %50 = icmp eq i32 %bcmp, 0
  br i1 %50, label %59, label %51

51:                                               ; preds = %49
  %52 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str, ptr %52, align 8, !tbaa !5
  %53 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str, i64 21), i32 noundef 47) #9
  %.not = icmp eq ptr %53, null
  %54 = getelementptr inbounds i8, ptr %53, i64 1
  %55 = select i1 %.not, ptr getelementptr inbounds (i8, ptr @.str, i64 21), ptr %54
  %56 = getelementptr inbounds i8, ptr %52, i64 8
  store ptr %55, ptr %56, align 8, !tbaa !10
  %57 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %57, align 4, !tbaa !11
  %58 = call i32 @s2n_calculate_stacktrace() #8
  br label %.thread46

59:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %14) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %15, i8 0, i64 24, i1 false)
  %60 = call i32 @s2n_blob_init(ptr noundef nonnull %15, ptr noundef nonnull %14, i32 noundef 64) #8
  %61 = icmp sgt i32 %60, -1
  br i1 %61, label %62, label %.thread50

62:                                               ; preds = %59
  %63 = call i32 @s2n_drbg_generate(ptr noundef nonnull %11, ptr noundef nonnull %15) #8
  %64 = call zeroext i1 @s2n_result_is_ok(i32 %63)
  br i1 %64, label %65, label %.thread50

65:                                               ; preds = %62
  %66 = call i32 @s2n_stuffer_read_bytes(ptr noundef nonnull %9, ptr noundef nonnull %13, i32 noundef 16) #8
  %67 = icmp sgt i32 %66, -1
  br i1 %67, label %68, label %.thread50

68:                                               ; preds = %65
  %bcmp35 = call i32 @bcmp(ptr noundef nonnull dereferenceable(16) %13, ptr noundef nonnull dereferenceable(16) %25, i64 16)
  %69 = icmp eq i32 %bcmp35, 0
  br i1 %69, label %70, label %.thread50.sink.split

70:                                               ; preds = %68
  %71 = call i32 @s2n_drbg_generate(ptr noundef nonnull %11, ptr noundef nonnull %15) #8
  %72 = call zeroext i1 @s2n_result_is_ok(i32 %71)
  br i1 %72, label %73, label %.thread50

73:                                               ; preds = %70
  %74 = call i32 @s2n_stuffer_read_bytes(ptr noundef nonnull %9, ptr noundef nonnull %13, i32 noundef 16) #8
  %75 = icmp sgt i32 %74, -1
  br i1 %75, label %76, label %.thread50

76:                                               ; preds = %73
  %bcmp37 = call i32 @bcmp(ptr noundef nonnull dereferenceable(16) %13, ptr noundef nonnull dereferenceable(16) %25, i64 16)
  %77 = icmp eq i32 %bcmp37, 0
  br i1 %77, label %78, label %.thread50.sink.split

78:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %16) #8
  %79 = call i32 @s2n_stuffer_read_bytes(ptr noundef nonnull %8, ptr noundef nonnull %16, i32 noundef 64) #8
  %80 = icmp sgt i32 %79, -1
  br i1 %80, label %81, label %.thread54

81:                                               ; preds = %78
  %bcmp39 = call i32 @bcmp(ptr noundef nonnull dereferenceable(64) %16, ptr noundef nonnull dereferenceable(64) %14, i64 64)
  %82 = icmp eq i32 %bcmp39, 0
  br i1 %82, label %83, label %.thread54.sink.split

83:                                               ; preds = %81
  br i1 %or.cond, label %84, label %.thread54.sink.split

84:                                               ; preds = %83
  %85 = load i64, ptr %26, align 8, !tbaa !13
  %86 = icmp eq i64 %85, 2
  br i1 %86, label %87, label %.thread54.sink.split

87:                                               ; preds = %84
  %88 = call i32 @s2n_drbg_wipe(ptr noundef nonnull %11) #8
  %89 = call zeroext i1 @s2n_result_is_ok(i32 %88)
  br i1 %89, label %105, label %.thread54

.thread:                                          ; preds = %27, %31, %34, %37, %40, %43
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %10) #8
  br label %.loopexit

.thread46:                                        ; preds = %46, %51
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %10) #8
  br label %.loopexit

.thread50.sink.split:                             ; preds = %76, %68
  %.str.2.sink = phi ptr [ @.str.1, %68 ], [ @.str.2, %76 ]
  %.sink95 = phi ptr [ getelementptr inbounds (i8, ptr @.str.1, i64 21), %68 ], [ getelementptr inbounds (i8, ptr @.str.2, i64 21), %76 ]
  %90 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr %.str.2.sink, ptr %90, align 8, !tbaa !5
  %91 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) %.sink95, i32 noundef 47) #9
  %.not38 = icmp eq ptr %91, null
  %92 = getelementptr inbounds i8, ptr %91, i64 1
  %93 = select i1 %.not38, ptr %.sink95, ptr %92
  %94 = getelementptr inbounds i8, ptr %90, i64 8
  store ptr %93, ptr %94, align 8, !tbaa !10
  %95 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653194, ptr %95, align 4, !tbaa !11
  %96 = call i32 @s2n_calculate_stacktrace() #8
  br label %.thread50

.thread50:                                        ; preds = %59, %62, %65, %70, %73, %.thread50.sink.split
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %10) #8
  br label %.loopexit

.thread54.sink.split:                             ; preds = %83, %84, %81
  %.str.4.sink = phi ptr [ @.str.3, %81 ], [ @.str.4, %84 ], [ @.str.5, %83 ]
  %.sink105 = phi ptr [ getelementptr inbounds (i8, ptr @.str.3, i64 21), %81 ], [ getelementptr inbounds (i8, ptr @.str.4, i64 21), %84 ], [ getelementptr inbounds (i8, ptr @.str.5, i64 21), %83 ]
  %.sink = phi i32 [ 402653194, %81 ], [ 402653194, %84 ], [ 402653221, %83 ]
  %.ph96 = phi i1 [ %28, %81 ], [ %28, %84 ], [ true, %83 ]
  %97 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr %.str.4.sink, ptr %97, align 8, !tbaa !5
  %98 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) %.sink105, i32 noundef 47) #9
  %.not42 = icmp eq ptr %98, null
  %99 = getelementptr inbounds i8, ptr %98, i64 1
  %100 = select i1 %.not42, ptr %.sink105, ptr %99
  %101 = getelementptr inbounds i8, ptr %97, i64 8
  store ptr %100, ptr %101, align 8, !tbaa !10
  %102 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 %.sink, ptr %102, align 4, !tbaa !11
  %103 = call i32 @s2n_calculate_stacktrace() #8
  br label %.thread54

.thread54:                                        ; preds = %78, %87, %.thread54.sink.split
  %104 = phi i1 [ %.ph96, %.thread54.sink.split ], [ %28, %87 ], [ %28, %78 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %10) #8
  br label %.loopexit

105:                                              ; preds = %87
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %16) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %10) #8
  %106 = add nuw nsw i32 %.02867, 1
  %107 = icmp ult i32 %.02867, 13
  %exitcond.not = icmp eq i32 %106, 14
  br i1 %exitcond.not, label %.loopexit, label %27, !llvm.loop !16

.loopexit:                                        ; preds = %105, %.thread54, %.thread50, %.thread46, %.thread
  %108 = phi i1 [ %104, %.thread54 ], [ %28, %.thread50 ], [ %28, %.thread46 ], [ %28, %.thread ], [ %107, %105 ]
  %spec.select = sext i1 %108 to i32
  br label %109

109:                                              ; preds = %.loopexit, %22, %19, %6
  %.6 = phi i32 [ -1, %6 ], [ -1, %19 ], [ -1, %22 ], [ %spec.select, %.loopexit ]
  %110 = call i32 @s2n_stuffer_free(ptr noundef nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #8
  %111 = call i32 @s2n_stuffer_free(ptr noundef nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #8
  %112 = call i32 @s2n_stuffer_free(ptr noundef nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #8
  ret i32 %.6
}

declare i32 @s2n_stuffer_free(ptr noundef) local_unnamed_addr #3

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

declare i32 @s2n_stuffer_alloc_from_hex(ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @s2n_rand_cleanup() local_unnamed_addr #3

declare i32 @s2n_rand_set_callbacks(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @s2n_rand_init() local_unnamed_addr #3

declare i32 @s2n_drbg_instantiate(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

declare i32 @s2n_stuffer_read_bytes(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

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

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

declare i32 @s2n_calculate_stacktrace() local_unnamed_addr #3

declare i32 @s2n_drbg_generate(ptr noundef, ptr noundef) local_unnamed_addr #3

declare i32 @s2n_drbg_wipe(ptr noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #7

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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { "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 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 #7 = { nofree nounwind willreturn memory(argmem: read) }
attributes #8 = { nounwind }
attributes #9 = { 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, !7, i64 0}
!6 = !{!"s2n_debug_info", !7, i64 0, !7, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!6, !7, i64 8}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !8, i64 0}
!13 = !{!14, !15, i64 32}
!14 = !{!"s2n_drbg", !15, i64 0, !7, i64 8, !8, i64 16, !15, i64 32}
!15 = !{!"long", !8, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass