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

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

@.str = external hidden unnamed_addr constant [96 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
@.str.1 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [96 x i8], align 1

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

12:                                               ; preds = %3
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = call i32 @s2n_stuffer_validate(ptr noundef %13)
  %15 = getelementptr inbounds %struct.s2n_result, ptr %9, i32 0, i32 0
  store i32 %14, ptr %15, align 4
  %16 = getelementptr inbounds %struct.s2n_result, ptr %9, i32 0, i32 0
  %17 = load i32, ptr %16, align 4
  %18 = call zeroext i1 @s2n_result_is_ok(i32 %17)
  %19 = xor i1 %18, true
  %20 = xor i1 %19, true
  %21 = zext i1 %20 to i32
  %22 = sext i32 %21 to i64
  %23 = call i64 @llvm.expect.i64(i64 %22, i64 1)
  %24 = icmp ne i64 %23, 0
  br i1 %24, label %25, label %27

25:                                               ; preds = %12
  %26 = getelementptr inbounds %struct.s2n_result, ptr %8, i32 0, i32 0
  store i32 0, ptr %26, align 4, !tbaa !9
  br label %29

27:                                               ; preds = %12
  %28 = getelementptr inbounds %struct.s2n_result, ptr %8, i32 0, i32 0
  store i32 -1, ptr %28, align 4, !tbaa !9
  br label %29

29:                                               ; preds = %27, %25
  %30 = getelementptr inbounds %struct.s2n_result, ptr %8, i32 0, i32 0
  %31 = load i32, ptr %30, align 4
  %32 = call zeroext i1 @s2n_result_is_ok(i32 %31)
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  store i32 -1, ptr %4, align 4
  br label %194

34:                                               ; preds = %29
  br label %35

35:                                               ; preds = %34
  br label %36

36:                                               ; preds = %35
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = call i32 @s2n_stuffer_validate(ptr noundef %37)
  %39 = getelementptr inbounds %struct.s2n_result, ptr %11, i32 0, i32 0
  store i32 %38, ptr %39, align 4
  %40 = getelementptr inbounds %struct.s2n_result, ptr %11, i32 0, i32 0
  %41 = load i32, ptr %40, align 4
  %42 = call zeroext i1 @s2n_result_is_ok(i32 %41)
  %43 = xor i1 %42, true
  %44 = xor i1 %43, true
  %45 = zext i1 %44 to i32
  %46 = sext i32 %45 to i64
  %47 = call i64 @llvm.expect.i64(i64 %46, i64 1)
  %48 = icmp ne i64 %47, 0
  br i1 %48, label %49, label %51

49:                                               ; preds = %36
  %50 = getelementptr inbounds %struct.s2n_result, ptr %10, i32 0, i32 0
  store i32 0, ptr %50, align 4, !tbaa !9
  br label %53

51:                                               ; preds = %36
  %52 = getelementptr inbounds %struct.s2n_result, ptr %10, i32 0, i32 0
  store i32 -1, ptr %52, align 4, !tbaa !9
  br label %53

53:                                               ; preds = %51, %49
  %54 = getelementptr inbounds %struct.s2n_result, ptr %10, i32 0, i32 0
  %55 = load i32, ptr %54, align 4
  %56 = call zeroext i1 @s2n_result_is_ok(i32 %55)
  br i1 %56, label %58, label %57

57:                                               ; preds = %53
  store i32 -1, ptr %4, align 4
  br label %194

58:                                               ; preds = %53
  br label %59

59:                                               ; preds = %58
  br label %60

60:                                               ; preds = %59
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = icmp ne ptr %61, null
  br i1 %62, label %94, label %63

63:                                               ; preds = %60
  br label %64

64:                                               ; preds = %63
  br label %65

65:                                               ; preds = %64
  %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
  store ptr @.str, ptr %67, align 8, !tbaa !12
  %68 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %69 = getelementptr inbounds %struct.s2n_debug_info, ptr %68, i32 0, i32 0
  %70 = load ptr, ptr %69, align 8, !tbaa !12
  %71 = getelementptr inbounds i8, ptr %70, i64 21
  %72 = call ptr @strrchr(ptr noundef %71, i32 noundef 47) #6
  %73 = icmp ne ptr %72, null
  br i1 %73, label %74, label %81

74:                                               ; preds = %65
  %75 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %76 = getelementptr inbounds %struct.s2n_debug_info, ptr %75, i32 0, i32 0
  %77 = load ptr, ptr %76, align 8, !tbaa !12
  %78 = getelementptr inbounds i8, ptr %77, i64 21
  %79 = call ptr @strrchr(ptr noundef %78, i32 noundef 47) #6
  %80 = getelementptr inbounds i8, ptr %79, i64 1
  br label %86

81:                                               ; preds = %65
  %82 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %83 = getelementptr inbounds %struct.s2n_debug_info, ptr %82, i32 0, i32 0
  %84 = load ptr, ptr %83, align 8, !tbaa !12
  %85 = getelementptr inbounds i8, ptr %84, i64 21
  br label %86

86:                                               ; preds = %81, %74
  %87 = phi ptr [ %80, %74 ], [ %85, %81 ]
  %88 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %89 = getelementptr inbounds %struct.s2n_debug_info, ptr %88, i32 0, i32 1
  store ptr %87, ptr %89, align 8, !tbaa !14
  %90 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653193, ptr %90, align 4, !tbaa !15
  %91 = call i32 @s2n_calculate_stacktrace()
  br label %92

92:                                               ; preds = %86
  store i32 -1, ptr %4, align 4
  br label %194

93:                                               ; No predecessors!
  br label %94

94:                                               ; preds = %93, %60
  br label %95

95:                                               ; preds = %94
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = call i32 @s2n_stuffer_data_from_pem(ptr noundef %96, ptr noundef %97, ptr noundef @.str.1)
  %99 = icmp eq i32 %98, 0
  br i1 %99, label %100, label %102

100:                                              ; preds = %95
  %101 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 6, ptr %101, align 4, !tbaa !15
  store i32 0, ptr %4, align 4
  br label %194

102:                                              ; preds = %95
  br label %103

103:                                              ; preds = %102
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = call i32 @s2n_stuffer_reread(ptr noundef %104)
  %106 = icmp sgt i32 %105, -1
  br i1 %106, label %108, label %107

107:                                              ; preds = %103
  store i32 -1, ptr %4, align 4
  br label %194

108:                                              ; preds = %103
  br label %109

109:                                              ; preds = %108
  br label %110

110:                                              ; preds = %109
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = call i32 @s2n_stuffer_reread(ptr noundef %111)
  %113 = icmp sgt i32 %112, -1
  br i1 %113, label %115, label %114

114:                                              ; preds = %110
  store i32 -1, ptr %4, align 4
  br label %194

115:                                              ; preds = %110
  br label %116

116:                                              ; preds = %115
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = call i32 @s2n_stuffer_data_from_pem(ptr noundef %117, ptr noundef %118, ptr noundef @.str.2)
  %120 = icmp ne i32 %119, 0
  br i1 %120, label %121, label %129

121:                                              ; preds = %116
  br label %122

122:                                              ; preds = %121
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = call i32 @s2n_stuffer_reread(ptr noundef %123)
  %125 = icmp sgt i32 %124, -1
  br i1 %125, label %127, label %126

126:                                              ; preds = %122
  store i32 -1, ptr %4, align 4
  br label %194

127:                                              ; preds = %122
  br label %128

128:                                              ; preds = %127
  br label %129

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

130:                                              ; preds = %129
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  %132 = call i32 @s2n_stuffer_wipe(ptr noundef %131)
  %133 = icmp sgt i32 %132, -1
  br i1 %133, label %135, label %134

134:                                              ; preds = %130
  store i32 -1, ptr %4, align 4
  br label %194

135:                                              ; preds = %130
  br label %136

136:                                              ; preds = %135
  %137 = load ptr, ptr %5, align 8, !tbaa !5
  %138 = load ptr, ptr %6, align 8, !tbaa !5
  %139 = call i32 @s2n_stuffer_data_from_pem(ptr noundef %137, ptr noundef %138, ptr noundef @.str.3)
  %140 = icmp eq i32 %139, 0
  br i1 %140, label %141, label %143

141:                                              ; preds = %136
  %142 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 408, ptr %142, align 4, !tbaa !15
  store i32 0, ptr %4, align 4
  br label %194

143:                                              ; preds = %136
  br label %144

144:                                              ; preds = %143
  %145 = load ptr, ptr %5, align 8, !tbaa !5
  %146 = call i32 @s2n_stuffer_reread(ptr noundef %145)
  %147 = icmp sgt i32 %146, -1
  br i1 %147, label %149, label %148

148:                                              ; preds = %144
  store i32 -1, ptr %4, align 4
  br label %194

149:                                              ; preds = %144
  br label %150

150:                                              ; preds = %149
  br label %151

151:                                              ; preds = %150
  %152 = load ptr, ptr %6, align 8, !tbaa !5
  %153 = call i32 @s2n_stuffer_reread(ptr noundef %152)
  %154 = icmp sgt i32 %153, -1
  br i1 %154, label %156, label %155

155:                                              ; preds = %151
  store i32 -1, ptr %4, align 4
  br label %194

156:                                              ; preds = %151
  br label %157

157:                                              ; preds = %156
  %158 = load ptr, ptr %5, align 8, !tbaa !5
  %159 = load ptr, ptr %6, align 8, !tbaa !5
  %160 = call i32 @s2n_stuffer_data_from_pem(ptr noundef %158, ptr noundef %159, ptr noundef @.str.4)
  %161 = icmp eq i32 %160, 0
  br i1 %161, label %162, label %164

162:                                              ; preds = %157
  %163 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 6, ptr %163, align 4, !tbaa !15
  store i32 0, ptr %4, align 4
  br label %194

164:                                              ; preds = %157
  br label %165

165:                                              ; preds = %164
  br label %166

166:                                              ; preds = %165
  %167 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %168 = getelementptr inbounds %struct.s2n_debug_info, ptr %167, i32 0, i32 0
  store ptr @.str.5, ptr %168, align 8, !tbaa !12
  %169 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %170 = getelementptr inbounds %struct.s2n_debug_info, ptr %169, i32 0, i32 0
  %171 = load ptr, ptr %170, align 8, !tbaa !12
  %172 = getelementptr inbounds i8, ptr %171, i64 21
  %173 = call ptr @strrchr(ptr noundef %172, i32 noundef 47) #6
  %174 = icmp ne ptr %173, null
  br i1 %174, label %175, label %182

175:                                              ; preds = %166
  %176 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %177 = getelementptr inbounds %struct.s2n_debug_info, ptr %176, i32 0, i32 0
  %178 = load ptr, ptr %177, align 8, !tbaa !12
  %179 = getelementptr inbounds i8, ptr %178, i64 21
  %180 = call ptr @strrchr(ptr noundef %179, i32 noundef 47) #6
  %181 = getelementptr inbounds i8, ptr %180, i64 1
  br label %187

182:                                              ; preds = %166
  %183 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %184 = getelementptr inbounds %struct.s2n_debug_info, ptr %183, i32 0, i32 0
  %185 = load ptr, ptr %184, align 8, !tbaa !12
  %186 = getelementptr inbounds i8, ptr %185, i64 21
  br label %187

187:                                              ; preds = %182, %175
  %188 = phi ptr [ %181, %175 ], [ %186, %182 ]
  %189 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %190 = getelementptr inbounds %struct.s2n_debug_info, ptr %189, i32 0, i32 1
  store ptr %188, ptr %190, align 8, !tbaa !14
  %191 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762057, ptr %191, align 4, !tbaa !15
  %192 = call i32 @s2n_calculate_stacktrace()
  br label %193

193:                                              ; preds = %187
  store i32 -1, ptr %4, align 4
  br label %194

194:                                              ; preds = %193, %162, %155, %148, %141, %134, %126, %114, %107, %100, %92, %57, %33
  %195 = load i32, ptr %4, align 4
  ret i32 %195
}

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

declare i32 @s2n_stuffer_validate(ptr noundef) #2

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

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

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

declare i32 @s2n_calculate_stacktrace() #2

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

declare i32 @s2n_stuffer_reread(ptr noundef) #2

declare i32 @s2n_stuffer_wipe(ptr noundef) #2

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 = { 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 #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 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #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, !11, i64 0}
!10 = !{!"", !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !6, i64 0}
!13 = !{!"s2n_debug_info", !6, i64 0, !6, i64 8}
!14 = !{!13, !6, i64 8}
!15 = !{!11, !11, 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 }

@.str = external hidden unnamed_addr constant [96 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
@.str.1 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [96 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @s2n_stuffer_private_key_from_pem(ptr noundef %0, ptr noundef %1, ptr noundef writeonly %2) local_unnamed_addr #0 {
  %4 = tail call i32 @s2n_stuffer_validate(ptr noundef %0) #5
  %5 = tail call zeroext i1 @s2n_result_is_ok(i32 %4)
  %not. = xor i1 %5, true
  %. = sext i1 %not. to i32
  %6 = tail call zeroext i1 @s2n_result_is_ok(i32 %.)
  br i1 %6, label %7, label %60

7:                                                ; preds = %3
  %8 = tail call i32 @s2n_stuffer_validate(ptr noundef %1) #5
  %9 = tail call zeroext i1 @s2n_result_is_ok(i32 %8)
  %not.30 = xor i1 %9, true
  %.29 = sext i1 %not.30 to i32
  %10 = tail call zeroext i1 @s2n_result_is_ok(i32 %.29)
  br i1 %10, label %11, label %60

11:                                               ; preds = %7
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %12, label %20

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

20:                                               ; preds = %11
  %21 = tail call i32 @s2n_stuffer_data_from_pem(ptr noundef %0, ptr noundef %1, ptr noundef nonnull @.str.1)
  %22 = icmp eq i32 %21, 0
  br i1 %22, label %23, label %24

23:                                               ; preds = %20
  store i32 6, ptr %2, align 4, !tbaa !11
  br label %60

24:                                               ; preds = %20
  %25 = tail call i32 @s2n_stuffer_reread(ptr noundef %0) #5
  %26 = icmp sgt i32 %25, -1
  br i1 %26, label %27, label %60

27:                                               ; preds = %24
  %28 = tail call i32 @s2n_stuffer_reread(ptr noundef %1) #5
  %29 = icmp sgt i32 %28, -1
  br i1 %29, label %30, label %60

30:                                               ; preds = %27
  %31 = tail call i32 @s2n_stuffer_data_from_pem(ptr noundef %0, ptr noundef %1, ptr noundef nonnull @.str.2)
  %.not27 = icmp eq i32 %31, 0
  br i1 %.not27, label %35, label %32

32:                                               ; preds = %30
  %33 = tail call i32 @s2n_stuffer_reread(ptr noundef %0) #5
  %34 = icmp sgt i32 %33, -1
  br i1 %34, label %35, label %60

35:                                               ; preds = %30, %32
  %36 = tail call i32 @s2n_stuffer_wipe(ptr noundef %1) #5
  %37 = icmp sgt i32 %36, -1
  br i1 %37, label %38, label %60

38:                                               ; preds = %35
  %39 = tail call i32 @s2n_stuffer_data_from_pem(ptr noundef %0, ptr noundef %1, ptr noundef nonnull @.str.3)
  %40 = icmp eq i32 %39, 0
  br i1 %40, label %41, label %42

41:                                               ; preds = %38
  store i32 408, ptr %2, align 4, !tbaa !11
  br label %60

42:                                               ; preds = %38
  %43 = tail call i32 @s2n_stuffer_reread(ptr noundef %0) #5
  %44 = icmp sgt i32 %43, -1
  br i1 %44, label %45, label %60

45:                                               ; preds = %42
  %46 = tail call i32 @s2n_stuffer_reread(ptr noundef %1) #5
  %47 = icmp sgt i32 %46, -1
  br i1 %47, label %48, label %60

48:                                               ; preds = %45
  %49 = tail call i32 @s2n_stuffer_data_from_pem(ptr noundef %0, ptr noundef %1, ptr noundef nonnull @.str.4)
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %52

51:                                               ; preds = %48
  store i32 6, ptr %2, align 4, !tbaa !11
  br label %60

52:                                               ; preds = %48
  %53 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.5, ptr %53, align 8, !tbaa !5
  %54 = tail call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.5, i64 21), i32 noundef 47) #6
  %.not28 = icmp eq ptr %54, null
  %55 = getelementptr inbounds i8, ptr %54, i64 1
  %56 = select i1 %.not28, ptr getelementptr inbounds (i8, ptr @.str.5, i64 21), ptr %55
  %57 = getelementptr inbounds i8, ptr %53, i64 8
  store ptr %56, ptr %57, align 8, !tbaa !10
  %58 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 469762057, ptr %58, align 4, !tbaa !11
  %59 = tail call i32 @s2n_calculate_stacktrace() #5
  br label %60

60:                                               ; preds = %45, %42, %35, %32, %27, %24, %7, %3, %52, %51, %41, %23, %12
  %.0 = phi i32 [ 0, %23 ], [ 0, %41 ], [ 0, %51 ], [ -1, %52 ], [ -1, %12 ], [ -1, %3 ], [ -1, %7 ], [ -1, %24 ], [ -1, %27 ], [ -1, %32 ], [ -1, %35 ], [ -1, %42 ], [ -1, %45 ]
  ret i32 %.0
}

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

declare i32 @s2n_stuffer_validate(ptr noundef) local_unnamed_addr #2

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

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

declare i32 @s2n_calculate_stacktrace() local_unnamed_addr #2

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

declare i32 @s2n_stuffer_reread(ptr noundef) local_unnamed_addr #2

declare i32 @s2n_stuffer_wipe(ptr noundef) local_unnamed_addr #2

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 = { 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 #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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { 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 #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, !7, i64 0}
!6 = !{!"s2n_debug_info", !7, i64 0, !7, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!6, !7, i64 8}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !8, i64 0}


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