; LLVM IR from aws/s2n-tls :: tests/fuzz (s2n_tls13_cert_req_recv_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 }

@cert_chain = external hidden global ptr, align 8
@.str = external hidden unnamed_addr constant [111 x i8], align 1
@_s2n_debug_info = external thread_local global %struct.s2n_debug_info, align 8
@s2n_errno = external thread_local global i32, align 4
@private_key = external hidden global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [111 x i8], align 1
@default_cert = external dso_local global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [111 x i8], align 1
@client_config = external dso_local global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [111 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [58 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_fuzz_init(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %6 = call noalias ptr @malloc(i64 noundef 12000) #5
  store ptr %6, ptr @cert_chain, align 8, !tbaa !5
  br label %7

7:                                                ; preds = %2
  %8 = load ptr, ptr @cert_chain, 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, 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) #6
  %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) #6
  %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 %3, align 4
  br label %185

40:                                               ; No predecessors!
  br label %41

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

42:                                               ; preds = %41
  %43 = call noalias ptr @malloc(i64 noundef 12000) #5
  store ptr %43, ptr @private_key, align 8, !tbaa !5
  br label %44

44:                                               ; preds = %42
  %45 = load ptr, ptr @private_key, align 8, !tbaa !5
  %46 = icmp ne ptr %45, null
  br i1 %46, label %78, label %47

47:                                               ; preds = %44
  br label %48

48:                                               ; preds = %47
  br label %49

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

58:                                               ; preds = %49
  %59 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %60 = getelementptr inbounds %struct.s2n_debug_info, ptr %59, i32 0, i32 0
  %61 = load ptr, ptr %60, align 8, !tbaa !9
  %62 = getelementptr inbounds i8, ptr %61, i64 21
  %63 = call ptr @strrchr(ptr noundef %62, i32 noundef 47) #6
  %64 = getelementptr inbounds i8, ptr %63, i64 1
  br label %70

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

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

76:                                               ; preds = %70
  store i32 -1, ptr %3, align 4
  br label %185

77:                                               ; No predecessors!
  br label %78

78:                                               ; preds = %77, %44
  br label %79

79:                                               ; preds = %78
  %80 = call ptr @s2n_cert_chain_and_key_new()
  store ptr %80, ptr @default_cert, align 8, !tbaa !5
  br label %81

81:                                               ; preds = %79
  %82 = load ptr, ptr @default_cert, align 8, !tbaa !5
  %83 = icmp ne ptr %82, null
  br i1 %83, label %115, label %84

84:                                               ; preds = %81
  br label %85

85:                                               ; preds = %84
  br label %86

86:                                               ; preds = %85
  %87 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %88 = getelementptr inbounds %struct.s2n_debug_info, ptr %87, i32 0, i32 0
  store ptr @.str.2, ptr %88, align 8, !tbaa !9
  %89 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %90 = getelementptr inbounds %struct.s2n_debug_info, ptr %89, i32 0, i32 0
  %91 = load ptr, ptr %90, align 8, !tbaa !9
  %92 = getelementptr inbounds i8, ptr %91, i64 21
  %93 = call ptr @strrchr(ptr noundef %92, i32 noundef 47) #6
  %94 = icmp ne ptr %93, null
  br i1 %94, label %95, label %102

95:                                               ; preds = %86
  %96 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %97 = getelementptr inbounds %struct.s2n_debug_info, ptr %96, i32 0, i32 0
  %98 = load ptr, ptr %97, align 8, !tbaa !9
  %99 = getelementptr inbounds i8, ptr %98, i64 21
  %100 = call ptr @strrchr(ptr noundef %99, i32 noundef 47) #6
  %101 = getelementptr inbounds i8, ptr %100, i64 1
  br label %107

102:                                              ; preds = %86
  %103 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %104 = getelementptr inbounds %struct.s2n_debug_info, ptr %103, i32 0, i32 0
  %105 = load ptr, ptr %104, align 8, !tbaa !9
  %106 = getelementptr inbounds i8, ptr %105, i64 21
  br label %107

107:                                              ; preds = %102, %95
  %108 = phi ptr [ %101, %95 ], [ %106, %102 ]
  %109 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %110 = getelementptr inbounds %struct.s2n_debug_info, ptr %109, i32 0, i32 1
  store ptr %108, ptr %110, align 8, !tbaa !11
  %111 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %111, align 4, !tbaa !12
  %112 = call i32 @s2n_calculate_stacktrace()
  br label %113

113:                                              ; preds = %107
  store i32 -1, ptr %3, align 4
  br label %185

114:                                              ; No predecessors!
  br label %115

115:                                              ; preds = %114, %81
  br label %116

116:                                              ; preds = %115
  %117 = call ptr @s2n_config_new()
  store ptr %117, ptr @client_config, align 8, !tbaa !5
  br label %118

118:                                              ; preds = %116
  %119 = load ptr, ptr @client_config, align 8, !tbaa !5
  %120 = icmp ne ptr %119, null
  br i1 %120, label %152, label %121

121:                                              ; preds = %118
  br label %122

122:                                              ; preds = %121
  br label %123

123:                                              ; preds = %122
  %124 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %125 = getelementptr inbounds %struct.s2n_debug_info, ptr %124, i32 0, i32 0
  store ptr @.str.3, ptr %125, align 8, !tbaa !9
  %126 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %127 = getelementptr inbounds %struct.s2n_debug_info, ptr %126, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8, !tbaa !9
  %129 = getelementptr inbounds i8, ptr %128, i64 21
  %130 = call ptr @strrchr(ptr noundef %129, i32 noundef 47) #6
  %131 = icmp ne ptr %130, null
  br i1 %131, label %132, label %139

132:                                              ; preds = %123
  %133 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %134 = getelementptr inbounds %struct.s2n_debug_info, ptr %133, i32 0, i32 0
  %135 = load ptr, ptr %134, align 8, !tbaa !9
  %136 = getelementptr inbounds i8, ptr %135, i64 21
  %137 = call ptr @strrchr(ptr noundef %136, i32 noundef 47) #6
  %138 = getelementptr inbounds i8, ptr %137, i64 1
  br label %144

139:                                              ; preds = %123
  %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 !9
  %143 = getelementptr inbounds i8, ptr %142, i64 21
  br label %144

144:                                              ; preds = %139, %132
  %145 = phi ptr [ %138, %132 ], [ %143, %139 ]
  %146 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %147 = getelementptr inbounds %struct.s2n_debug_info, ptr %146, i32 0, i32 1
  store ptr %145, ptr %147, align 8, !tbaa !11
  %148 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %148, align 4, !tbaa !12
  %149 = call i32 @s2n_calculate_stacktrace()
  br label %150

150:                                              ; preds = %144
  store i32 -1, ptr %3, align 4
  br label %185

151:                                              ; No predecessors!
  br label %152

152:                                              ; preds = %151, %118
  br label %153

153:                                              ; preds = %152
  br label %154

154:                                              ; preds = %153
  %155 = load ptr, ptr @cert_chain, align 8, !tbaa !5
  %156 = call i32 @s2n_read_test_pem(ptr noundef @.str.4, ptr noundef %155, i64 noundef 12000)
  %157 = icmp sgt i32 %156, -1
  br i1 %157, label %159, label %158

158:                                              ; preds = %154
  store i32 -1, ptr %3, align 4
  br label %185

159:                                              ; preds = %154
  br label %160

160:                                              ; preds = %159
  br label %161

161:                                              ; preds = %160
  %162 = load ptr, ptr @private_key, align 8, !tbaa !5
  %163 = call i32 @s2n_read_test_pem(ptr noundef @.str.5, ptr noundef %162, i64 noundef 12000)
  %164 = icmp sgt i32 %163, -1
  br i1 %164, label %166, label %165

165:                                              ; preds = %161
  store i32 -1, ptr %3, align 4
  br label %185

166:                                              ; preds = %161
  br label %167

167:                                              ; preds = %166
  br label %168

168:                                              ; preds = %167
  %169 = load ptr, ptr @default_cert, align 8, !tbaa !5
  %170 = load ptr, ptr @cert_chain, align 8, !tbaa !5
  %171 = load ptr, ptr @private_key, align 8, !tbaa !5
  %172 = call i32 @s2n_cert_chain_and_key_load_pem(ptr noundef %169, ptr noundef %170, ptr noundef %171)
  %173 = icmp sgt i32 %172, -1
  br i1 %173, label %175, label %174

174:                                              ; preds = %168
  store i32 -1, ptr %3, align 4
  br label %185

175:                                              ; preds = %168
  br label %176

176:                                              ; preds = %175
  br label %177

177:                                              ; preds = %176
  %178 = load ptr, ptr @client_config, align 8, !tbaa !5
  %179 = load ptr, ptr @default_cert, align 8, !tbaa !5
  %180 = call i32 @s2n_config_add_cert_chain_and_key_to_store(ptr noundef %178, ptr noundef %179)
  %181 = icmp sgt i32 %180, -1
  br i1 %181, label %183, label %182

182:                                              ; preds = %177
  store i32 -1, ptr %3, align 4
  br label %185

183:                                              ; preds = %177
  br label %184

184:                                              ; preds = %183
  store i32 0, ptr %3, align 4
  br label %185

185:                                              ; preds = %184, %182, %174, %165, %158, %150, %113, %76, %39
  %186 = load i32, ptr %3, align 4
  ret i32 %186
}

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #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

declare ptr @s2n_cert_chain_and_key_new() #4

declare ptr @s2n_config_new() #4

declare i32 @s2n_read_test_pem(ptr noundef, ptr noundef, i64 noundef) #4

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

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

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 = { nounwind allocsize(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 #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 = { nounwind allocsize(0) }
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, !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}


; 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 }

@cert_chain = external hidden local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [111 x i8], align 1
@_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
@private_key = external hidden local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [111 x i8], align 1
@default_cert = external dso_local local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [111 x i8], align 1
@client_config = external dso_local local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [111 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [58 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @s2n_fuzz_init(ptr nocapture noundef readnone %0, ptr nocapture noundef readnone %1) local_unnamed_addr #0 {
  %3 = tail call noalias dereferenceable_or_null(12000) ptr @malloc(i64 noundef 12000) #5
  store ptr %3, ptr @cert_chain, align 8, !tbaa !5
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %4, label %12

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

12:                                               ; preds = %2
  %13 = tail call noalias dereferenceable_or_null(12000) ptr @malloc(i64 noundef 12000) #5
  store ptr %13, ptr @private_key, align 8, !tbaa !5
  %.not6 = icmp eq ptr %13, null
  br i1 %.not6, label %14, label %22

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

22:                                               ; preds = %12
  %23 = tail call ptr @s2n_cert_chain_and_key_new() #7
  store ptr %23, ptr @default_cert, align 8, !tbaa !5
  %.not8 = icmp eq ptr %23, null
  br i1 %.not8, label %24, label %32

24:                                               ; preds = %22
  %25 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.2, ptr %25, align 8, !tbaa !9
  %26 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.2, i64 21), i32 noundef 47) #6
  %.not9 = icmp eq ptr %26, null
  %27 = getelementptr inbounds i8, ptr %26, i64 1
  %28 = select i1 %.not9, ptr getelementptr inbounds (i8, ptr @.str.2, i64 21), ptr %27
  %29 = getelementptr inbounds i8, ptr %25, i64 8
  store ptr %28, ptr %29, align 8, !tbaa !11
  %30 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %30, align 4, !tbaa !12
  %31 = tail call i32 @s2n_calculate_stacktrace() #7
  br label %60

32:                                               ; preds = %22
  %33 = tail call ptr @s2n_config_new() #7
  store ptr %33, ptr @client_config, align 8, !tbaa !5
  %.not10 = icmp eq ptr %33, null
  br i1 %.not10, label %34, label %42

34:                                               ; preds = %32
  %35 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.3, ptr %35, align 8, !tbaa !9
  %36 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.3, i64 21), i32 noundef 47) #6
  %.not11 = icmp eq ptr %36, null
  %37 = getelementptr inbounds i8, ptr %36, i64 1
  %38 = select i1 %.not11, ptr getelementptr inbounds (i8, ptr @.str.3, i64 21), ptr %37
  %39 = getelementptr inbounds i8, ptr %35, i64 8
  store ptr %38, ptr %39, align 8, !tbaa !11
  %40 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %40, align 4, !tbaa !12
  %41 = tail call i32 @s2n_calculate_stacktrace() #7
  br label %60

42:                                               ; preds = %32
  %43 = load ptr, ptr @cert_chain, align 8, !tbaa !5
  %44 = tail call i32 @s2n_read_test_pem(ptr noundef nonnull @.str.4, ptr noundef %43, i64 noundef 12000) #7
  %45 = icmp sgt i32 %44, -1
  br i1 %45, label %46, label %60

46:                                               ; preds = %42
  %47 = load ptr, ptr @private_key, align 8, !tbaa !5
  %48 = tail call i32 @s2n_read_test_pem(ptr noundef nonnull @.str.5, ptr noundef %47, i64 noundef 12000) #7
  %49 = icmp sgt i32 %48, -1
  br i1 %49, label %50, label %60

50:                                               ; preds = %46
  %51 = load ptr, ptr @default_cert, align 8, !tbaa !5
  %52 = load ptr, ptr @cert_chain, align 8, !tbaa !5
  %53 = load ptr, ptr @private_key, align 8, !tbaa !5
  %54 = tail call i32 @s2n_cert_chain_and_key_load_pem(ptr noundef %51, ptr noundef %52, ptr noundef %53) #7
  %55 = icmp sgt i32 %54, -1
  br i1 %55, label %56, label %60

56:                                               ; preds = %50
  %57 = load ptr, ptr @client_config, align 8, !tbaa !5
  %58 = load ptr, ptr @default_cert, align 8, !tbaa !5
  %59 = tail call i32 @s2n_config_add_cert_chain_and_key_to_store(ptr noundef %57, ptr noundef %58) #7
  %.lobit = ashr i32 %59, 31
  br label %60

60:                                               ; preds = %56, %50, %46, %42, %34, %24, %14, %4
  %.0 = phi i32 [ -1, %34 ], [ -1, %24 ], [ -1, %14 ], [ -1, %4 ], [ -1, %42 ], [ -1, %46 ], [ -1, %50 ], [ %.lobit, %56 ]
  ret i32 %.0
}

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #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

declare ptr @s2n_cert_chain_and_key_new() local_unnamed_addr #4

declare ptr @s2n_config_new() local_unnamed_addr #4

declare i32 @s2n_read_test_pem(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #4

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

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

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 nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { 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 = { nounwind allocsize(0) }
attributes #6 = { nounwind willreturn memory(read) }
attributes #7 = { 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}


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