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

; 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_crl = type { ptr }

@_s2n_debug_info = external thread_local global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local global i32, align 4
@.str.9 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [84 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [84 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 willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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: nounwind uwtable
define dso_local i32 @s2n_crl_validate_active(ptr noundef %0) #4 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  br label %7

7:                                                ; preds = %1
  %8 = load ptr, ptr %3, align 8, !tbaa !5
  %9 = icmp ne ptr %8, null
  br i1 %9, label %41, label %10

10:                                               ; preds = %7
  br label %11

11:                                               ; preds = %10
  br label %12

12:                                               ; preds = %11
  %13 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %14 = getelementptr inbounds %struct.s2n_debug_info, ptr %13, i32 0, i32 0
  store ptr @.str.9, ptr %14, align 8, !tbaa !9
  %15 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %16 = getelementptr inbounds %struct.s2n_debug_info, ptr %15, i32 0, i32 0
  %17 = load ptr, ptr %16, align 8, !tbaa !9
  %18 = getelementptr inbounds i8, ptr %17, i64 21
  %19 = call ptr @strrchr(ptr noundef %18, i32 noundef 47) #5
  %20 = icmp ne ptr %19, null
  br i1 %20, label %21, label %28

21:                                               ; preds = %12
  %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 !9
  %25 = getelementptr inbounds i8, ptr %24, i64 21
  %26 = call ptr @strrchr(ptr noundef %25, i32 noundef 47) #5
  %27 = getelementptr inbounds i8, ptr %26, i64 1
  br label %33

28:                                               ; preds = %12
  %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 !9
  %32 = getelementptr inbounds i8, ptr %31, i64 21
  br label %33

33:                                               ; preds = %28, %21
  %34 = phi ptr [ %27, %21 ], [ %32, %28 ]
  %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 1
  store ptr %34, ptr %36, align 8, !tbaa !11
  %37 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %37, align 4, !tbaa !12
  %38 = call i32 @s2n_calculate_stacktrace()
  br label %39

39:                                               ; preds = %33
  store i32 -1, ptr %2, align 4
  br label %206

40:                                               ; No predecessors!
  br label %41

41:                                               ; preds = %40, %7
  br label %42

42:                                               ; preds = %41
  br label %43

43:                                               ; preds = %42
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.s2n_crl, ptr %44, i32 0, i32 0
  %46 = load ptr, ptr %45, align 8, !tbaa !14
  %47 = icmp ne ptr %46, null
  br i1 %47, label %79, label %48

48:                                               ; preds = %43
  br label %49

49:                                               ; preds = %48
  br label %50

50:                                               ; preds = %49
  %51 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %52 = getelementptr inbounds %struct.s2n_debug_info, ptr %51, i32 0, i32 0
  store ptr @.str.10, ptr %52, align 8, !tbaa !9
  %53 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %54 = getelementptr inbounds %struct.s2n_debug_info, ptr %53, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !9
  %56 = getelementptr inbounds i8, ptr %55, i64 21
  %57 = call ptr @strrchr(ptr noundef %56, i32 noundef 47) #5
  %58 = icmp ne ptr %57, null
  br i1 %58, label %59, label %66

59:                                               ; preds = %50
  %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
  %62 = load ptr, ptr %61, align 8, !tbaa !9
  %63 = getelementptr inbounds i8, ptr %62, i64 21
  %64 = call ptr @strrchr(ptr noundef %63, i32 noundef 47) #5
  %65 = getelementptr inbounds i8, ptr %64, i64 1
  br label %71

66:                                               ; preds = %50
  %67 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %68 = getelementptr inbounds %struct.s2n_debug_info, ptr %67, i32 0, i32 0
  %69 = load ptr, ptr %68, align 8, !tbaa !9
  %70 = getelementptr inbounds i8, ptr %69, i64 21
  br label %71

71:                                               ; preds = %66, %59
  %72 = phi ptr [ %65, %59 ], [ %70, %66 ]
  %73 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %74 = getelementptr inbounds %struct.s2n_debug_info, ptr %73, i32 0, i32 1
  store ptr %72, ptr %74, align 8, !tbaa !11
  %75 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %75, align 4, !tbaa !12
  %76 = call i32 @s2n_calculate_stacktrace()
  br label %77

77:                                               ; preds = %71
  store i32 -1, ptr %2, align 4
  br label %206

78:                                               ; No predecessors!
  br label %79

79:                                               ; preds = %78, %43
  br label %80

80:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.s2n_crl, ptr %81, i32 0, i32 0
  %83 = load ptr, ptr %82, align 8, !tbaa !14
  %84 = call ptr @X509_CRL_get_lastUpdate(ptr noundef %83)
  store ptr %84, ptr %4, align 8, !tbaa !5
  br label %85

85:                                               ; preds = %80
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = icmp ne ptr %86, null
  br i1 %87, label %121, label %88

88:                                               ; preds = %85
  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.11, ptr %92, align 8, !tbaa !9
  %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 !9
  %96 = getelementptr inbounds i8, ptr %95, i64 21
  %97 = call ptr @strrchr(ptr noundef %96, i32 noundef 47) #5
  %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 !9
  %103 = getelementptr inbounds i8, ptr %102, i64 21
  %104 = call ptr @strrchr(ptr noundef %103, i32 noundef 47) #5
  %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 !9
  %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 !11
  %115 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %115, align 4, !tbaa !12
  %116 = call i32 @s2n_calculate_stacktrace()
  br label %117

117:                                              ; preds = %111
  br label %118

118:                                              ; preds = %117
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %205

119:                                              ; No predecessors!
  br label %120

120:                                              ; preds = %119
  br label %121

121:                                              ; preds = %120, %85
  br label %122

122:                                              ; preds = %121
  br label %123

123:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  %125 = call i32 @X509_cmp_time(ptr noundef %124, ptr noundef null)
  store i32 %125, ptr %6, align 4, !tbaa !12
  br label %126

126:                                              ; preds = %123
  %127 = load i32, ptr %6, align 4, !tbaa !12
  %128 = icmp ne i32 %127, 0
  br i1 %128, label %162, label %129

129:                                              ; preds = %126
  br label %130

130:                                              ; preds = %129
  br label %131

131:                                              ; preds = %130
  %132 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %133 = getelementptr inbounds %struct.s2n_debug_info, ptr %132, i32 0, i32 0
  store ptr @.str.12, ptr %133, align 8, !tbaa !9
  %134 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %135 = getelementptr inbounds %struct.s2n_debug_info, ptr %134, i32 0, i32 0
  %136 = load ptr, ptr %135, align 8, !tbaa !9
  %137 = getelementptr inbounds i8, ptr %136, i64 21
  %138 = call ptr @strrchr(ptr noundef %137, i32 noundef 47) #5
  %139 = icmp ne ptr %138, null
  br i1 %139, label %140, label %147

140:                                              ; preds = %131
  %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
  %143 = load ptr, ptr %142, align 8, !tbaa !9
  %144 = getelementptr inbounds i8, ptr %143, i64 21
  %145 = call ptr @strrchr(ptr noundef %144, i32 noundef 47) #5
  %146 = getelementptr inbounds i8, ptr %145, i64 1
  br label %152

147:                                              ; preds = %131
  %148 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %149 = getelementptr inbounds %struct.s2n_debug_info, ptr %148, i32 0, i32 0
  %150 = load ptr, ptr %149, align 8, !tbaa !9
  %151 = getelementptr inbounds i8, ptr %150, i64 21
  br label %152

152:                                              ; preds = %147, %140
  %153 = phi ptr [ %146, %140 ], [ %151, %147 ]
  %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 1
  store ptr %153, ptr %155, align 8, !tbaa !11
  %156 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544378, ptr %156, align 4, !tbaa !12
  %157 = call i32 @s2n_calculate_stacktrace()
  br label %158

158:                                              ; preds = %152
  br label %159

159:                                              ; preds = %158
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %204

160:                                              ; No predecessors!
  br label %161

161:                                              ; preds = %160
  br label %162

162:                                              ; preds = %161, %126
  br label %163

163:                                              ; preds = %162
  br label %164

164:                                              ; preds = %163
  br label %165

165:                                              ; preds = %164
  %166 = load i32, ptr %6, align 4, !tbaa !12
  %167 = icmp slt i32 %166, 0
  br i1 %167, label %201, label %168

168:                                              ; preds = %165
  br label %169

169:                                              ; preds = %168
  br label %170

170:                                              ; preds = %169
  %171 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %172 = getelementptr inbounds %struct.s2n_debug_info, ptr %171, i32 0, i32 0
  store ptr @.str.13, ptr %172, align 8, !tbaa !9
  %173 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %174 = getelementptr inbounds %struct.s2n_debug_info, ptr %173, i32 0, i32 0
  %175 = load ptr, ptr %174, align 8, !tbaa !9
  %176 = getelementptr inbounds i8, ptr %175, i64 21
  %177 = call ptr @strrchr(ptr noundef %176, i32 noundef 47) #5
  %178 = icmp ne ptr %177, null
  br i1 %178, label %179, label %186

179:                                              ; preds = %170
  %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
  %182 = load ptr, ptr %181, align 8, !tbaa !9
  %183 = getelementptr inbounds i8, ptr %182, i64 21
  %184 = call ptr @strrchr(ptr noundef %183, i32 noundef 47) #5
  %185 = getelementptr inbounds i8, ptr %184, i64 1
  br label %191

186:                                              ; preds = %170
  %187 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %188 = getelementptr inbounds %struct.s2n_debug_info, ptr %187, i32 0, i32 0
  %189 = load ptr, ptr %188, align 8, !tbaa !9
  %190 = getelementptr inbounds i8, ptr %189, i64 21
  br label %191

191:                                              ; preds = %186, %179
  %192 = phi ptr [ %185, %179 ], [ %190, %186 ]
  %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 1
  store ptr %192, ptr %194, align 8, !tbaa !11
  %195 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 335544380, ptr %195, align 4, !tbaa !12
  %196 = call i32 @s2n_calculate_stacktrace()
  br label %197

197:                                              ; preds = %191
  br label %198

198:                                              ; preds = %197
  store i32 -1, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %204

199:                                              ; No predecessors!
  br label %200

200:                                              ; preds = %199
  br label %201

201:                                              ; preds = %200, %165
  br label %202

202:                                              ; preds = %201
  br label %203

203:                                              ; preds = %202
  store i32 0, ptr %2, align 4
  store i32 1, ptr %5, align 4
  br label %204

204:                                              ; preds = %203, %198, %159
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %205

205:                                              ; preds = %204, %118
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br label %206

206:                                              ; preds = %205, %77, %39
  %207 = load i32, ptr %2, align 4
  ret i32 %207
}

declare ptr @X509_CRL_get_lastUpdate(ptr noundef) #3

declare i32 @X509_cmp_time(ptr noundef, ptr 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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind willreturn memory(read) }
attributes #6 = { 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, !6, i64 0}
!10 = !{!"s2n_debug_info", !6, i64 0, !6, i64 8}
!11 = !{!10, !6, i64 8}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !6, i64 0}
!15 = !{!"s2n_crl", !6, i64 0}


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

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

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

declare i32 @s2n_calculate_stacktrace() local_unnamed_addr #2

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

2:                                                ; preds = %1
  %3 = load ptr, ptr %0, align 8, !tbaa !5
  %.not17 = icmp eq ptr %3, null
  br i1 %.not17, label %.sink.split, label %4

4:                                                ; preds = %2
  %5 = tail call ptr @X509_CRL_get_lastUpdate(ptr noundef nonnull %3) #4
  %.not19 = icmp eq ptr %5, null
  br i1 %.not19, label %.sink.split, label %6

6:                                                ; preds = %4
  %7 = tail call i32 @X509_cmp_time(ptr noundef nonnull %5, ptr noundef null) #4
  %.not21 = icmp eq i32 %7, 0
  br i1 %.not21, label %.sink.split, label %8

8:                                                ; preds = %6
  %9 = icmp slt i32 %7, 0
  br i1 %9, label %17, label %.sink.split

.sink.split:                                      ; preds = %8, %6, %4, %2, %1
  %.str.11.sink = phi ptr [ @.str.9, %1 ], [ @.str.10, %2 ], [ @.str.11, %4 ], [ @.str.12, %6 ], [ @.str.13, %8 ]
  %.sink32 = phi ptr [ getelementptr inbounds (i8, ptr @.str.9, i64 21), %1 ], [ getelementptr inbounds (i8, ptr @.str.10, i64 21), %2 ], [ getelementptr inbounds (i8, ptr @.str.11, i64 21), %4 ], [ getelementptr inbounds (i8, ptr @.str.12, i64 21), %6 ], [ getelementptr inbounds (i8, ptr @.str.13, i64 21), %8 ]
  %.sink = phi i32 [ 402653193, %1 ], [ 402653193, %2 ], [ 402653193, %4 ], [ 335544378, %6 ], [ 335544380, %8 ]
  %10 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr %.str.11.sink, ptr %10, align 8, !tbaa !10
  %11 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) %.sink32, i32 noundef 47) #5
  %.not20 = icmp eq ptr %11, null
  %12 = getelementptr inbounds i8, ptr %11, i64 1
  %13 = select i1 %.not20, ptr %.sink32, ptr %12
  %14 = getelementptr inbounds i8, ptr %10, i64 8
  store ptr %13, ptr %14, align 8, !tbaa !12
  %15 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 %.sink, ptr %15, align 4, !tbaa !13
  %16 = tail call i32 @s2n_calculate_stacktrace() #4
  br label %17

17:                                               ; preds = %.sink.split, %8
  %.2 = phi i32 [ 0, %8 ], [ -1, %.sink.split ]
  ret i32 %.2
}

declare ptr @X509_CRL_get_lastUpdate(ptr noundef) local_unnamed_addr #2

declare i32 @X509_cmp_time(ptr noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { 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 #2 = { "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 = { 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 #4 = { nounwind }
attributes #5 = { nounwind willreturn memory(read) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"s2n_crl", !7, i64 0}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !7, i64 0}
!11 = !{!"s2n_debug_info", !7, i64 0, !7, i64 8}
!12 = !{!11, !7, i64 8}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !8, i64 0}


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