; LLVM IR from aws/s2n-tls :: tests/unit (s2n_self_talk_session_id_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.session_cache_entry = type { [32 x i8], i8, [255 x i8], i8, i8 }

@s2n_use_color_in_output = external dso_local global i8, align 1
@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [101 x i8], align 1
@test_count = external dso_local global i32, align 4
@.str.1 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [88 x i8], align 1
@s2n_errno = external thread_local global i32, align 4
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [90 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [42 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @cache_store_callback(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4, ptr noundef %5, i64 noundef %6) #0 {
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i8, align 1
  %19 = alloca i64, align 8
  %20 = alloca i32, align 4
  %21 = alloca i64, align 8
  %22 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store i64 %2, ptr %11, align 8, !tbaa !9
  store ptr %3, ptr %12, align 8, !tbaa !5
  store i64 %4, ptr %13, align 8, !tbaa !9
  store ptr %5, ptr %14, align 8, !tbaa !5
  store i64 %6, ptr %15, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %23 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %23, ptr %16, align 8, !tbaa !5
  %24 = load i64, ptr %13, align 8, !tbaa !9
  %25 = icmp eq i64 %24, 0
  br i1 %25, label %29, label %26

26:                                               ; preds = %7
  %27 = load i64, ptr %13, align 8, !tbaa !9
  %28 = icmp ugt i64 %27, 32
  br i1 %28, label %29, label %30

29:                                               ; preds = %26, %7
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %17, align 4
  br label %197

30:                                               ; preds = %26
  %31 = load i64, ptr %15, align 8, !tbaa !9
  %32 = icmp eq i64 %31, 0
  br i1 %32, label %36, label %33

33:                                               ; preds = %30
  %34 = load i64, ptr %15, align 8, !tbaa !9
  %35 = icmp ugt i64 %34, 255
  br i1 %35, label %36, label %37

36:                                               ; preds = %33, %30
  store i32 -1, ptr %8, align 4
  store i32 1, ptr %17, align 4
  br label %197

37:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #8
  %38 = load ptr, ptr %12, align 8, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %38, i64 0
  %40 = load i8, ptr %39, align 1, !tbaa !11
  store i8 %40, ptr %18, align 1, !tbaa !11
  br label %41

41:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %42 = load i64, ptr %13, align 8, !tbaa !9
  store i64 %42, ptr %19, align 8, !tbaa !9
  %43 = load i64, ptr %19, align 8, !tbaa !9
  %44 = icmp ne i64 %43, 0
  br i1 %44, label %45, label %109

45:                                               ; preds = %41
  %46 = load ptr, ptr %16, align 8, !tbaa !5
  %47 = load i8, ptr %18, align 1, !tbaa !11
  %48 = zext i8 %47 to i64
  %49 = getelementptr inbounds %struct.session_cache_entry, ptr %46, i64 %48
  %50 = getelementptr inbounds %struct.session_cache_entry, ptr %49, i32 0, i32 0
  %51 = getelementptr inbounds [32 x i8], ptr %50, i64 0, i64 0
  %52 = load ptr, ptr %12, align 8, !tbaa !5
  %53 = load i64, ptr %19, align 8, !tbaa !9
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %51, ptr align 1 %52, i64 %53, i1 false)
  %54 = icmp eq ptr %51, null
  br i1 %54, label %55, label %108

55:                                               ; preds = %45
  br label %56

56:                                               ; preds = %55
  br label %57

57:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %58 = call ptr @__errno_location() #9
  %59 = load i32, ptr %58, align 4, !tbaa !12
  store i32 %59, ptr %20, align 4, !tbaa !12
  %60 = load ptr, ptr @stderr, align 8, !tbaa !5
  %61 = call i32 @s2n_print_stacktrace(ptr noundef %60)
  %62 = load i8, ptr @s2n_use_color_in_output, align 1, !tbaa !14, !range !16, !noundef !17
  %63 = trunc i8 %62 to i1
  br i1 %63, label %64, label %86

64:                                               ; preds = %57
  %65 = load ptr, ptr @stderr, align 8, !tbaa !5
  %66 = call i32 @fileno(ptr noundef %65) #8
  %67 = call i32 @isatty(i32 noundef %66) #8
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %69, label %86

69:                                               ; preds = %64
  %70 = load i32, ptr %20, align 4, !tbaa !12
  %71 = call ptr @__errno_location() #9
  store i32 %70, ptr %71, align 4, !tbaa !12
  %72 = load ptr, ptr @stderr, align 8, !tbaa !5
  %73 = load i32, ptr @test_count, align 4, !tbaa !12
  %74 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %75 = load i32, ptr %74, align 4, !tbaa !12
  %76 = call ptr @s2n_strerror(i32 noundef %75, ptr noundef @.str.3)
  %77 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %78 = load i32, ptr %77, align 4, !tbaa !12
  %79 = call ptr @s2n_strerror_debug(i32 noundef %78, ptr noundef @.str.3)
  %80 = call ptr @__errno_location() #9
  %81 = load i32, ptr %80, align 4, !tbaa !12
  %82 = call ptr @strerror(i32 noundef %81) #8
  %83 = call ptr @__errno_location() #9
  %84 = load i32, ptr %83, align 4, !tbaa !12
  %85 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %72, ptr noundef @.str, i32 noundef %73, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 57, ptr noundef %76, ptr noundef %79, ptr noundef %82, i32 noundef %84) #8
  br label %103

86:                                               ; preds = %64, %57
  %87 = load i32, ptr %20, align 4, !tbaa !12
  %88 = call ptr @__errno_location() #9
  store i32 %87, ptr %88, align 4, !tbaa !12
  %89 = load ptr, ptr @stderr, align 8, !tbaa !5
  %90 = load i32, ptr @test_count, align 4, !tbaa !12
  %91 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %92 = load i32, ptr %91, align 4, !tbaa !12
  %93 = call ptr @s2n_strerror(i32 noundef %92, ptr noundef @.str.3)
  %94 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %95 = load i32, ptr %94, align 4, !tbaa !12
  %96 = call ptr @s2n_strerror_debug(i32 noundef %95, ptr noundef @.str.3)
  %97 = call ptr @__errno_location() #9
  %98 = load i32, ptr %97, align 4, !tbaa !12
  %99 = call ptr @strerror(i32 noundef %98) #8
  %100 = call ptr @__errno_location() #9
  %101 = load i32, ptr %100, align 4, !tbaa !12
  %102 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %89, ptr noundef @.str.4, i32 noundef %90, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 57, ptr noundef %93, ptr noundef %96, ptr noundef %99, i32 noundef %101) #8
  br label %103

103:                                              ; preds = %86, %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %104

104:                                              ; preds = %103
  br label %105

105:                                              ; preds = %104
  call void @exit(i32 noundef 1) #10
  unreachable

106:                                              ; No predecessors!
  br label %107

107:                                              ; preds = %106
  br label %108

108:                                              ; preds = %107, %45
  br label %109

109:                                              ; preds = %108, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %110

110:                                              ; preds = %109
  br label %111

111:                                              ; preds = %110
  br label %112

112:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %113 = load i64, ptr %15, align 8, !tbaa !9
  store i64 %113, ptr %21, align 8, !tbaa !9
  %114 = load i64, ptr %21, align 8, !tbaa !9
  %115 = icmp ne i64 %114, 0
  br i1 %115, label %116, label %180

116:                                              ; preds = %112
  %117 = load ptr, ptr %16, align 8, !tbaa !5
  %118 = load i8, ptr %18, align 1, !tbaa !11
  %119 = zext i8 %118 to i64
  %120 = getelementptr inbounds %struct.session_cache_entry, ptr %117, i64 %119
  %121 = getelementptr inbounds %struct.session_cache_entry, ptr %120, i32 0, i32 2
  %122 = getelementptr inbounds [255 x i8], ptr %121, i64 0, i64 0
  %123 = load ptr, ptr %14, align 8, !tbaa !5
  %124 = load i64, ptr %21, align 8, !tbaa !9
  call void @llvm.memmove.p0.p0.i64(ptr align 1 %122, ptr align 1 %123, i64 %124, i1 false)
  %125 = icmp eq ptr %122, null
  br i1 %125, label %126, label %179

126:                                              ; preds = %116
  br label %127

127:                                              ; preds = %126
  br label %128

128:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #8
  %129 = call ptr @__errno_location() #9
  %130 = load i32, ptr %129, align 4, !tbaa !12
  store i32 %130, ptr %22, align 4, !tbaa !12
  %131 = load ptr, ptr @stderr, align 8, !tbaa !5
  %132 = call i32 @s2n_print_stacktrace(ptr noundef %131)
  %133 = load i8, ptr @s2n_use_color_in_output, align 1, !tbaa !14, !range !16, !noundef !17
  %134 = trunc i8 %133 to i1
  br i1 %134, label %135, label %157

135:                                              ; preds = %128
  %136 = load ptr, ptr @stderr, align 8, !tbaa !5
  %137 = call i32 @fileno(ptr noundef %136) #8
  %138 = call i32 @isatty(i32 noundef %137) #8
  %139 = icmp ne i32 %138, 0
  br i1 %139, label %140, label %157

140:                                              ; preds = %135
  %141 = load i32, ptr %22, align 4, !tbaa !12
  %142 = call ptr @__errno_location() #9
  store i32 %141, ptr %142, align 4, !tbaa !12
  %143 = load ptr, ptr @stderr, align 8, !tbaa !5
  %144 = load i32, ptr @test_count, align 4, !tbaa !12
  %145 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %146 = load i32, ptr %145, align 4, !tbaa !12
  %147 = call ptr @s2n_strerror(i32 noundef %146, ptr noundef @.str.3)
  %148 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %149 = load i32, ptr %148, align 4, !tbaa !12
  %150 = call ptr @s2n_strerror_debug(i32 noundef %149, ptr noundef @.str.3)
  %151 = call ptr @__errno_location() #9
  %152 = load i32, ptr %151, align 4, !tbaa !12
  %153 = call ptr @strerror(i32 noundef %152) #8
  %154 = call ptr @__errno_location() #9
  %155 = load i32, ptr %154, align 4, !tbaa !12
  %156 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %143, ptr noundef @.str, i32 noundef %144, ptr noundef @.str.5, ptr noundef @.str.2, i32 noundef 58, ptr noundef %147, ptr noundef %150, ptr noundef %153, i32 noundef %155) #8
  br label %174

157:                                              ; preds = %135, %128
  %158 = load i32, ptr %22, align 4, !tbaa !12
  %159 = call ptr @__errno_location() #9
  store i32 %158, ptr %159, align 4, !tbaa !12
  %160 = load ptr, ptr @stderr, align 8, !tbaa !5
  %161 = load i32, ptr @test_count, align 4, !tbaa !12
  %162 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %163 = load i32, ptr %162, align 4, !tbaa !12
  %164 = call ptr @s2n_strerror(i32 noundef %163, ptr noundef @.str.3)
  %165 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %166 = load i32, ptr %165, align 4, !tbaa !12
  %167 = call ptr @s2n_strerror_debug(i32 noundef %166, ptr noundef @.str.3)
  %168 = call ptr @__errno_location() #9
  %169 = load i32, ptr %168, align 4, !tbaa !12
  %170 = call ptr @strerror(i32 noundef %169) #8
  %171 = call ptr @__errno_location() #9
  %172 = load i32, ptr %171, align 4, !tbaa !12
  %173 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %160, ptr noundef @.str.4, i32 noundef %161, ptr noundef @.str.5, ptr noundef @.str.2, i32 noundef 58, ptr noundef %164, ptr noundef %167, ptr noundef %170, i32 noundef %172) #8
  br label %174

174:                                              ; preds = %157, %140
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #8
  br label %175

175:                                              ; preds = %174
  br label %176

176:                                              ; preds = %175
  call void @exit(i32 noundef 1) #10
  unreachable

177:                                              ; No predecessors!
  br label %178

178:                                              ; preds = %177
  br label %179

179:                                              ; preds = %178, %116
  br label %180

180:                                              ; preds = %179, %112
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %181

181:                                              ; preds = %180
  br label %182

182:                                              ; preds = %181
  %183 = load i64, ptr %13, align 8, !tbaa !9
  %184 = trunc i64 %183 to i8
  %185 = load ptr, ptr %16, align 8, !tbaa !5
  %186 = load i8, ptr %18, align 1, !tbaa !11
  %187 = zext i8 %186 to i64
  %188 = getelementptr inbounds %struct.session_cache_entry, ptr %185, i64 %187
  %189 = getelementptr inbounds %struct.session_cache_entry, ptr %188, i32 0, i32 1
  store i8 %184, ptr %189, align 1, !tbaa !18
  %190 = load i64, ptr %15, align 8, !tbaa !9
  %191 = trunc i64 %190 to i8
  %192 = load ptr, ptr %16, align 8, !tbaa !5
  %193 = load i8, ptr %18, align 1, !tbaa !11
  %194 = zext i8 %193 to i64
  %195 = getelementptr inbounds %struct.session_cache_entry, ptr %192, i64 %194
  %196 = getelementptr inbounds %struct.session_cache_entry, ptr %195, i32 0, i32 3
  store i8 %191, ptr %196, align 1, !tbaa !20
  store i32 0, ptr %8, align 4
  store i32 1, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #8
  br label %197

197:                                              ; preds = %182, %36, %29
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  %198 = load i32, ptr %8, align 4
  ret i32 %198
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #2

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #3

declare i32 @s2n_print_stacktrace(ptr noundef) #4

; Function Attrs: nounwind
declare i32 @isatty(i32 noundef) #5

; Function Attrs: nounwind
declare i32 @fileno(ptr noundef) #5

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #5

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

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

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

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) #5

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #7

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nounwind willreturn memory(none) "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 "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { noreturn nounwind "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 #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(none) }
attributes #10 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"_Bool", !7, i64 0}
!16 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!19, !7, i64 32}
!19 = !{!"session_cache_entry", !7, i64 0, !7, i64 32, !7, i64 33, !7, i64 288, !7, i64 289}
!20 = !{!19, !7, i64 288}


; 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.session_cache_entry = type { [32 x i8], i8, [255 x i8], i8, i8 }

@s2n_use_color_in_output = external dso_local local_unnamed_addr global i8, align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [101 x i8], align 1
@test_count = external dso_local local_unnamed_addr global i32, align 4
@.str.1 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [88 x i8], align 1
@s2n_errno = external thread_local local_unnamed_addr global i32, align 4
@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [90 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 -1, 1) i32 @cache_store_callback(ptr nocapture noundef readnone %0, ptr noundef writeonly %1, i64 noundef %2, ptr nocapture noundef readonly %3, i64 noundef %4, ptr nocapture noundef readonly %5, i64 noundef %6) local_unnamed_addr #0 {
  %8 = add i64 %4, -33
  %or.cond = icmp ult i64 %8, -32
  %9 = add i64 %6, -256
  %or.cond3 = icmp ult i64 %9, -255
  %or.cond33 = or i1 %or.cond, %or.cond3
  br i1 %or.cond33, label %45, label %10

10:                                               ; preds = %7
  %11 = load i8, ptr %3, align 1, !tbaa !5
  %12 = zext i8 %11 to i64
  %13 = getelementptr inbounds %struct.session_cache_entry, ptr %1, i64 %12
  tail call void @llvm.memmove.p0.p0.i64(ptr align 1 %13, ptr nonnull align 1 %3, i64 %4, i1 false)
  %14 = icmp eq ptr %1, null
  br i1 %14, label %15, label %39

15:                                               ; preds = %10
  %16 = tail call ptr @__errno_location() #8
  %17 = load i32, ptr %16, align 4, !tbaa !8
  %18 = load ptr, ptr @stderr, align 8, !tbaa !10
  %19 = tail call i32 @s2n_print_stacktrace(ptr noundef %18) #9
  %20 = load i8, ptr @s2n_use_color_in_output, align 1, !tbaa !12, !range !14, !noundef !15
  %21 = trunc nuw i8 %20 to i1
  br i1 %21, label %22, label %26

22:                                               ; preds = %15
  %23 = load ptr, ptr @stderr, align 8, !tbaa !10
  %24 = tail call i32 @fileno(ptr noundef %23) #9
  %25 = tail call i32 @isatty(i32 noundef %24) #9
  %.not = icmp eq i32 %25, 0
  br i1 %.not, label %26, label %27

26:                                               ; preds = %22, %15
  br label %27

27:                                               ; preds = %22, %26
  %.str.4.sink = phi ptr [ @.str.4, %26 ], [ @.str, %22 ]
  store i32 %17, ptr %16, align 4, !tbaa !8
  %28 = load ptr, ptr @stderr, align 8, !tbaa !10
  %29 = load i32, ptr @test_count, align 4, !tbaa !8
  %30 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %31 = load i32, ptr %30, align 4, !tbaa !8
  %32 = tail call ptr @s2n_strerror(i32 noundef %31, ptr noundef nonnull @.str.3) #9
  %33 = load i32, ptr %30, align 4, !tbaa !8
  %34 = tail call ptr @s2n_strerror_debug(i32 noundef %33, ptr noundef nonnull @.str.3) #9
  %35 = load i32, ptr %16, align 4, !tbaa !8
  %36 = tail call ptr @strerror(i32 noundef %35) #9
  %37 = load i32, ptr %16, align 4, !tbaa !8
  %38 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef nonnull %.str.4.sink, i32 noundef %29, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 57, ptr noundef %32, ptr noundef %34, ptr noundef %36, i32 noundef %37) #10
  tail call void @exit(i32 noundef 1) #11
  unreachable

39:                                               ; preds = %10
  %40 = getelementptr inbounds %struct.session_cache_entry, ptr %1, i64 %12, i32 2
  tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 1 %40, ptr align 1 %5, i64 %6, i1 false)
  %41 = trunc nuw nsw i64 %4 to i8
  %42 = getelementptr inbounds i8, ptr %13, i64 32
  store i8 %41, ptr %42, align 1, !tbaa !16
  %43 = trunc nuw i64 %6 to i8
  %44 = getelementptr inbounds i8, ptr %13, i64 288
  store i8 %43, ptr %44, align 1, !tbaa !18
  br label %45

45:                                               ; preds = %7, %39
  %.0 = phi i32 [ 0, %39 ], [ -1, %7 ]
  ret i32 %.0
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #1

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #2

declare i32 @s2n_print_stacktrace(ptr noundef) local_unnamed_addr #3

; Function Attrs: nounwind
declare i32 @isatty(i32 noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @fileno(ptr nocapture noundef) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #5

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

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

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

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) local_unnamed_addr #4

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #7

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 "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 = { nofree nounwind "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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { noreturn nounwind "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 #8 = { nounwind willreturn memory(none) }
attributes #9 = { nounwind }
attributes #10 = { cold nounwind }
attributes #11 = { noreturn 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !6, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"_Bool", !6, i64 0}
!14 = !{i8 0, i8 2}
!15 = !{}
!16 = !{!17, !6, i64 32}
!17 = !{!"session_cache_entry", !6, i64 0, !6, i64 32, !6, i64 33, !6, i64 288, !6, i64 289}
!18 = !{!17, !6, i64 288}


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