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

; 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_result = type { i32 }
%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 global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local global i32, align 4
@.str.25 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [92 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @s2n_stuffer_validate(ptr noundef) #0

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

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

declare i32 @s2n_calculate_stacktrace() #3

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @s2n_stuffer_skip_read(ptr noundef, i32 noundef) #0

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

14:                                               ; preds = %3
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %16 = icmp ne ptr %15, null
  br i1 %16, label %48, label %17

17:                                               ; preds = %14
  br label %18

18:                                               ; preds = %17
  br label %19

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

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

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

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

46:                                               ; preds = %40
  store i32 -1, ptr %4, align 4
  br label %199

47:                                               ; No predecessors!
  br label %48

48:                                               ; preds = %47, %14
  br label %49

49:                                               ; preds = %48
  br label %50

50:                                               ; preds = %49
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = call i32 @s2n_stuffer_validate(ptr noundef %51)
  %53 = getelementptr inbounds %struct.s2n_result, ptr %9, i32 0, i32 0
  store i32 %52, ptr %53, align 4
  %54 = getelementptr inbounds %struct.s2n_result, ptr %9, i32 0, i32 0
  %55 = load i32, ptr %54, align 4
  %56 = call zeroext i1 @s2n_result_is_ok(i32 %55)
  %57 = xor i1 %56, true
  %58 = xor i1 %57, true
  %59 = zext i1 %58 to i32
  %60 = sext i32 %59 to i64
  %61 = call i64 @llvm.expect.i64(i64 %60, i64 1)
  %62 = icmp ne i64 %61, 0
  br i1 %62, label %63, label %65

63:                                               ; preds = %50
  %64 = getelementptr inbounds %struct.s2n_result, ptr %8, i32 0, i32 0
  store i32 0, ptr %64, align 4, !tbaa !14
  br label %67

65:                                               ; preds = %50
  %66 = getelementptr inbounds %struct.s2n_result, ptr %8, i32 0, i32 0
  store i32 -1, ptr %66, align 4, !tbaa !14
  br label %67

67:                                               ; preds = %65, %63
  %68 = getelementptr inbounds %struct.s2n_result, ptr %8, i32 0, i32 0
  %69 = load i32, ptr %68, align 4
  %70 = call zeroext i1 @s2n_result_is_ok(i32 %69)
  br i1 %70, label %72, label %71

71:                                               ; preds = %67
  store i32 -1, ptr %4, align 4
  br label %199

72:                                               ; preds = %67
  br label %73

73:                                               ; preds = %72
  br label %74

74:                                               ; preds = %73
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = load i32, ptr %7, align 4, !tbaa !9
  %77 = call i32 @s2n_stuffer_skip_read(ptr noundef %75, i32 noundef %76)
  %78 = icmp sgt i32 %77, -1
  br i1 %78, label %80, label %79

79:                                               ; preds = %74
  store i32 -1, ptr %4, align 4
  br label %199

80:                                               ; preds = %74
  br label %81

81:                                               ; preds = %80
  br label %82

82:                                               ; preds = %81
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.s2n_stuffer, ptr %83, i32 0, i32 0
  %85 = getelementptr inbounds %struct.s2n_blob, ptr %84, i32 0, i32 0
  %86 = load ptr, ptr %85, align 8, !tbaa !16
  %87 = icmp ne ptr %86, null
  br i1 %87, label %119, label %88

88:                                               ; preds = %82
  br label %89

89:                                               ; preds = %88
  br label %90

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

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

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

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

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

118:                                              ; No predecessors!
  br label %119

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

120:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.s2n_stuffer, ptr %121, i32 0, i32 0
  %123 = getelementptr inbounds %struct.s2n_blob, ptr %122, i32 0, i32 0
  %124 = load ptr, ptr %123, align 8, !tbaa !16
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.s2n_stuffer, ptr %125, i32 0, i32 1
  %127 = load i32, ptr %126, align 8, !tbaa !19
  %128 = zext i32 %127 to i64
  %129 = getelementptr inbounds i8, ptr %124, i64 %128
  %130 = load i32, ptr %7, align 4, !tbaa !9
  %131 = zext i32 %130 to i64
  %132 = sub i64 0, %131
  %133 = getelementptr inbounds i8, ptr %129, i64 %132
  store ptr %133, ptr %10, align 8, !tbaa !5
  br label %134

134:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  %135 = load i32, ptr %7, align 4, !tbaa !9
  store i32 %135, ptr %11, align 4, !tbaa !9
  %136 = load i32, ptr %11, align 4, !tbaa !9
  %137 = icmp ne i32 %136, 0
  %138 = xor i1 %137, true
  %139 = xor i1 %138, true
  %140 = zext i1 %139 to i32
  %141 = sext i32 %140 to i64
  %142 = call i64 @llvm.expect.i64(i64 %141, i64 1)
  %143 = icmp ne i64 %142, 0
  br i1 %143, label %144, label %192

144:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %145 = load ptr, ptr %6, align 8, !tbaa !5
  %146 = load ptr, ptr %10, align 8, !tbaa !5
  %147 = load i32, ptr %11, align 4, !tbaa !9
  %148 = zext i32 %147 to i64
  %149 = call ptr @s2n_ensure_memmove_trace(ptr noundef %145, ptr noundef %146, i64 noundef %148)
  store ptr %149, ptr %12, align 8, !tbaa !5
  br label %150

150:                                              ; preds = %144
  %151 = load ptr, ptr %12, align 8, !tbaa !5
  %152 = icmp ne ptr %151, null
  br i1 %152, label %186, label %153

153:                                              ; preds = %150
  br label %154

154:                                              ; preds = %153
  br label %155

155:                                              ; preds = %154
  %156 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %157 = getelementptr inbounds %struct.s2n_debug_info, ptr %156, i32 0, i32 0
  store ptr @.str.27, ptr %157, align 8, !tbaa !11
  %158 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %159 = getelementptr inbounds %struct.s2n_debug_info, ptr %158, i32 0, i32 0
  %160 = load ptr, ptr %159, align 8, !tbaa !11
  %161 = getelementptr inbounds i8, ptr %160, i64 21
  %162 = call ptr @strrchr(ptr noundef %161, i32 noundef 47) #7
  %163 = icmp ne ptr %162, null
  br i1 %163, label %164, label %171

164:                                              ; preds = %155
  %165 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %166 = getelementptr inbounds %struct.s2n_debug_info, ptr %165, i32 0, i32 0
  %167 = load ptr, ptr %166, align 8, !tbaa !11
  %168 = getelementptr inbounds i8, ptr %167, i64 21
  %169 = call ptr @strrchr(ptr noundef %168, i32 noundef 47) #7
  %170 = getelementptr inbounds i8, ptr %169, i64 1
  br label %176

171:                                              ; preds = %155
  %172 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %173 = getelementptr inbounds %struct.s2n_debug_info, ptr %172, i32 0, i32 0
  %174 = load ptr, ptr %173, align 8, !tbaa !11
  %175 = getelementptr inbounds i8, ptr %174, i64 21
  br label %176

176:                                              ; preds = %171, %164
  %177 = phi ptr [ %170, %164 ], [ %175, %171 ]
  %178 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %179 = getelementptr inbounds %struct.s2n_debug_info, ptr %178, i32 0, i32 1
  store ptr %177, ptr %179, align 8, !tbaa !13
  %180 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %180, align 4, !tbaa !9
  %181 = call i32 @s2n_calculate_stacktrace()
  br label %182

182:                                              ; preds = %176
  br label %183

183:                                              ; preds = %182
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %13, align 4
  br label %189

184:                                              ; No predecessors!
  br label %185

185:                                              ; preds = %184
  br label %186

186:                                              ; preds = %185, %150
  br label %187

187:                                              ; preds = %186
  br label %188

188:                                              ; preds = %187
  store i32 0, ptr %13, align 4
  br label %189

189:                                              ; preds = %188, %183
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  %190 = load i32, ptr %13, align 4
  switch i32 %190, label %193 [
    i32 0, label %191
  ]

191:                                              ; preds = %189
  br label %192

192:                                              ; preds = %191, %134
  store i32 0, ptr %13, align 4
  br label %193

193:                                              ; preds = %192, %189
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  %194 = load i32, ptr %13, align 4
  switch i32 %194, label %198 [
    i32 0, label %195
  ]

195:                                              ; preds = %193
  br label %196

196:                                              ; preds = %195
  br label %197

197:                                              ; preds = %196
  store i32 0, ptr %4, align 4
  store i32 1, ptr %13, align 4
  br label %198

198:                                              ; preds = %197, %193
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %199

199:                                              ; preds = %198, %117, %79, %71, %46
  %200 = load i32, ptr %4, align 4
  ret i32 %200
}

declare ptr @s2n_ensure_memmove_trace(ptr noundef, ptr noundef, i64 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 speculatable willreturn memory(none) }
attributes #2 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #6 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !10, i64 0}
!15 = !{!"", !10, i64 0}
!16 = !{!17, !6, i64 0}
!17 = !{!"s2n_stuffer", !18, i64 0, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !10, i64 36, !10, i64 36}
!18 = !{!"s2n_blob", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16}
!19 = !{!17, !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 }

@_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.25 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [92 x i8], align 1

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

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

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

declare i32 @s2n_calculate_stacktrace() local_unnamed_addr #3

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @s2n_stuffer_skip_read(ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @s2n_stuffer_read_bytes(ptr noundef %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #0 {
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %.sink.split, label %4

4:                                                ; preds = %3
  %5 = tail call i32 @s2n_stuffer_validate(ptr noundef %0)
  %6 = tail call zeroext i1 @s2n_result_is_ok(i32 %5)
  %not. = xor i1 %6, true
  %. = sext i1 %not. to i32
  %7 = tail call zeroext i1 @s2n_result_is_ok(i32 %.)
  br i1 %7, label %8, label %30

8:                                                ; preds = %4
  %9 = tail call i32 @s2n_stuffer_skip_read(ptr noundef %0, i32 noundef %2)
  %10 = icmp sgt i32 %9, -1
  br i1 %10, label %11, label %30

11:                                               ; preds = %8
  %12 = load ptr, ptr %0, align 8, !tbaa !5
  %.not26 = icmp eq ptr %12, null
  br i1 %.not26, label %.sink.split, label %13

13:                                               ; preds = %11
  %.not28 = icmp eq i32 %2, 0
  br i1 %.not28, label %30, label %14, !prof !12

14:                                               ; preds = %13
  %15 = getelementptr inbounds i8, ptr %0, i64 24
  %16 = load i32, ptr %15, align 8, !tbaa !13
  %17 = zext i32 %16 to i64
  %18 = getelementptr inbounds i8, ptr %12, i64 %17
  %19 = zext i32 %2 to i64
  %20 = sub nsw i64 0, %19
  %21 = getelementptr inbounds i8, ptr %18, i64 %20
  %22 = tail call ptr @s2n_ensure_memmove_trace(ptr noundef nonnull %1, ptr noundef nonnull %21, i64 noundef %19) #5
  %.not29.not = icmp eq ptr %22, null
  br i1 %.not29.not, label %.sink.split, label %30

.sink.split:                                      ; preds = %14, %11, %3
  %.str.27.sink = phi ptr [ @.str.25, %3 ], [ @.str.26, %11 ], [ @.str.27, %14 ]
  %.sink37 = phi ptr [ getelementptr inbounds (i8, ptr @.str.25, i64 21), %3 ], [ getelementptr inbounds (i8, ptr @.str.26, i64 21), %11 ], [ getelementptr inbounds (i8, ptr @.str.27, i64 21), %14 ]
  %23 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr %.str.27.sink, ptr %23, align 8, !tbaa !14
  %24 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) %.sink37, i32 noundef 47) #6
  %.not30 = icmp eq ptr %24, null
  %25 = getelementptr inbounds i8, ptr %24, i64 1
  %26 = select i1 %.not30, ptr %.sink37, ptr %25
  %27 = getelementptr inbounds i8, ptr %23, i64 8
  store ptr %26, ptr %27, align 8, !tbaa !16
  %28 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %28, align 4, !tbaa !17
  %29 = tail call i32 @s2n_calculate_stacktrace() #5
  br label %30

30:                                               ; preds = %.sink.split, %14, %13, %8, %4
  %.4 = phi i32 [ -1, %4 ], [ -1, %8 ], [ 0, %14 ], [ 0, %13 ], [ -1, %.sink.split ]
  ret i32 %.4
}

declare ptr @s2n_ensure_memmove_trace(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { 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 #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 }
attributes #6 = { 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, !8, i64 0}
!6 = !{!"s2n_stuffer", !7, i64 0, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 36, !11, i64 36}
!7 = !{!"s2n_blob", !8, i64 0, !11, i64 8, !11, i64 12, !11, i64 16}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C/C++ TBAA"}
!11 = !{!"int", !9, i64 0}
!12 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!13 = !{!6, !11, i64 24}
!14 = !{!15, !8, i64 0}
!15 = !{!"s2n_debug_info", !8, i64 0, !8, i64 8}
!16 = !{!15, !8, i64 8}
!17 = !{!11, !11, i64 0}


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