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

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

%struct.s2n_debug_info = type { ptr, ptr }
%struct.s2n_result = type { i32 }
%struct.s2n_config = type { i32, ptr, ptr, %struct.certs_by_type, %struct.s2n_blob, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, i64, ptr, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, i32, i8, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i8, i8, %struct.s2n_x509_trust_store, i16, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, ptr, i32, i32, ptr, ptr, i32, %struct.s2n_blob }
%struct.certs_by_type = type { [4 x ptr] }
%struct.s2n_x509_trust_store = type { ptr, i8 }
%struct.s2n_blob = type { ptr, i32, i32, i8 }
%struct.s2n_ticket_key = type { [16 x i8], [32 x i8], [12 x i8], i64 }

@_s2n_debug_info = external thread_local global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local global i32, align 4
@.str.30 = external hidden unnamed_addr constant [87 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 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @s2n_find_ticket_key(ptr noundef %0, ptr noundef %1) #5 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %struct.s2n_result, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %struct.s2n_result, align 4
  %12 = alloca i32, align 4
  %13 = alloca %struct.s2n_result, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  store i64 0, ptr %6, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  store ptr null, ptr %7, align 8, !tbaa !5
  br label %14

14:                                               ; preds = %2
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = call i32 @s2n_config_wall_clock(ptr noundef %15, ptr noundef %6)
  %17 = getelementptr inbounds %struct.s2n_result, ptr %8, i32 0, i32 0
  store i32 %16, ptr %17, align 4
  %18 = getelementptr inbounds %struct.s2n_result, ptr %8, i32 0, i32 0
  %19 = load i32, ptr %18, align 4
  %20 = call zeroext i1 @s2n_result_is_ok(i32 %19)
  br i1 %20, label %22, label %21

21:                                               ; preds = %14
  store ptr null, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %129

22:                                               ; preds = %14
  br label %23

23:                                               ; preds = %22
  br label %24

24:                                               ; preds = %23
  br label %25

25:                                               ; preds = %24
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.s2n_config, ptr %26, i32 0, i32 15
  %28 = load ptr, ptr %27, align 8, !tbaa !11
  %29 = icmp ne ptr %28, null
  br i1 %29, label %63, label %30

30:                                               ; preds = %25
  br label %31

31:                                               ; preds = %30
  br label %32

32:                                               ; preds = %31
  %33 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %34 = getelementptr inbounds %struct.s2n_debug_info, ptr %33, i32 0, i32 0
  store ptr @.str.30, ptr %34, align 8, !tbaa !18
  %35 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %36 = getelementptr inbounds %struct.s2n_debug_info, ptr %35, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !18
  %38 = getelementptr inbounds i8, ptr %37, i64 21
  %39 = call ptr @strrchr(ptr noundef %38, i32 noundef 47) #7
  %40 = icmp ne ptr %39, null
  br i1 %40, label %41, label %48

41:                                               ; preds = %32
  %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 0
  %44 = load ptr, ptr %43, align 8, !tbaa !18
  %45 = getelementptr inbounds i8, ptr %44, i64 21
  %46 = call ptr @strrchr(ptr noundef %45, i32 noundef 47) #7
  %47 = getelementptr inbounds i8, ptr %46, i64 1
  br label %53

48:                                               ; preds = %32
  %49 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %50 = getelementptr inbounds %struct.s2n_debug_info, ptr %49, i32 0, i32 0
  %51 = load ptr, ptr %50, align 8, !tbaa !18
  %52 = getelementptr inbounds i8, ptr %51, i64 21
  br label %53

53:                                               ; preds = %48, %41
  %54 = phi ptr [ %47, %41 ], [ %52, %48 ]
  %55 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %56 = getelementptr inbounds %struct.s2n_debug_info, ptr %55, i32 0, i32 1
  store ptr %54, ptr %56, align 8, !tbaa !20
  %57 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %57, align 4, !tbaa !21
  %58 = call i32 @s2n_calculate_stacktrace()
  br label %59

59:                                               ; preds = %53
  br label %60

60:                                               ; preds = %59
  store ptr null, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %129

61:                                               ; No predecessors!
  br label %62

62:                                               ; preds = %61
  br label %63

63:                                               ; preds = %62, %25
  br label %64

64:                                               ; preds = %63
  br label %65

65:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  store i32 0, ptr %10, align 4, !tbaa !21
  br label %66

66:                                               ; preds = %65
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.s2n_config, ptr %67, i32 0, i32 15
  %69 = load ptr, ptr %68, align 8, !tbaa !11
  %70 = call i32 @s2n_array_num_elements(ptr noundef %69, ptr noundef %10)
  %71 = getelementptr inbounds %struct.s2n_result, ptr %11, i32 0, i32 0
  store i32 %70, ptr %71, align 4
  %72 = getelementptr inbounds %struct.s2n_result, ptr %11, i32 0, i32 0
  %73 = load i32, ptr %72, align 4
  %74 = call zeroext i1 @s2n_result_is_ok(i32 %73)
  br i1 %74, label %76, label %75

75:                                               ; preds = %66
  store ptr null, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %128

76:                                               ; preds = %66
  br label %77

77:                                               ; preds = %76
  br label %78

78:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  store i32 0, ptr %12, align 4, !tbaa !21
  br label %79

79:                                               ; preds = %122, %78
  %80 = load i32, ptr %12, align 4, !tbaa !21
  %81 = load i32, ptr %10, align 4, !tbaa !21
  %82 = icmp ult i32 %80, %81
  br i1 %82, label %84, label %83

83:                                               ; preds = %79
  store i32 12, ptr %9, align 4
  br label %125

84:                                               ; preds = %79
  br label %85

85:                                               ; preds = %84
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.s2n_config, ptr %86, i32 0, i32 15
  %88 = load ptr, ptr %87, align 8, !tbaa !11
  %89 = load i32, ptr %12, align 4, !tbaa !21
  %90 = call i32 @s2n_array_get(ptr noundef %88, i32 noundef %89, ptr noundef %7)
  %91 = getelementptr inbounds %struct.s2n_result, ptr %13, i32 0, i32 0
  store i32 %90, ptr %91, align 4
  %92 = getelementptr inbounds %struct.s2n_result, ptr %13, i32 0, i32 0
  %93 = load i32, ptr %92, align 4
  %94 = call zeroext i1 @s2n_result_is_ok(i32 %93)
  br i1 %94, label %96, label %95

95:                                               ; preds = %85
  store ptr null, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %125

96:                                               ; preds = %85
  br label %97

97:                                               ; preds = %96
  br label %98

98:                                               ; preds = %97
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.s2n_ticket_key, ptr %99, i32 0, i32 0
  %101 = getelementptr inbounds [16 x i8], ptr %100, i64 0, i64 0
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  %103 = call zeroext i1 @s2n_constant_time_equals(ptr noundef %101, ptr noundef %102, i32 noundef 16)
  br i1 %103, label %104, label %121

104:                                              ; preds = %98
  %105 = load i64, ptr %6, align 8, !tbaa !9
  %106 = load ptr, ptr %7, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.s2n_ticket_key, ptr %106, i32 0, i32 3
  %108 = load i64, ptr %107, align 8, !tbaa !22
  %109 = load ptr, ptr %4, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.s2n_config, ptr %109, i32 0, i32 16
  %111 = load i64, ptr %110, align 8, !tbaa !24
  %112 = add i64 %108, %111
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.s2n_config, ptr %113, i32 0, i32 17
  %115 = load i64, ptr %114, align 8, !tbaa !25
  %116 = add i64 %112, %115
  %117 = icmp uge i64 %105, %116
  br i1 %117, label %118, label %119

118:                                              ; preds = %104
  store ptr null, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %125

119:                                              ; preds = %104
  %120 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %120, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %125

121:                                              ; preds = %98
  br label %122

122:                                              ; preds = %121
  %123 = load i32, ptr %12, align 4, !tbaa !21
  %124 = add i32 %123, 1
  store i32 %124, ptr %12, align 4, !tbaa !21
  br label %79, !llvm.loop !26

125:                                              ; preds = %119, %118, %95, %83
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  %126 = load i32, ptr %9, align 4
  switch i32 %126, label %128 [
    i32 12, label %127
  ]

127:                                              ; preds = %125
  store ptr null, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %128

128:                                              ; preds = %127, %125, %75
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %129

129:                                              ; preds = %128, %60, %21
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  %130 = load ptr, ptr %3, align 8
  ret ptr %130
}

declare zeroext i1 @s2n_constant_time_equals(ptr noundef, ptr noundef, i32 noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 }
attributes #7 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !6, i64 152}
!12 = !{!"s2n_config", !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 2, !13, i64 2, !13, i64 2, !13, i64 2, !6, i64 8, !6, i64 16, !14, i64 24, !15, i64 56, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !13, i64 128, !13, i64 132, !6, i64 136, !10, i64 144, !6, i64 152, !10, i64 160, !10, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !13, i64 224, !7, i64 228, !13, i64 232, !13, i64 236, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !7, i64 296, !7, i64 297, !16, i64 304, !17, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !13, i64 392, !13, i64 396, !13, i64 400, !6, i64 408, !13, i64 416, !13, i64 420, !6, i64 424, !6, i64 432, !13, i64 440, !15, i64 448}
!13 = !{!"int", !7, i64 0}
!14 = !{!"certs_by_type", !7, i64 0}
!15 = !{!"s2n_blob", !6, i64 0, !13, i64 8, !13, i64 12, !13, i64 16}
!16 = !{!"s2n_x509_trust_store", !6, i64 0, !13, i64 8}
!17 = !{!"short", !7, i64 0}
!18 = !{!19, !6, i64 0}
!19 = !{!"s2n_debug_info", !6, i64 0, !6, i64 8}
!20 = !{!19, !6, i64 8}
!21 = !{!13, !13, i64 0}
!22 = !{!23, !10, i64 64}
!23 = !{!"s2n_ticket_key", !7, i64 0, !7, i64 16, !7, i64 48, !10, i64 64}
!24 = !{!12, !10, i64 160}
!25 = !{!12, !10, i64 168}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


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

%struct.s2n_debug_info = type { ptr, ptr }

@_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.30 = external hidden unnamed_addr constant [87 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 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local ptr @s2n_find_ticket_key(ptr noundef %0, ptr noundef %1) local_unnamed_addr #5 {
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  store i64 0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  store ptr null, ptr %4, align 8, !tbaa !9
  %6 = call i32 @s2n_config_wall_clock(ptr noundef %0, ptr noundef nonnull %3) #6
  %7 = call zeroext i1 @s2n_result_is_ok(i32 %6)
  br i1 %7, label %8, label %43

8:                                                ; preds = %2
  %9 = getelementptr inbounds i8, ptr %0, i64 152
  %10 = load ptr, ptr %9, align 8, !tbaa !11
  %.not = icmp eq ptr %10, null
  br i1 %.not, label %11, label %19

11:                                               ; preds = %8
  %12 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.30, ptr %12, align 8, !tbaa !18
  %13 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.30, i64 21), i32 noundef 47) #7
  %.not16 = icmp eq ptr %13, null
  %14 = getelementptr inbounds i8, ptr %13, i64 1
  %15 = select i1 %.not16, ptr getelementptr inbounds (i8, ptr @.str.30, i64 21), ptr %14
  %16 = getelementptr inbounds i8, ptr %12, i64 8
  store ptr %15, ptr %16, align 8, !tbaa !20
  %17 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %17, align 4, !tbaa !21
  %18 = call i32 @s2n_calculate_stacktrace() #6
  br label %43

19:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  store i32 0, ptr %5, align 4, !tbaa !21
  %20 = call i32 @s2n_array_num_elements(ptr noundef nonnull %10, ptr noundef nonnull %5) #6
  %21 = call zeroext i1 @s2n_result_is_ok(i32 %20)
  %22 = load i32, ptr %5, align 4
  %.not1819 = icmp ne i32 %22, 0
  %or.cond = select i1 %21, i1 %.not1819, i1 false
  br i1 %or.cond, label %.lr.ph, label %.loopexit

23:                                               ; preds = %29
  %24 = add nuw i32 %.01320, 1
  %25 = load i32, ptr %5, align 4, !tbaa !21
  %.not18 = icmp ult i32 %24, %25
  br i1 %.not18, label %.lr.ph, label %.loopexit, !llvm.loop !22

.lr.ph:                                           ; preds = %19, %23
  %.01320 = phi i32 [ %24, %23 ], [ 0, %19 ]
  %26 = load ptr, ptr %9, align 8, !tbaa !11
  %27 = call i32 @s2n_array_get(ptr noundef %26, i32 noundef %.01320, ptr noundef nonnull %4) #6
  %28 = call zeroext i1 @s2n_result_is_ok(i32 %27)
  br i1 %28, label %29, label %.loopexit

29:                                               ; preds = %.lr.ph
  %30 = load ptr, ptr %4, align 8, !tbaa !9
  %31 = call zeroext i1 @s2n_constant_time_equals(ptr noundef %30, ptr noundef %1, i32 noundef 16) #6
  br i1 %31, label %32, label %23

32:                                               ; preds = %29
  %33 = load i64, ptr %3, align 8, !tbaa !5
  %34 = load ptr, ptr %4, align 8, !tbaa !9
  %35 = getelementptr inbounds i8, ptr %34, i64 64
  %36 = load i64, ptr %35, align 8, !tbaa !24
  %37 = getelementptr inbounds i8, ptr %0, i64 160
  %38 = load i64, ptr %37, align 8, !tbaa !26
  %39 = add i64 %38, %36
  %40 = getelementptr inbounds i8, ptr %0, i64 168
  %41 = load i64, ptr %40, align 8, !tbaa !27
  %42 = add i64 %39, %41
  %.not17 = icmp ult i64 %33, %42
  %. = select i1 %.not17, ptr %34, ptr null
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph, %23, %32, %19
  %.1 = phi ptr [ null, %19 ], [ %., %32 ], [ null, %23 ], [ null, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  br label %43

43:                                               ; preds = %2, %.loopexit, %11
  %.2 = phi ptr [ %.1, %.loopexit ], [ null, %11 ], [ null, %2 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  ret ptr %.2
}

declare zeroext i1 @s2n_constant_time_equals(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 }
attributes #7 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 152}
!12 = !{!"s2n_config", !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 0, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 1, !13, i64 2, !13, i64 2, !13, i64 2, !13, i64 2, !10, i64 8, !10, i64 16, !14, i64 24, !15, i64 56, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !13, i64 128, !13, i64 132, !10, i64 136, !6, i64 144, !10, i64 152, !6, i64 160, !6, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !13, i64 224, !7, i64 228, !13, i64 232, !13, i64 236, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !7, i64 296, !7, i64 297, !16, i64 304, !17, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360, !10, i64 368, !10, i64 376, !10, i64 384, !13, i64 392, !13, i64 396, !13, i64 400, !10, i64 408, !13, i64 416, !13, i64 420, !10, i64 424, !10, i64 432, !13, i64 440, !15, i64 448}
!13 = !{!"int", !7, i64 0}
!14 = !{!"certs_by_type", !7, i64 0}
!15 = !{!"s2n_blob", !10, i64 0, !13, i64 8, !13, i64 12, !13, i64 16}
!16 = !{!"s2n_x509_trust_store", !10, i64 0, !13, i64 8}
!17 = !{!"short", !7, i64 0}
!18 = !{!19, !10, i64 0}
!19 = !{!"s2n_debug_info", !10, i64 0, !10, i64 8}
!20 = !{!19, !10, i64 8}
!21 = !{!13, !13, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!25, !6, i64 64}
!25 = !{!"s2n_ticket_key", !7, i64 0, !7, i64 16, !7, i64 48, !6, i64 64}
!26 = !{!12, !6, i64 160}
!27 = !{!12, !6, i64 168}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass