; 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_stuffer = type { %struct.s2n_blob, i32, i32, i32, i8 }
%struct.s2n_blob = type { ptr, i32, i32, i8 }
%struct.s2n_fingerprint_hash = type { i32, ptr, ptr }
%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.17 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.22 = 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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_fingerprint_get_raw(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_stuffer, align 8
  %13 = alloca %struct.s2n_fingerprint_hash, 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.17, 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 %288

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.18, 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 %287

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 = icmp ugt i32 %94, 0
  br i1 %95, label %129, label %96

96:                                               ; preds = %93
  br label %97

97:                                               ; preds = %96
  br label %98

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

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

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

119:                                              ; preds = %114, %107
  %120 = phi ptr [ %113, %107 ], [ %118, %114 ]
  %121 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %122 = getelementptr inbounds %struct.s2n_debug_info, ptr %121, i32 0, i32 1
  store ptr %120, ptr %122, align 8, !tbaa !13
  %123 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762120, ptr %123, align 4, !tbaa !9
  %124 = call i32 @s2n_calculate_stacktrace()
  br label %125

125:                                              ; preds = %119
  br label %126

126:                                              ; preds = %125
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %287

127:                                              ; No predecessors!
  br label %128

128:                                              ; preds = %127
  br label %129

129:                                              ; preds = %128, %93
  br label %130

130:                                              ; preds = %129
  br label %131

131:                                              ; preds = %130
  br label %132

132:                                              ; preds = %131
  %133 = load ptr, ptr %8, align 8, !tbaa !5
  %134 = icmp ne ptr %133, null
  br i1 %134, label %168, label %135

135:                                              ; preds = %132
  br label %136

136:                                              ; preds = %135
  br label %137

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

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

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

158:                                              ; preds = %153, %146
  %159 = phi ptr [ %152, %146 ], [ %157, %153 ]
  %160 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %161 = getelementptr inbounds %struct.s2n_debug_info, ptr %160, i32 0, i32 1
  store ptr %159, ptr %161, align 8, !tbaa !13
  %162 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762089, ptr %162, align 4, !tbaa !9
  %163 = call i32 @s2n_calculate_stacktrace()
  br label %164

164:                                              ; preds = %158
  br label %165

165:                                              ; preds = %164
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %287

166:                                              ; No predecessors!
  br label %167

167:                                              ; preds = %166
  br label %168

168:                                              ; preds = %167, %132
  br label %169

169:                                              ; preds = %168
  br label %170

170:                                              ; preds = %169
  br label %171

171:                                              ; preds = %170
  %172 = load ptr, ptr %9, align 8, !tbaa !5
  %173 = icmp ne ptr %172, null
  br i1 %173, label %207, label %174

174:                                              ; preds = %171
  br label %175

175:                                              ; preds = %174
  br label %176

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

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

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

197:                                              ; preds = %192, %185
  %198 = phi ptr [ %191, %185 ], [ %196, %192 ]
  %199 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %200 = getelementptr inbounds %struct.s2n_debug_info, ptr %199, i32 0, i32 1
  store ptr %198, ptr %200, align 8, !tbaa !13
  %201 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762089, ptr %201, align 4, !tbaa !9
  %202 = call i32 @s2n_calculate_stacktrace()
  br label %203

203:                                              ; preds = %197
  br label %204

204:                                              ; preds = %203
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %287

205:                                              ; No predecessors!
  br label %206

206:                                              ; preds = %205
  br label %207

207:                                              ; preds = %206, %171
  br label %208

208:                                              ; preds = %207
  br label %209

209:                                              ; preds = %208
  %210 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 0, ptr %210, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 40, ptr %12) #8
  call void @llvm.memset.p0.i64(ptr align 8 %12, i8 0, i64 40, i1 false)
  br label %211

211:                                              ; preds = %209
  %212 = getelementptr inbounds %struct.s2n_stuffer, ptr %12, i32 0, i32 0
  %213 = load ptr, ptr %8, align 8, !tbaa !5
  %214 = load i32, ptr %7, align 4, !tbaa !9
  %215 = call i32 @s2n_blob_init(ptr noundef %212, ptr noundef %213, i32 noundef %214)
  %216 = icmp sgt i32 %215, -1
  br i1 %216, label %218, label %217

217:                                              ; preds = %211
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %286

218:                                              ; preds = %211
  br label %219

219:                                              ; preds = %218
  br label %220

220:                                              ; preds = %219
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #8
  %221 = getelementptr inbounds %struct.s2n_fingerprint_hash, ptr %13, i32 0, i32 0
  store i32 0, ptr %221, align 8, !tbaa !20
  %222 = getelementptr inbounds %struct.s2n_fingerprint_hash, ptr %13, i32 0, i32 1
  store ptr %12, ptr %222, align 8, !tbaa !22
  %223 = getelementptr inbounds %struct.s2n_fingerprint_hash, ptr %13, i32 0, i32 2
  store ptr null, ptr %223, align 8, !tbaa !23
  br label %224

224:                                              ; preds = %220
  %225 = load ptr, ptr %6, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.s2n_fingerprint, ptr %225, i32 0, i32 2
  %227 = load ptr, ptr %226, align 8, !tbaa !24
  %228 = icmp ne ptr %227, null
  br i1 %228, label %262, label %229

229:                                              ; preds = %224
  br label %230

230:                                              ; preds = %229
  br label %231

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

240:                                              ; preds = %231
  %241 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %242 = getelementptr inbounds %struct.s2n_debug_info, ptr %241, i32 0, i32 0
  %243 = load ptr, ptr %242, align 8, !tbaa !11
  %244 = getelementptr inbounds i8, ptr %243, i64 21
  %245 = call ptr @strrchr(ptr noundef %244, i32 noundef 47) #7
  %246 = getelementptr inbounds i8, ptr %245, i64 1
  br label %252

247:                                              ; preds = %231
  %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
  br label %252

252:                                              ; preds = %247, %240
  %253 = phi ptr [ %246, %240 ], [ %251, %247 ]
  %254 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %255 = getelementptr inbounds %struct.s2n_debug_info, ptr %254, i32 0, i32 1
  store ptr %253, ptr %255, align 8, !tbaa !13
  %256 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762112, ptr %256, align 4, !tbaa !9
  %257 = call i32 @s2n_calculate_stacktrace()
  br label %258

258:                                              ; preds = %252
  br label %259

259:                                              ; preds = %258
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %285

260:                                              ; No predecessors!
  br label %261

261:                                              ; preds = %260
  br label %262

262:                                              ; preds = %261, %224
  br label %263

263:                                              ; preds = %262
  br label %264

264:                                              ; preds = %263
  br label %265

265:                                              ; preds = %264
  %266 = load ptr, ptr %10, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct.s2n_fingerprint_method, ptr %266, i32 0, i32 2
  %268 = load ptr, ptr %267, align 8, !tbaa !25
  %269 = load ptr, ptr %6, align 8, !tbaa !5
  %270 = call i32 %268(ptr noundef %269, ptr noundef %13, ptr noundef %12)
  %271 = getelementptr inbounds %struct.s2n_result, ptr %14, i32 0, i32 0
  store i32 %270, ptr %271, align 4
  %272 = getelementptr inbounds %struct.s2n_result, ptr %14, i32 0, i32 0
  %273 = load i32, ptr %272, align 4
  %274 = call zeroext i1 @s2n_result_is_ok(i32 %273)
  br i1 %274, label %276, label %275

275:                                              ; preds = %265
  store i32 -1, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %285

276:                                              ; preds = %265
  br label %277

277:                                              ; preds = %276
  br label %278

278:                                              ; preds = %277
  %279 = getelementptr inbounds %struct.s2n_stuffer, ptr %12, i32 0, i32 2
  %280 = load i32, ptr %279, align 4, !tbaa !27
  %281 = getelementptr inbounds %struct.s2n_stuffer, ptr %12, i32 0, i32 1
  %282 = load i32, ptr %281, align 8, !tbaa !28
  %283 = sub i32 %280, %282
  %284 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 %283, ptr %284, align 4, !tbaa !9
  store i32 0, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %285

285:                                              ; preds = %278, %275, %259
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #8
  br label %286

286:                                              ; preds = %285, %217
  call void @llvm.lifetime.end.p0(i64 40, ptr %12) #8
  br label %287

287:                                              ; preds = %286, %204, %165, %126, %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %288

288:                                              ; preds = %287, %47
  %289 = load i32, ptr %5, align 4
  ret i32 %289
}

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 0}
!21 = !{!"s2n_fingerprint_hash", !10, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!21, !6, i64 8}
!23 = !{!21, !6, i64 16}
!24 = !{!15, !6, i64 16}
!25 = !{!26, !6, i64 8}
!26 = !{!"s2n_fingerprint_method", !10, i64 0, !10, i64 4, !6, i64 8}
!27 = !{!18, !10, i64 28}
!28 = !{!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_stuffer = type { %struct.s2n_blob, i32, i32, i32, i8 }
%struct.s2n_blob = type { ptr, i32, i32, i8 }
%struct.s2n_fingerprint_hash = type { i32, ptr, ptr }

@_s2n_debug_info = external thread_local local_unnamed_addr global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local local_unnamed_addr global i32, align 4
@.str.17 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.22 = 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

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @s2n_fingerprint_get_raw(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef writeonly %3) local_unnamed_addr #6 {
  %5 = alloca %struct.s2n_stuffer, align 8
  %6 = alloca %struct.s2n_fingerprint_hash, 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.17, ptr %8, align 8, !tbaa !5
  %9 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.17, i64 21), i32 noundef 47) #7
  %.not24 = icmp eq ptr %9, null
  %10 = getelementptr inbounds i8, ptr %9, i64 1
  %11 = select i1 %.not24, ptr getelementptr inbounds (i8, ptr @.str.17, 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 %82

15:                                               ; preds = %4
  %16 = getelementptr inbounds i8, ptr %0, i64 8
  %17 = load ptr, ptr %16, align 8, !tbaa !13
  %.not25 = icmp eq ptr %17, null
  br i1 %.not25, 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.18, ptr %19, align 8, !tbaa !5
  %20 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.18, i64 21), i32 noundef 47) #7
  %.not26 = icmp eq ptr %20, null
  %21 = getelementptr inbounds i8, ptr %20, i64 1
  %22 = select i1 %.not26, ptr getelementptr inbounds (i8, ptr @.str.18, 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 %82

26:                                               ; preds = %15
  %.not27 = icmp eq i32 %1, 0
  br i1 %.not27, label %27, label %35

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

35:                                               ; preds = %26
  %.not29 = icmp eq ptr %2, null
  br i1 %.not29, label %36, label %44

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

44:                                               ; preds = %35
  %.not31 = icmp eq ptr %3, null
  br i1 %.not31, label %45, label %53

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

53:                                               ; preds = %44
  store i32 0, ptr %3, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #8
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(40) %5, i8 0, i64 40, i1 false)
  %54 = call i32 @s2n_blob_init(ptr noundef nonnull %5, ptr noundef nonnull %2, i32 noundef %1) #8
  %55 = icmp sgt i32 %54, -1
  br i1 %55, label %56, label %81

56:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #8
  store i32 0, ptr %6, align 8, !tbaa !19
  %57 = getelementptr inbounds i8, ptr %6, i64 8
  store ptr %5, ptr %57, align 8, !tbaa !21
  %58 = getelementptr inbounds i8, ptr %6, i64 16
  store ptr null, ptr %58, align 8, !tbaa !22
  %59 = getelementptr inbounds i8, ptr %0, i64 16
  %60 = load ptr, ptr %59, align 8, !tbaa !23
  %.not33 = icmp eq ptr %60, null
  br i1 %.not33, label %61, label %69

61:                                               ; preds = %56
  %62 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.22, ptr %62, align 8, !tbaa !5
  %63 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.22, i64 21), i32 noundef 47) #7
  %.not34 = icmp eq ptr %63, null
  %64 = getelementptr inbounds i8, ptr %63, i64 1
  %65 = select i1 %.not34, ptr getelementptr inbounds (i8, ptr @.str.22, i64 21), ptr %64
  %66 = getelementptr inbounds i8, ptr %62, i64 8
  store ptr %65, ptr %66, align 8, !tbaa !10
  %67 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762112, ptr %67, align 4, !tbaa !11
  %68 = call i32 @s2n_calculate_stacktrace() #8
  br label %80

69:                                               ; preds = %56
  %70 = getelementptr inbounds i8, ptr %17, i64 8
  %71 = load ptr, ptr %70, align 8, !tbaa !24
  %72 = call i32 %71(ptr noundef nonnull %0, ptr noundef nonnull %6, ptr noundef nonnull %5) #8
  %73 = call zeroext i1 @s2n_result_is_ok(i32 %72)
  br i1 %73, label %74, label %80

74:                                               ; preds = %69
  %75 = getelementptr inbounds i8, ptr %5, i64 28
  %76 = load i32, ptr %75, align 4, !tbaa !26
  %77 = getelementptr inbounds i8, ptr %5, i64 24
  %78 = load i32, ptr %77, align 8, !tbaa !27
  %79 = sub i32 %76, %78
  store i32 %79, ptr %3, align 4, !tbaa !11
  br label %80

80:                                               ; preds = %69, %74, %61
  %.0 = phi i32 [ 0, %74 ], [ -1, %61 ], [ -1, %69 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  br label %81

81:                                               ; preds = %53, %80
  %.1 = phi i32 [ %.0, %80 ], [ -1, %53 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #8
  br label %82

82:                                               ; preds = %18, %27, %36, %45, %81, %7
  %.3 = phi i32 [ -1, %7 ], [ %.1, %81 ], [ -1, %45 ], [ -1, %36 ], [ -1, %27 ], [ -1, %18 ]
  ret i32 %.3
}

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 0}
!20 = !{!"s2n_fingerprint_hash", !12, i64 0, !7, i64 8, !7, i64 16}
!21 = !{!20, !7, i64 8}
!22 = !{!20, !7, i64 16}
!23 = !{!14, !7, i64 16}
!24 = !{!25, !7, i64 8}
!25 = !{!"s2n_fingerprint_method", !12, i64 0, !12, i64 4, !7, i64 8}
!26 = !{!17, !12, i64 28}
!27 = !{!17, !12, i64 24}


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