; LLVM IR from aws/s2n-tls :: tests/unit (s2n_seccomp_failure_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"

@s2n_use_color_in_output = external dso_local global i8, align 1
@s2n_fstat_success = external dso_local global i8, align 1
@s2n_open_success = external dso_local global i8, align 1
@test_count = external dso_local global i32, align 4
@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [101 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [83 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 [31 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [33 x i8], align 1
@stdout = external global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @s2n_detect_open_violation(i32 noundef %0) #0 {
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  store i32 %0, ptr %2, align 4, !tbaa !5
  br label %6

6:                                                ; preds = %1
  %7 = load i32, ptr @test_count, align 4, !tbaa !5
  %8 = add nsw i32 %7, 1
  store i32 %8, ptr @test_count, align 4, !tbaa !5
  %9 = load i32, ptr %2, align 4, !tbaa !5
  %10 = icmp eq i32 %9, 31
  br i1 %10, label %62, label %11

11:                                               ; preds = %6
  br label %12

12:                                               ; preds = %11
  br label %13

13:                                               ; preds = %12
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  %14 = call ptr @__errno_location() #8
  %15 = load i32, ptr %14, align 4, !tbaa !5
  store i32 %15, ptr %3, align 4, !tbaa !5
  %16 = load ptr, ptr @stderr, align 8, !tbaa !9
  %17 = call i32 @s2n_print_stacktrace(ptr noundef %16)
  %18 = load i8, ptr @s2n_use_color_in_output, align 1, !tbaa !11, !range !13, !noundef !14
  %19 = trunc i8 %18 to i1
  br i1 %19, label %20, label %42

20:                                               ; preds = %13
  %21 = load ptr, ptr @stderr, align 8, !tbaa !9
  %22 = call i32 @fileno(ptr noundef %21) #7
  %23 = call i32 @isatty(i32 noundef %22) #7
  %24 = icmp ne i32 %23, 0
  br i1 %24, label %25, label %42

25:                                               ; preds = %20
  %26 = load i32, ptr %3, align 4, !tbaa !5
  %27 = call ptr @__errno_location() #8
  store i32 %26, ptr %27, align 4, !tbaa !5
  %28 = load ptr, ptr @stderr, align 8, !tbaa !9
  %29 = load i32, ptr @test_count, align 4, !tbaa !5
  %30 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %31 = load i32, ptr %30, align 4, !tbaa !5
  %32 = call ptr @s2n_strerror(i32 noundef %31, ptr noundef @.str.3)
  %33 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = call ptr @s2n_strerror_debug(i32 noundef %34, ptr noundef @.str.3)
  %36 = call ptr @__errno_location() #8
  %37 = load i32, ptr %36, align 4, !tbaa !5
  %38 = call ptr @strerror(i32 noundef %37) #7
  %39 = call ptr @__errno_location() #8
  %40 = load i32, ptr %39, align 4, !tbaa !5
  %41 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %28, ptr noundef @.str, i32 noundef %29, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 28, ptr noundef %32, ptr noundef %35, ptr noundef %38, i32 noundef %40) #7
  br label %59

42:                                               ; preds = %20, %13
  %43 = load i32, ptr %3, align 4, !tbaa !5
  %44 = call ptr @__errno_location() #8
  store i32 %43, ptr %44, align 4, !tbaa !5
  %45 = load ptr, ptr @stderr, align 8, !tbaa !9
  %46 = load i32, ptr @test_count, align 4, !tbaa !5
  %47 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %48 = load i32, ptr %47, align 4, !tbaa !5
  %49 = call ptr @s2n_strerror(i32 noundef %48, ptr noundef @.str.3)
  %50 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %52 = call ptr @s2n_strerror_debug(i32 noundef %51, ptr noundef @.str.3)
  %53 = call ptr @__errno_location() #8
  %54 = load i32, ptr %53, align 4, !tbaa !5
  %55 = call ptr @strerror(i32 noundef %54) #7
  %56 = call ptr @__errno_location() #8
  %57 = load i32, ptr %56, align 4, !tbaa !5
  %58 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %45, ptr noundef @.str.4, i32 noundef %46, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 28, ptr noundef %49, ptr noundef %52, ptr noundef %55, i32 noundef %57) #7
  br label %59

59:                                               ; preds = %42, %25
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %60

60:                                               ; preds = %59
  call void @exit(i32 noundef 1) #9
  unreachable

61:                                               ; No predecessors!
  br label %62

62:                                               ; preds = %61, %6
  br label %63

63:                                               ; preds = %62
  br label %64

64:                                               ; preds = %63
  %65 = load i32, ptr @test_count, align 4, !tbaa !5
  %66 = add nsw i32 %65, 1
  store i32 %66, ptr @test_count, align 4, !tbaa !5
  %67 = load i8, ptr @s2n_fstat_success, align 1, !tbaa !11, !range !13, !noundef !14
  %68 = trunc i8 %67 to i1
  br i1 %68, label %120, label %69

69:                                               ; preds = %64
  br label %70

70:                                               ; preds = %69
  br label %71

71:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #7
  %72 = call ptr @__errno_location() #8
  %73 = load i32, ptr %72, align 4, !tbaa !5
  store i32 %73, ptr %4, align 4, !tbaa !5
  %74 = load ptr, ptr @stderr, align 8, !tbaa !9
  %75 = call i32 @s2n_print_stacktrace(ptr noundef %74)
  %76 = load i8, ptr @s2n_use_color_in_output, align 1, !tbaa !11, !range !13, !noundef !14
  %77 = trunc i8 %76 to i1
  br i1 %77, label %78, label %100

78:                                               ; preds = %71
  %79 = load ptr, ptr @stderr, align 8, !tbaa !9
  %80 = call i32 @fileno(ptr noundef %79) #7
  %81 = call i32 @isatty(i32 noundef %80) #7
  %82 = icmp ne i32 %81, 0
  br i1 %82, label %83, label %100

83:                                               ; preds = %78
  %84 = load i32, ptr %4, align 4, !tbaa !5
  %85 = call ptr @__errno_location() #8
  store i32 %84, ptr %85, align 4, !tbaa !5
  %86 = load ptr, ptr @stderr, align 8, !tbaa !9
  %87 = load i32, ptr @test_count, align 4, !tbaa !5
  %88 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %89 = load i32, ptr %88, align 4, !tbaa !5
  %90 = call ptr @s2n_strerror(i32 noundef %89, ptr noundef @.str.3)
  %91 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = call ptr @s2n_strerror_debug(i32 noundef %92, ptr noundef @.str.3)
  %94 = call ptr @__errno_location() #8
  %95 = load i32, ptr %94, align 4, !tbaa !5
  %96 = call ptr @strerror(i32 noundef %95) #7
  %97 = call ptr @__errno_location() #8
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %86, ptr noundef @.str, i32 noundef %87, ptr noundef @.str.5, ptr noundef @.str.2, i32 noundef 30, ptr noundef %90, ptr noundef %93, ptr noundef %96, i32 noundef %98) #7
  br label %117

100:                                              ; preds = %78, %71
  %101 = load i32, ptr %4, align 4, !tbaa !5
  %102 = call ptr @__errno_location() #8
  store i32 %101, ptr %102, align 4, !tbaa !5
  %103 = load ptr, ptr @stderr, align 8, !tbaa !9
  %104 = load i32, ptr @test_count, align 4, !tbaa !5
  %105 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = call ptr @s2n_strerror(i32 noundef %106, ptr noundef @.str.3)
  %108 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %109 = load i32, ptr %108, align 4, !tbaa !5
  %110 = call ptr @s2n_strerror_debug(i32 noundef %109, ptr noundef @.str.3)
  %111 = call ptr @__errno_location() #8
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = call ptr @strerror(i32 noundef %112) #7
  %114 = call ptr @__errno_location() #8
  %115 = load i32, ptr %114, align 4, !tbaa !5
  %116 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %103, ptr noundef @.str.4, i32 noundef %104, ptr noundef @.str.5, ptr noundef @.str.2, i32 noundef 30, ptr noundef %107, ptr noundef %110, ptr noundef %113, i32 noundef %115) #7
  br label %117

117:                                              ; preds = %100, %83
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #7
  br label %118

118:                                              ; preds = %117
  call void @exit(i32 noundef 1) #9
  unreachable

119:                                              ; No predecessors!
  br label %120

120:                                              ; preds = %119, %64
  br label %121

121:                                              ; preds = %120
  br label %122

122:                                              ; preds = %121
  %123 = load i32, ptr @test_count, align 4, !tbaa !5
  %124 = add nsw i32 %123, 1
  store i32 %124, ptr @test_count, align 4, !tbaa !5
  %125 = load i8, ptr @s2n_open_success, align 1, !tbaa !11, !range !13, !noundef !14
  %126 = trunc i8 %125 to i1
  br i1 %126, label %127, label %178

127:                                              ; preds = %122
  br label %128

128:                                              ; preds = %127
  br label %129

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

136:                                              ; preds = %129
  %137 = load ptr, ptr @stderr, align 8, !tbaa !9
  %138 = call i32 @fileno(ptr noundef %137) #7
  %139 = call i32 @isatty(i32 noundef %138) #7
  %140 = icmp ne i32 %139, 0
  br i1 %140, label %141, label %158

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

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

175:                                              ; preds = %158, %141
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #7
  br label %176

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

177:                                              ; No predecessors!
  br label %178

178:                                              ; preds = %177, %122
  br label %179

179:                                              ; preds = %178
  %180 = load i8, ptr @s2n_use_color_in_output, align 1, !tbaa !11, !range !13, !noundef !14
  %181 = trunc i8 %180 to i1
  br i1 %181, label %182, label %198

182:                                              ; preds = %179
  %183 = load ptr, ptr @stdout, align 8, !tbaa !9
  %184 = call i32 @fileno(ptr noundef %183) #7
  %185 = call i32 @isatty(i32 noundef %184) #7
  %186 = icmp ne i32 %185, 0
  br i1 %186, label %187, label %198

187:                                              ; preds = %182
  %188 = load i32, ptr @test_count, align 4, !tbaa !5
  %189 = icmp ne i32 %188, 0
  br i1 %189, label %190, label %194

190:                                              ; preds = %187
  %191 = load ptr, ptr @stdout, align 8, !tbaa !9
  %192 = load i32, ptr @test_count, align 4, !tbaa !5
  %193 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %191, ptr noundef @.str.7, i32 noundef %192) #7
  br label %197

194:                                              ; preds = %187
  %195 = load ptr, ptr @stdout, align 8, !tbaa !9
  %196 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %195, ptr noundef @.str.8) #7
  br label %197

197:                                              ; preds = %194, %190
  br label %209

198:                                              ; preds = %182, %179
  %199 = load i32, ptr @test_count, align 4, !tbaa !5
  %200 = icmp ne i32 %199, 0
  br i1 %200, label %201, label %205

201:                                              ; preds = %198
  %202 = load ptr, ptr @stdout, align 8, !tbaa !9
  %203 = load i32, ptr @test_count, align 4, !tbaa !5
  %204 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %202, ptr noundef @.str.9, i32 noundef %203) #7
  br label %208

205:                                              ; preds = %198
  %206 = load ptr, ptr @stdout, align 8, !tbaa !9
  %207 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %206, ptr noundef @.str.10) #7
  br label %208

208:                                              ; preds = %205, %201
  br label %209

209:                                              ; preds = %208, %197
  call void @exit(i32 noundef 0) #9
  unreachable
}

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

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

declare i32 @s2n_print_stacktrace(ptr noundef) #3

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

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

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

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

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

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

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

; 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) #6

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


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

@s2n_use_color_in_output = external dso_local local_unnamed_addr global i8, align 1
@s2n_fstat_success = external dso_local local_unnamed_addr global i8, align 1
@s2n_open_success = external dso_local local_unnamed_addr global i8, align 1
@test_count = external dso_local local_unnamed_addr global i32, align 4
@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [101 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [83 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
@.str.5 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [33 x i8], align 1
@stdout = external local_unnamed_addr global ptr, align 8
@.str.7 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: noreturn nounwind uwtable
define dso_local void @s2n_detect_open_violation(i32 noundef %0) local_unnamed_addr #0 {
  %2 = load i32, ptr @test_count, align 4, !tbaa !5
  %3 = add nsw i32 %2, 1
  store i32 %3, ptr @test_count, align 4, !tbaa !5
  %4 = icmp eq i32 %0, 31
  br i1 %4, label %29, label %5

5:                                                ; preds = %1
  %6 = tail call ptr @__errno_location() #7
  %7 = load i32, ptr %6, align 4, !tbaa !5
  %8 = load ptr, ptr @stderr, align 8, !tbaa !9
  %9 = tail call i32 @s2n_print_stacktrace(ptr noundef %8) #8
  %10 = load i8, ptr @s2n_use_color_in_output, align 1, !tbaa !11, !range !13, !noundef !14
  %11 = trunc nuw i8 %10 to i1
  br i1 %11, label %12, label %16

12:                                               ; preds = %5
  %13 = load ptr, ptr @stderr, align 8, !tbaa !9
  %14 = tail call i32 @fileno(ptr noundef %13) #8
  %15 = tail call i32 @isatty(i32 noundef %14) #8
  %.not = icmp eq i32 %15, 0
  br i1 %.not, label %16, label %17

16:                                               ; preds = %12, %5
  br label %17

17:                                               ; preds = %12, %16
  %.str.4.sink = phi ptr [ @.str.4, %16 ], [ @.str, %12 ]
  store i32 %7, ptr %6, align 4, !tbaa !5
  %18 = load ptr, ptr @stderr, align 8, !tbaa !9
  %19 = load i32, ptr @test_count, align 4, !tbaa !5
  %20 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %21 = load i32, ptr %20, align 4, !tbaa !5
  %22 = tail call ptr @s2n_strerror(i32 noundef %21, ptr noundef nonnull @.str.3) #8
  %23 = load i32, ptr %20, align 4, !tbaa !5
  %24 = tail call ptr @s2n_strerror_debug(i32 noundef %23, ptr noundef nonnull @.str.3) #8
  %25 = load i32, ptr %6, align 4, !tbaa !5
  %26 = tail call ptr @strerror(i32 noundef %25) #8
  %27 = load i32, ptr %6, align 4, !tbaa !5
  %28 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %18, ptr noundef nonnull %.str.4.sink, i32 noundef %19, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 28, ptr noundef %22, ptr noundef %24, ptr noundef %26, i32 noundef %27) #9
  tail call void @exit(i32 noundef 1) #10
  unreachable

29:                                               ; preds = %1
  %30 = add nsw i32 %2, 2
  store i32 %30, ptr @test_count, align 4, !tbaa !5
  %31 = load i8, ptr @s2n_fstat_success, align 1, !tbaa !11, !range !13, !noundef !14
  %32 = trunc nuw i8 %31 to i1
  br i1 %32, label %57, label %33

33:                                               ; preds = %29
  %34 = tail call ptr @__errno_location() #7
  %35 = load i32, ptr %34, align 4, !tbaa !5
  %36 = load ptr, ptr @stderr, align 8, !tbaa !9
  %37 = tail call i32 @s2n_print_stacktrace(ptr noundef %36) #8
  %38 = load i8, ptr @s2n_use_color_in_output, align 1, !tbaa !11, !range !13, !noundef !14
  %39 = trunc nuw i8 %38 to i1
  br i1 %39, label %40, label %44

40:                                               ; preds = %33
  %41 = load ptr, ptr @stderr, align 8, !tbaa !9
  %42 = tail call i32 @fileno(ptr noundef %41) #8
  %43 = tail call i32 @isatty(i32 noundef %42) #8
  %.not8 = icmp eq i32 %43, 0
  br i1 %.not8, label %44, label %45

44:                                               ; preds = %40, %33
  br label %45

45:                                               ; preds = %40, %44
  %.str.4.sink23 = phi ptr [ @.str.4, %44 ], [ @.str, %40 ]
  store i32 %35, ptr %34, align 4, !tbaa !5
  %46 = load ptr, ptr @stderr, align 8, !tbaa !9
  %47 = load i32, ptr @test_count, align 4, !tbaa !5
  %48 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %49 = load i32, ptr %48, align 4, !tbaa !5
  %50 = tail call ptr @s2n_strerror(i32 noundef %49, ptr noundef nonnull @.str.3) #8
  %51 = load i32, ptr %48, align 4, !tbaa !5
  %52 = tail call ptr @s2n_strerror_debug(i32 noundef %51, ptr noundef nonnull @.str.3) #8
  %53 = load i32, ptr %34, align 4, !tbaa !5
  %54 = tail call ptr @strerror(i32 noundef %53) #8
  %55 = load i32, ptr %34, align 4, !tbaa !5
  %56 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef nonnull %.str.4.sink23, i32 noundef %47, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.2, i32 noundef 30, ptr noundef %50, ptr noundef %52, ptr noundef %54, i32 noundef %55) #9
  tail call void @exit(i32 noundef 1) #10
  unreachable

57:                                               ; preds = %29
  %58 = add nsw i32 %2, 3
  store i32 %58, ptr @test_count, align 4, !tbaa !5
  %59 = load i8, ptr @s2n_open_success, align 1, !tbaa !11, !range !13, !noundef !14
  %60 = trunc nuw i8 %59 to i1
  br i1 %60, label %61, label %85

61:                                               ; preds = %57
  %62 = tail call ptr @__errno_location() #7
  %63 = load i32, ptr %62, align 4, !tbaa !5
  %64 = load ptr, ptr @stderr, align 8, !tbaa !9
  %65 = tail call i32 @s2n_print_stacktrace(ptr noundef %64) #8
  %66 = load i8, ptr @s2n_use_color_in_output, align 1, !tbaa !11, !range !13, !noundef !14
  %67 = trunc nuw i8 %66 to i1
  br i1 %67, label %68, label %72

68:                                               ; preds = %61
  %69 = load ptr, ptr @stderr, align 8, !tbaa !9
  %70 = tail call i32 @fileno(ptr noundef %69) #8
  %71 = tail call i32 @isatty(i32 noundef %70) #8
  %.not12 = icmp eq i32 %71, 0
  br i1 %.not12, label %72, label %73

72:                                               ; preds = %68, %61
  br label %73

73:                                               ; preds = %68, %72
  %.str.4.sink34 = phi ptr [ @.str.4, %72 ], [ @.str, %68 ]
  store i32 %63, ptr %62, align 4, !tbaa !5
  %74 = load ptr, ptr @stderr, align 8, !tbaa !9
  %75 = load i32, ptr @test_count, align 4, !tbaa !5
  %76 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %77 = load i32, ptr %76, align 4, !tbaa !5
  %78 = tail call ptr @s2n_strerror(i32 noundef %77, ptr noundef nonnull @.str.3) #8
  %79 = load i32, ptr %76, align 4, !tbaa !5
  %80 = tail call ptr @s2n_strerror_debug(i32 noundef %79, ptr noundef nonnull @.str.3) #8
  %81 = load i32, ptr %62, align 4, !tbaa !5
  %82 = tail call ptr @strerror(i32 noundef %81) #8
  %83 = load i32, ptr %62, align 4, !tbaa !5
  %84 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %74, ptr noundef nonnull %.str.4.sink34, i32 noundef %75, ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.2, i32 noundef 31, ptr noundef %78, ptr noundef %80, ptr noundef %82, i32 noundef %83) #9
  tail call void @exit(i32 noundef 1) #10
  unreachable

85:                                               ; preds = %57
  %86 = load i8, ptr @s2n_use_color_in_output, align 1, !tbaa !11, !range !13, !noundef !14
  %87 = trunc nuw i8 %86 to i1
  br i1 %87, label %88, label %98

88:                                               ; preds = %85
  %89 = load ptr, ptr @stdout, align 8, !tbaa !9
  %90 = tail call i32 @fileno(ptr noundef %89) #8
  %91 = tail call i32 @isatty(i32 noundef %90) #8
  %.not9 = icmp eq i32 %91, 0
  %.pre = load i32, ptr @test_count, align 4, !tbaa !5
  br i1 %.not9, label %98, label %92

92:                                               ; preds = %88
  %.not11 = icmp eq i32 %.pre, 0
  %93 = load ptr, ptr @stdout, align 8, !tbaa !9
  br i1 %.not11, label %96, label %94

94:                                               ; preds = %92
  %95 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %93, ptr noundef nonnull @.str.7, i32 noundef %.pre) #8
  br label %105

96:                                               ; preds = %92
  %97 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %93, ptr noundef nonnull @.str.8) #8
  br label %105

98:                                               ; preds = %88, %85
  %99 = phi i32 [ %.pre, %88 ], [ %58, %85 ]
  %.not10 = icmp eq i32 %99, 0
  %100 = load ptr, ptr @stdout, align 8, !tbaa !9
  br i1 %.not10, label %103, label %101

101:                                              ; preds = %98
  %102 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %100, ptr noundef nonnull @.str.9, i32 noundef %99) #8
  br label %105

103:                                              ; preds = %98
  %104 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %100, ptr noundef nonnull @.str.10) #8
  br label %105

105:                                              ; preds = %101, %103, %94, %96
  tail call void @exit(i32 noundef 0) #10
  unreachable
}

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

declare i32 @s2n_print_stacktrace(ptr noundef) local_unnamed_addr #2

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

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

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

declare ptr @s2n_strerror(i32 noundef, 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) #5

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

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

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

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


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