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

; 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_fingerprint_hash = type { i32, 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_fingerprint = type { i64, ptr, ptr, %struct.s2n_hash_state, %struct.s2n_stuffer }
%struct.s2n_hash_state = type { ptr, i32, i8, i64, %union.anon }
%union.anon = type { %struct.s2n_hash_evp_digest }
%struct.s2n_hash_evp_digest = type { %struct.s2n_evp_digest, %struct.s2n_evp_digest }
%struct.s2n_evp_digest = type { ptr, ptr }
%struct.s2n_fingerprint_method = type { i32, i32, ptr }

@_s2n_debug_info = external thread_local global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local global i32, align 4
@.str.8 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [92 x i8], align 1

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

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

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

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

declare i32 @s2n_calculate_stacktrace() #4

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_fingerprint_get_hash(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3) #6 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %struct.s2n_fingerprint_hash, align 8
  %13 = alloca %struct.s2n_stuffer, align 8
  %14 = alloca %struct.s2n_result, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  br label %15

15:                                               ; preds = %4
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  %17 = icmp ne ptr %16, null
  br i1 %17, label %49, label %18

18:                                               ; preds = %15
  br label %19

19:                                               ; preds = %18
  br label %20

20:                                               ; preds = %19
  %21 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %22 = getelementptr inbounds %struct.s2n_debug_info, ptr %21, i32 0, i32 0
  store ptr @.str.8, ptr %22, align 8, !tbaa !11
  %23 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %24 = getelementptr inbounds %struct.s2n_debug_info, ptr %23, i32 0, i32 0
  %25 = load ptr, ptr %24, align 8, !tbaa !11
  %26 = getelementptr inbounds i8, ptr %25, i64 21
  %27 = call ptr @strrchr(ptr noundef %26, i32 noundef 47) #7
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %36

29:                                               ; preds = %20
  %30 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %31 = getelementptr inbounds %struct.s2n_debug_info, ptr %30, i32 0, i32 0
  %32 = load ptr, ptr %31, align 8, !tbaa !11
  %33 = getelementptr inbounds i8, ptr %32, i64 21
  %34 = call ptr @strrchr(ptr noundef %33, i32 noundef 47) #7
  %35 = getelementptr inbounds i8, ptr %34, i64 1
  br label %41

36:                                               ; preds = %20
  %37 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %38 = getelementptr inbounds %struct.s2n_debug_info, ptr %37, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8, !tbaa !11
  %40 = getelementptr inbounds i8, ptr %39, i64 21
  br label %41

41:                                               ; preds = %36, %29
  %42 = phi ptr [ %35, %29 ], [ %40, %36 ]
  %43 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %44 = getelementptr inbounds %struct.s2n_debug_info, ptr %43, i32 0, i32 1
  store ptr %42, ptr %44, align 8, !tbaa !13
  %45 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762089, ptr %45, align 4, !tbaa !9
  %46 = call i32 @s2n_calculate_stacktrace()
  br label %47

47:                                               ; preds = %41
  store i32 -1, ptr %5, align 4
  br label %302

48:                                               ; No predecessors!
  br label %49

49:                                               ; preds = %48, %15
  br label %50

50:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.s2n_fingerprint, ptr %51, i32 0, i32 1
  %53 = load ptr, ptr %52, align 8, !tbaa !14
  store ptr %53, ptr %10, align 8, !tbaa !5
  br label %54

54:                                               ; preds = %50
  %55 = load ptr, ptr %10, align 8, !tbaa !5
  %56 = icmp ne ptr %55, null
  br i1 %56, label %90, label %57

57:                                               ; preds = %54
  br label %58

58:                                               ; preds = %57
  br label %59

59:                                               ; preds = %58
  %60 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %61 = getelementptr inbounds %struct.s2n_debug_info, ptr %60, i32 0, i32 0
  store ptr @.str.9, ptr %61, align 8, !tbaa !11
  %62 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %63 = getelementptr inbounds %struct.s2n_debug_info, ptr %62, i32 0, i32 0
  %64 = load ptr, ptr %63, align 8, !tbaa !11
  %65 = getelementptr inbounds i8, ptr %64, i64 21
  %66 = call ptr @strrchr(ptr noundef %65, i32 noundef 47) #7
  %67 = icmp ne ptr %66, null
  br i1 %67, label %68, label %75

68:                                               ; preds = %59
  %69 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %70 = getelementptr inbounds %struct.s2n_debug_info, ptr %69, i32 0, i32 0
  %71 = load ptr, ptr %70, align 8, !tbaa !11
  %72 = getelementptr inbounds i8, ptr %71, i64 21
  %73 = call ptr @strrchr(ptr noundef %72, i32 noundef 47) #7
  %74 = getelementptr inbounds i8, ptr %73, i64 1
  br label %80

75:                                               ; preds = %59
  %76 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %77 = getelementptr inbounds %struct.s2n_debug_info, ptr %76, i32 0, i32 0
  %78 = load ptr, ptr %77, align 8, !tbaa !11
  %79 = getelementptr inbounds i8, ptr %78, i64 21
  br label %80

80:                                               ; preds = %75, %68
  %81 = phi ptr [ %74, %68 ], [ %79, %75 ]
  %82 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %83 = getelementptr inbounds %struct.s2n_debug_info, ptr %82, i32 0, i32 1
  store ptr %81, ptr %83, align 8, !tbaa !13
  %84 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %84, align 4, !tbaa !9
  %85 = call i32 @s2n_calculate_stacktrace()
  br label %86

86:                                               ; preds = %80
  br label %87

87:                                               ; preds = %86
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %301

88:                                               ; No predecessors!
  br label %89

89:                                               ; preds = %88
  br label %90

90:                                               ; preds = %89, %54
  br label %91

91:                                               ; preds = %90
  br label %92

92:                                               ; preds = %91
  br label %93

93:                                               ; preds = %92
  %94 = load i32, ptr %7, align 4, !tbaa !9
  %95 = load ptr, ptr %10, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.s2n_fingerprint_method, ptr %95, i32 0, i32 1
  %97 = load i32, ptr %96, align 4, !tbaa !20
  %98 = icmp uge i32 %94, %97
  br i1 %98, label %132, label %99

99:                                               ; preds = %93
  br label %100

100:                                              ; preds = %99
  br label %101

101:                                              ; preds = %100
  %102 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %103 = getelementptr inbounds %struct.s2n_debug_info, ptr %102, i32 0, i32 0
  store ptr @.str.10, ptr %103, align 8, !tbaa !11
  %104 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %105 = getelementptr inbounds %struct.s2n_debug_info, ptr %104, i32 0, i32 0
  %106 = load ptr, ptr %105, align 8, !tbaa !11
  %107 = getelementptr inbounds i8, ptr %106, i64 21
  %108 = call ptr @strrchr(ptr noundef %107, i32 noundef 47) #7
  %109 = icmp ne ptr %108, null
  br i1 %109, label %110, label %117

110:                                              ; preds = %101
  %111 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %112 = getelementptr inbounds %struct.s2n_debug_info, ptr %111, i32 0, i32 0
  %113 = load ptr, ptr %112, align 8, !tbaa !11
  %114 = getelementptr inbounds i8, ptr %113, i64 21
  %115 = call ptr @strrchr(ptr noundef %114, i32 noundef 47) #7
  %116 = getelementptr inbounds i8, ptr %115, i64 1
  br label %122

117:                                              ; preds = %101
  %118 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %119 = getelementptr inbounds %struct.s2n_debug_info, ptr %118, i32 0, i32 0
  %120 = load ptr, ptr %119, align 8, !tbaa !11
  %121 = getelementptr inbounds i8, ptr %120, i64 21
  br label %122

122:                                              ; preds = %117, %110
  %123 = phi ptr [ %116, %110 ], [ %121, %117 ]
  %124 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %125 = getelementptr inbounds %struct.s2n_debug_info, ptr %124, i32 0, i32 1
  store ptr %123, ptr %125, align 8, !tbaa !13
  %126 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762120, ptr %126, align 4, !tbaa !9
  %127 = call i32 @s2n_calculate_stacktrace()
  br label %128

128:                                              ; preds = %122
  br label %129

129:                                              ; preds = %128
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %301

130:                                              ; No predecessors!
  br label %131

131:                                              ; preds = %130
  br label %132

132:                                              ; preds = %131, %93
  br label %133

133:                                              ; preds = %132
  br label %134

134:                                              ; preds = %133
  br label %135

135:                                              ; preds = %134
  %136 = load ptr, ptr %8, align 8, !tbaa !5
  %137 = icmp ne ptr %136, null
  br i1 %137, label %171, label %138

138:                                              ; preds = %135
  br label %139

139:                                              ; preds = %138
  br label %140

140:                                              ; preds = %139
  %141 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %142 = getelementptr inbounds %struct.s2n_debug_info, ptr %141, i32 0, i32 0
  store ptr @.str.11, ptr %142, align 8, !tbaa !11
  %143 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %144 = getelementptr inbounds %struct.s2n_debug_info, ptr %143, i32 0, i32 0
  %145 = load ptr, ptr %144, align 8, !tbaa !11
  %146 = getelementptr inbounds i8, ptr %145, i64 21
  %147 = call ptr @strrchr(ptr noundef %146, i32 noundef 47) #7
  %148 = icmp ne ptr %147, null
  br i1 %148, label %149, label %156

149:                                              ; preds = %140
  %150 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %151 = getelementptr inbounds %struct.s2n_debug_info, ptr %150, i32 0, i32 0
  %152 = load ptr, ptr %151, align 8, !tbaa !11
  %153 = getelementptr inbounds i8, ptr %152, i64 21
  %154 = call ptr @strrchr(ptr noundef %153, i32 noundef 47) #7
  %155 = getelementptr inbounds i8, ptr %154, i64 1
  br label %161

156:                                              ; preds = %140
  %157 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %158 = getelementptr inbounds %struct.s2n_debug_info, ptr %157, i32 0, i32 0
  %159 = load ptr, ptr %158, align 8, !tbaa !11
  %160 = getelementptr inbounds i8, ptr %159, i64 21
  br label %161

161:                                              ; preds = %156, %149
  %162 = phi ptr [ %155, %149 ], [ %160, %156 ]
  %163 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %164 = getelementptr inbounds %struct.s2n_debug_info, ptr %163, i32 0, i32 1
  store ptr %162, ptr %164, align 8, !tbaa !13
  %165 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762089, ptr %165, align 4, !tbaa !9
  %166 = call i32 @s2n_calculate_stacktrace()
  br label %167

167:                                              ; preds = %161
  br label %168

168:                                              ; preds = %167
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %301

169:                                              ; No predecessors!
  br label %170

170:                                              ; preds = %169
  br label %171

171:                                              ; preds = %170, %135
  br label %172

172:                                              ; preds = %171
  br label %173

173:                                              ; preds = %172
  br label %174

174:                                              ; preds = %173
  %175 = load ptr, ptr %9, align 8, !tbaa !5
  %176 = icmp ne ptr %175, null
  br i1 %176, label %210, label %177

177:                                              ; preds = %174
  br label %178

178:                                              ; preds = %177
  br label %179

179:                                              ; preds = %178
  %180 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %181 = getelementptr inbounds %struct.s2n_debug_info, ptr %180, i32 0, i32 0
  store ptr @.str.12, ptr %181, align 8, !tbaa !11
  %182 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %183 = getelementptr inbounds %struct.s2n_debug_info, ptr %182, i32 0, i32 0
  %184 = load ptr, ptr %183, align 8, !tbaa !11
  %185 = getelementptr inbounds i8, ptr %184, i64 21
  %186 = call ptr @strrchr(ptr noundef %185, i32 noundef 47) #7
  %187 = icmp ne ptr %186, null
  br i1 %187, label %188, label %195

188:                                              ; preds = %179
  %189 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %190 = getelementptr inbounds %struct.s2n_debug_info, ptr %189, i32 0, i32 0
  %191 = load ptr, ptr %190, align 8, !tbaa !11
  %192 = getelementptr inbounds i8, ptr %191, i64 21
  %193 = call ptr @strrchr(ptr noundef %192, i32 noundef 47) #7
  %194 = getelementptr inbounds i8, ptr %193, i64 1
  br label %200

195:                                              ; preds = %179
  %196 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %197 = getelementptr inbounds %struct.s2n_debug_info, ptr %196, i32 0, i32 0
  %198 = load ptr, ptr %197, align 8, !tbaa !11
  %199 = getelementptr inbounds i8, ptr %198, i64 21
  br label %200

200:                                              ; preds = %195, %188
  %201 = phi ptr [ %194, %188 ], [ %199, %195 ]
  %202 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %203 = getelementptr inbounds %struct.s2n_debug_info, ptr %202, i32 0, i32 1
  store ptr %201, ptr %203, align 8, !tbaa !13
  %204 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762089, ptr %204, align 4, !tbaa !9
  %205 = call i32 @s2n_calculate_stacktrace()
  br label %206

206:                                              ; preds = %200
  br label %207

207:                                              ; preds = %206
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %301

208:                                              ; No predecessors!
  br label %209

209:                                              ; preds = %208
  br label %210

210:                                              ; preds = %209, %174
  br label %211

211:                                              ; preds = %210
  br label %212

212:                                              ; preds = %211
  %213 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 0, ptr %213, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #8
  %214 = getelementptr inbounds %struct.s2n_fingerprint_hash, ptr %12, i32 0, i32 0
  store i32 0, ptr %214, align 8, !tbaa !22
  %215 = getelementptr inbounds %struct.s2n_fingerprint_hash, ptr %12, i32 0, i32 1
  store ptr null, ptr %215, align 8, !tbaa !24
  %216 = getelementptr inbounds %struct.s2n_fingerprint_hash, ptr %12, i32 0, i32 2
  %217 = load ptr, ptr %6, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.s2n_fingerprint, ptr %217, i32 0, i32 3
  store ptr %218, ptr %216, align 8, !tbaa !25
  br label %219

219:                                              ; preds = %212
  %220 = load ptr, ptr %6, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.s2n_fingerprint, ptr %220, i32 0, i32 3
  %222 = call i32 @s2n_hash_reset(ptr noundef %221)
  %223 = icmp sgt i32 %222, -1
  br i1 %223, label %225, label %224

224:                                              ; preds = %219
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %300

225:                                              ; preds = %219
  br label %226

226:                                              ; preds = %225
  br label %227

227:                                              ; preds = %226
  call void @llvm.lifetime.start.p0(i64 40, ptr %13) #8
  call void @llvm.memset.p0.i64(ptr align 8 %13, i8 0, i64 40, i1 false)
  br label %228

228:                                              ; preds = %227
  %229 = getelementptr inbounds %struct.s2n_stuffer, ptr %13, i32 0, i32 0
  %230 = load ptr, ptr %8, align 8, !tbaa !5
  %231 = load i32, ptr %7, align 4, !tbaa !9
  %232 = call i32 @s2n_blob_init(ptr noundef %229, ptr noundef %230, i32 noundef %231)
  %233 = icmp sgt i32 %232, -1
  br i1 %233, label %235, label %234

234:                                              ; preds = %228
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %299

235:                                              ; preds = %228
  br label %236

236:                                              ; preds = %235
  br label %237

237:                                              ; preds = %236
  br label %238

238:                                              ; preds = %237
  %239 = load ptr, ptr %6, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.s2n_fingerprint, ptr %239, i32 0, i32 2
  %241 = load ptr, ptr %240, align 8, !tbaa !26
  %242 = icmp ne ptr %241, null
  br i1 %242, label %276, label %243

243:                                              ; preds = %238
  br label %244

244:                                              ; preds = %243
  br label %245

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

254:                                              ; preds = %245
  %255 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %256 = getelementptr inbounds %struct.s2n_debug_info, ptr %255, i32 0, i32 0
  %257 = load ptr, ptr %256, align 8, !tbaa !11
  %258 = getelementptr inbounds i8, ptr %257, i64 21
  %259 = call ptr @strrchr(ptr noundef %258, i32 noundef 47) #7
  %260 = getelementptr inbounds i8, ptr %259, i64 1
  br label %266

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

266:                                              ; preds = %261, %254
  %267 = phi ptr [ %260, %254 ], [ %265, %261 ]
  %268 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %269 = getelementptr inbounds %struct.s2n_debug_info, ptr %268, i32 0, i32 1
  store ptr %267, ptr %269, align 8, !tbaa !13
  %270 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762112, ptr %270, align 4, !tbaa !9
  %271 = call i32 @s2n_calculate_stacktrace()
  br label %272

272:                                              ; preds = %266
  br label %273

273:                                              ; preds = %272
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %299

274:                                              ; No predecessors!
  br label %275

275:                                              ; preds = %274
  br label %276

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

277:                                              ; preds = %276
  br label %278

278:                                              ; preds = %277
  br label %279

279:                                              ; preds = %278
  %280 = load ptr, ptr %10, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.s2n_fingerprint_method, ptr %280, i32 0, i32 2
  %282 = load ptr, ptr %281, align 8, !tbaa !27
  %283 = load ptr, ptr %6, align 8, !tbaa !5
  %284 = call i32 %282(ptr noundef %283, ptr noundef %12, ptr noundef %13)
  %285 = getelementptr inbounds %struct.s2n_result, ptr %14, i32 0, i32 0
  store i32 %284, ptr %285, align 4
  %286 = getelementptr inbounds %struct.s2n_result, ptr %14, i32 0, i32 0
  %287 = load i32, ptr %286, align 4
  %288 = call zeroext i1 @s2n_result_is_ok(i32 %287)
  br i1 %288, label %290, label %289

289:                                              ; preds = %279
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %299

290:                                              ; preds = %279
  br label %291

291:                                              ; preds = %290
  br label %292

292:                                              ; preds = %291
  %293 = getelementptr inbounds %struct.s2n_stuffer, ptr %13, i32 0, i32 2
  %294 = load i32, ptr %293, align 4, !tbaa !28
  %295 = getelementptr inbounds %struct.s2n_stuffer, ptr %13, i32 0, i32 1
  %296 = load i32, ptr %295, align 8, !tbaa !29
  %297 = sub i32 %294, %296
  %298 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 %297, ptr %298, align 4, !tbaa !9
  store i32 0, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %299

299:                                              ; preds = %292, %289, %273, %234
  call void @llvm.lifetime.end.p0(i64 40, ptr %13) #8
  br label %300

300:                                              ; preds = %299, %224
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #8
  br label %301

301:                                              ; preds = %300, %207, %168, %129, %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %302

302:                                              ; preds = %301, %47
  %303 = load i32, ptr %5, align 4
  ret i32 %303
}

declare i32 @s2n_hash_reset(ptr noundef) #4

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"s2n_debug_info", !6, i64 0, !6, i64 8}
!13 = !{!12, !6, i64 8}
!14 = !{!15, !6, i64 8}
!15 = !{!"s2n_fingerprint", !16, i64 0, !6, i64 8, !6, i64 16, !17, i64 24, !18, i64 80}
!16 = !{!"long", !7, i64 0}
!17 = !{!"s2n_hash_state", !6, i64 0, !10, i64 8, !7, i64 12, !16, i64 16, !7, i64 24}
!18 = !{!"s2n_stuffer", !19, i64 0, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 36, !10, i64 36}
!19 = !{!"s2n_blob", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16}
!20 = !{!21, !10, i64 4}
!21 = !{!"s2n_fingerprint_method", !10, i64 0, !10, i64 4, !6, i64 8}
!22 = !{!23, !10, i64 0}
!23 = !{!"s2n_fingerprint_hash", !10, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!23, !6, i64 8}
!25 = !{!23, !6, i64 16}
!26 = !{!15, !6, i64 16}
!27 = !{!21, !6, i64 8}
!28 = !{!18, !10, i64 28}
!29 = !{!18, !10, i64 24}


; 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_fingerprint_hash = type { i32, ptr, ptr }
%struct.s2n_stuffer = type { %struct.s2n_blob, i32, i32, i32, i8 }
%struct.s2n_blob = type { ptr, i32, i32, i8 }

@_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.8 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [92 x i8], align 1

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

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

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

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

declare i32 @s2n_calculate_stacktrace() local_unnamed_addr #4

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @s2n_fingerprint_get_hash(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef writeonly %3) local_unnamed_addr #6 {
  %5 = alloca %struct.s2n_fingerprint_hash, align 8
  %6 = alloca %struct.s2n_stuffer, align 8
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %7, label %15

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

15:                                               ; preds = %4
  %16 = getelementptr inbounds i8, ptr %0, i64 8
  %17 = load ptr, ptr %16, align 8, !tbaa !13
  %.not28 = icmp eq ptr %17, null
  br i1 %.not28, label %18, label %26

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

26:                                               ; preds = %15
  %27 = getelementptr inbounds i8, ptr %17, i64 4
  %28 = load i32, ptr %27, align 4, !tbaa !19
  %.not30 = icmp ugt i32 %28, %1
  br i1 %.not30, label %29, label %37

29:                                               ; preds = %26
  %30 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.10, ptr %30, align 8, !tbaa !5
  %31 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.10, i64 21), i32 noundef 47) #7
  %.not31 = icmp eq ptr %31, null
  %32 = getelementptr inbounds i8, ptr %31, i64 1
  %33 = select i1 %.not31, ptr getelementptr inbounds (i8, ptr @.str.10, i64 21), ptr %32
  %34 = getelementptr inbounds i8, ptr %30, i64 8
  store ptr %33, ptr %34, align 8, !tbaa !10
  %35 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762120, ptr %35, align 4, !tbaa !11
  %36 = tail call i32 @s2n_calculate_stacktrace() #8
  br label %88

37:                                               ; preds = %26
  %.not32 = icmp eq ptr %2, null
  br i1 %.not32, label %38, label %46

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

46:                                               ; preds = %37
  %.not34 = icmp eq ptr %3, null
  br i1 %.not34, label %47, label %55

47:                                               ; preds = %46
  %48 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.12, ptr %48, align 8, !tbaa !5
  %49 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.12, i64 21), i32 noundef 47) #7
  %.not35 = icmp eq ptr %49, null
  %50 = getelementptr inbounds i8, ptr %49, i64 1
  %51 = select i1 %.not35, ptr getelementptr inbounds (i8, ptr @.str.12, i64 21), ptr %50
  %52 = getelementptr inbounds i8, ptr %48, i64 8
  store ptr %51, ptr %52, align 8, !tbaa !10
  %53 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762089, ptr %53, align 4, !tbaa !11
  %54 = tail call i32 @s2n_calculate_stacktrace() #8
  br label %88

55:                                               ; preds = %46
  store i32 0, ptr %3, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #8
  store i32 0, ptr %5, align 8, !tbaa !21
  %56 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr null, ptr %56, align 8, !tbaa !23
  %57 = getelementptr inbounds i8, ptr %5, i64 16
  %58 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %58, ptr %57, align 8, !tbaa !24
  %59 = tail call i32 @s2n_hash_reset(ptr noundef nonnull %58) #8
  %60 = icmp sgt i32 %59, -1
  br i1 %60, label %61, label %87

61:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %6, i8 0, i64 40, i1 false)
  %62 = call i32 @s2n_blob_init(ptr noundef nonnull %6, ptr noundef nonnull %2, i32 noundef %1) #8
  %63 = icmp sgt i32 %62, -1
  br i1 %63, label %64, label %86

64:                                               ; preds = %61
  %65 = getelementptr inbounds i8, ptr %0, i64 16
  %66 = load ptr, ptr %65, align 8, !tbaa !25
  %.not36 = icmp eq ptr %66, null
  br i1 %.not36, label %67, label %75

67:                                               ; preds = %64
  %68 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.13, ptr %68, align 8, !tbaa !5
  %69 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.13, i64 21), i32 noundef 47) #7
  %.not37 = icmp eq ptr %69, null
  %70 = getelementptr inbounds i8, ptr %69, i64 1
  %71 = select i1 %.not37, ptr getelementptr inbounds (i8, ptr @.str.13, i64 21), ptr %70
  %72 = getelementptr inbounds i8, ptr %68, i64 8
  store ptr %71, ptr %72, align 8, !tbaa !10
  %73 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762112, ptr %73, align 4, !tbaa !11
  %74 = call i32 @s2n_calculate_stacktrace() #8
  br label %86

75:                                               ; preds = %64
  %76 = getelementptr inbounds i8, ptr %17, i64 8
  %77 = load ptr, ptr %76, align 8, !tbaa !26
  %78 = call i32 %77(ptr noundef nonnull %0, ptr noundef nonnull %5, ptr noundef nonnull %6) #8
  %79 = call zeroext i1 @s2n_result_is_ok(i32 %78)
  br i1 %79, label %80, label %86

80:                                               ; preds = %75
  %81 = getelementptr inbounds i8, ptr %6, i64 28
  %82 = load i32, ptr %81, align 4, !tbaa !27
  %83 = getelementptr inbounds i8, ptr %6, i64 24
  %84 = load i32, ptr %83, align 8, !tbaa !28
  %85 = sub i32 %82, %84
  store i32 %85, ptr %3, align 4, !tbaa !11
  br label %86

86:                                               ; preds = %75, %61, %80, %67
  %.0 = phi i32 [ 0, %80 ], [ -1, %67 ], [ -1, %61 ], [ -1, %75 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #8
  br label %87

87:                                               ; preds = %55, %86
  %.1 = phi i32 [ %.0, %86 ], [ -1, %55 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  br label %88

88:                                               ; preds = %18, %29, %38, %47, %87, %7
  %.3 = phi i32 [ -1, %7 ], [ %.1, %87 ], [ -1, %47 ], [ -1, %38 ], [ -1, %29 ], [ -1, %18 ]
  ret i32 %.3
}

declare i32 @s2n_hash_reset(ptr noundef) local_unnamed_addr #4

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

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

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

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


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