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

@s2n_use_color_in_output = external dso_local global i8, align 1
@s2n_custom_recv_fn_called = 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 [32 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [72 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 [49 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [70 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_expect_concurrent_error_recv_fn(ptr noundef %0, ptr noundef %1, i32 noundef %2) #0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %13, ptr %7, align 8, !tbaa !5
  store i8 1, ptr @s2n_custom_recv_fn_called, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  store i32 0, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %14 = load ptr, ptr %7, align 8, !tbaa !5
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = load i32, ptr %6, align 4, !tbaa !9
  %17 = zext i32 %16 to i64
  %18 = call i64 @s2n_recv(ptr noundef %14, ptr noundef %15, i64 noundef %17, ptr noundef %8)
  store i64 %18, ptr %9, align 8, !tbaa !13
  br label %19

19:                                               ; preds = %3
  br label %20

20:                                               ; preds = %19
  br label %21

21:                                               ; preds = %20
  %22 = load i32, ptr @test_count, align 4, !tbaa !9
  %23 = add nsw i32 %22, 1
  store i32 %23, ptr @test_count, align 4, !tbaa !9
  %24 = load i64, ptr %9, align 8, !tbaa !13
  %25 = icmp eq i64 %24, -1
  br i1 %25, label %79, label %26

26:                                               ; preds = %21
  br label %27

27:                                               ; preds = %26
  br label %28

28:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %29 = call ptr @__errno_location() #8
  %30 = load i32, ptr %29, align 4, !tbaa !9
  store i32 %30, ptr %10, align 4, !tbaa !9
  %31 = load ptr, ptr @stderr, align 8, !tbaa !5
  %32 = call i32 @s2n_print_stacktrace(ptr noundef %31)
  %33 = load i8, ptr @s2n_use_color_in_output, align 1, !tbaa !11, !range !15, !noundef !16
  %34 = trunc i8 %33 to i1
  br i1 %34, label %35, label %57

35:                                               ; preds = %28
  %36 = load ptr, ptr @stderr, align 8, !tbaa !5
  %37 = call i32 @fileno(ptr noundef %36) #7
  %38 = call i32 @isatty(i32 noundef %37) #7
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %40, label %57

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

57:                                               ; preds = %35, %28
  %58 = load i32, ptr %10, align 4, !tbaa !9
  %59 = call ptr @__errno_location() #8
  store i32 %58, ptr %59, align 4, !tbaa !9
  %60 = load ptr, ptr @stderr, align 8, !tbaa !5
  %61 = load i32, ptr @test_count, align 4, !tbaa !9
  %62 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %63 = load i32, ptr %62, align 4, !tbaa !9
  %64 = call ptr @s2n_strerror(i32 noundef %63, ptr noundef @.str.3)
  %65 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %66 = load i32, ptr %65, align 4, !tbaa !9
  %67 = call ptr @s2n_strerror_debug(i32 noundef %66, ptr noundef @.str.3)
  %68 = call ptr @__errno_location() #8
  %69 = load i32, ptr %68, align 4, !tbaa !9
  %70 = call ptr @strerror(i32 noundef %69) #7
  %71 = call ptr @__errno_location() #8
  %72 = load i32, ptr %71, align 4, !tbaa !9
  %73 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %60, ptr noundef @.str.4, i32 noundef %61, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 32, ptr noundef %64, ptr noundef %67, ptr noundef %70, i32 noundef %72) #7
  br label %74

74:                                               ; preds = %57, %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %75

75:                                               ; preds = %74
  br label %76

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

77:                                               ; No predecessors!
  br label %78

78:                                               ; preds = %77
  br label %79

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

80:                                               ; preds = %79
  br label %81

81:                                               ; preds = %80
  br label %82

82:                                               ; preds = %81
  %83 = load i32, ptr @test_count, align 4, !tbaa !9
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr @test_count, align 4, !tbaa !9
  %85 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %86 = load i32, ptr %85, align 4, !tbaa !9
  %87 = icmp eq i32 %86, 469762111
  br i1 %87, label %141, label %88

88:                                               ; preds = %82
  br label %89

89:                                               ; preds = %88
  br label %90

90:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #7
  %91 = call ptr @__errno_location() #8
  %92 = load i32, ptr %91, align 4, !tbaa !9
  store i32 %92, ptr %11, align 4, !tbaa !9
  %93 = load ptr, ptr @stderr, align 8, !tbaa !5
  %94 = call i32 @s2n_print_stacktrace(ptr noundef %93)
  %95 = load i8, ptr @s2n_use_color_in_output, align 1, !tbaa !11, !range !15, !noundef !16
  %96 = trunc i8 %95 to i1
  br i1 %96, label %97, label %119

97:                                               ; preds = %90
  %98 = load ptr, ptr @stderr, align 8, !tbaa !5
  %99 = call i32 @fileno(ptr noundef %98) #7
  %100 = call i32 @isatty(i32 noundef %99) #7
  %101 = icmp ne i32 %100, 0
  br i1 %101, label %102, label %119

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

119:                                              ; preds = %97, %90
  %120 = load i32, ptr %11, align 4, !tbaa !9
  %121 = call ptr @__errno_location() #8
  store i32 %120, ptr %121, align 4, !tbaa !9
  %122 = load ptr, ptr @stderr, align 8, !tbaa !5
  %123 = load i32, ptr @test_count, align 4, !tbaa !9
  %124 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %125 = load i32, ptr %124, align 4, !tbaa !9
  %126 = call ptr @s2n_strerror(i32 noundef %125, ptr noundef @.str.3)
  %127 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %128 = load i32, ptr %127, align 4, !tbaa !9
  %129 = call ptr @s2n_strerror_debug(i32 noundef %128, ptr noundef @.str.3)
  %130 = call ptr @__errno_location() #8
  %131 = load i32, ptr %130, align 4, !tbaa !9
  %132 = call ptr @strerror(i32 noundef %131) #7
  %133 = call ptr @__errno_location() #8
  %134 = load i32, ptr %133, align 4, !tbaa !9
  %135 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %122, ptr noundef @.str.4, i32 noundef %123, ptr noundef @.str.5, ptr noundef @.str.2, i32 noundef 32, ptr noundef %126, ptr noundef %129, ptr noundef %132, i32 noundef %134) #7
  br label %136

136:                                              ; preds = %119, %102
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #7
  br label %137

137:                                              ; preds = %136
  br label %138

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

139:                                              ; No predecessors!
  br label %140

140:                                              ; preds = %139
  br label %141

141:                                              ; preds = %140, %82
  br label %142

142:                                              ; preds = %141
  br label %143

143:                                              ; preds = %142
  br label %144

144:                                              ; preds = %143
  %145 = load i32, ptr @test_count, align 4, !tbaa !9
  %146 = add nsw i32 %145, 1
  store i32 %146, ptr @test_count, align 4, !tbaa !9
  %147 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %148 = load i32, ptr %147, align 4, !tbaa !9
  %149 = call ptr @s2n_strerror_debug(i32 noundef %148, ptr noundef @.str.3)
  %150 = icmp eq ptr %149, null
  br i1 %150, label %151, label %204

151:                                              ; preds = %144
  br label %152

152:                                              ; preds = %151
  br label %153

153:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %154 = call ptr @__errno_location() #8
  %155 = load i32, ptr %154, align 4, !tbaa !9
  store i32 %155, ptr %12, align 4, !tbaa !9
  %156 = load ptr, ptr @stderr, align 8, !tbaa !5
  %157 = call i32 @s2n_print_stacktrace(ptr noundef %156)
  %158 = load i8, ptr @s2n_use_color_in_output, align 1, !tbaa !11, !range !15, !noundef !16
  %159 = trunc i8 %158 to i1
  br i1 %159, label %160, label %182

160:                                              ; preds = %153
  %161 = load ptr, ptr @stderr, align 8, !tbaa !5
  %162 = call i32 @fileno(ptr noundef %161) #7
  %163 = call i32 @isatty(i32 noundef %162) #7
  %164 = icmp ne i32 %163, 0
  br i1 %164, label %165, label %182

165:                                              ; preds = %160
  %166 = load i32, ptr %12, align 4, !tbaa !9
  %167 = call ptr @__errno_location() #8
  store i32 %166, ptr %167, align 4, !tbaa !9
  %168 = load ptr, ptr @stderr, align 8, !tbaa !5
  %169 = load i32, ptr @test_count, align 4, !tbaa !9
  %170 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %171 = load i32, ptr %170, align 4, !tbaa !9
  %172 = call ptr @s2n_strerror(i32 noundef %171, ptr noundef @.str.3)
  %173 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %174 = load i32, ptr %173, align 4, !tbaa !9
  %175 = call ptr @s2n_strerror_debug(i32 noundef %174, ptr noundef @.str.3)
  %176 = call ptr @__errno_location() #8
  %177 = load i32, ptr %176, align 4, !tbaa !9
  %178 = call ptr @strerror(i32 noundef %177) #7
  %179 = call ptr @__errno_location() #8
  %180 = load i32, ptr %179, align 4, !tbaa !9
  %181 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %168, ptr noundef @.str, i32 noundef %169, ptr noundef @.str.6, ptr noundef @.str.2, i32 noundef 32, ptr noundef %172, ptr noundef %175, ptr noundef %178, i32 noundef %180) #7
  br label %199

182:                                              ; preds = %160, %153
  %183 = load i32, ptr %12, align 4, !tbaa !9
  %184 = call ptr @__errno_location() #8
  store i32 %183, ptr %184, align 4, !tbaa !9
  %185 = load ptr, ptr @stderr, align 8, !tbaa !5
  %186 = load i32, ptr @test_count, align 4, !tbaa !9
  %187 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %188 = load i32, ptr %187, align 4, !tbaa !9
  %189 = call ptr @s2n_strerror(i32 noundef %188, ptr noundef @.str.3)
  %190 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %191 = load i32, ptr %190, align 4, !tbaa !9
  %192 = call ptr @s2n_strerror_debug(i32 noundef %191, ptr noundef @.str.3)
  %193 = call ptr @__errno_location() #8
  %194 = load i32, ptr %193, align 4, !tbaa !9
  %195 = call ptr @strerror(i32 noundef %194) #7
  %196 = call ptr @__errno_location() #8
  %197 = load i32, ptr %196, align 4, !tbaa !9
  %198 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %185, ptr noundef @.str.4, i32 noundef %186, ptr noundef @.str.6, ptr noundef @.str.2, i32 noundef 32, ptr noundef %189, ptr noundef %192, ptr noundef %195, i32 noundef %197) #7
  br label %199

199:                                              ; preds = %182, %165
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %200

200:                                              ; preds = %199
  br label %201

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

202:                                              ; No predecessors!
  br label %203

203:                                              ; preds = %202
  br label %204

204:                                              ; preds = %203, %144
  br label %205

205:                                              ; preds = %204
  br label %206

206:                                              ; preds = %205
  br label %207

207:                                              ; preds = %206
  br label %208

208:                                              ; preds = %207
  br label %209

209:                                              ; preds = %208
  %210 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 0, ptr %210, align 4, !tbaa !9
  call void @s2n_debug_info_reset()
  %211 = call ptr @__errno_location() #8
  store i32 0, ptr %211, align 4, !tbaa !9
  br label %212

212:                                              ; preds = %209
  br label %213

213:                                              ; preds = %212
  br label %214

214:                                              ; preds = %213
  br label %215

215:                                              ; preds = %214
  %216 = load i64, ptr %9, align 8, !tbaa !13
  %217 = trunc i64 %216 to i32
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  ret i32 %217
}

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

declare i64 @s2n_recv(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #2

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

declare i32 @s2n_print_stacktrace(ptr noundef) #2

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

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

; 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

declare void @s2n_debug_info_reset() #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 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 = { 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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}


; 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_custom_recv_fn_called = 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 [32 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [72 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 [49 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [70 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @s2n_expect_concurrent_error_recv_fn(ptr noundef %0, ptr noundef %1, i32 noundef %2) local_unnamed_addr #0 {
  %4 = alloca i32, align 4
  store i8 1, ptr @s2n_custom_recv_fn_called, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #8
  store i32 0, ptr %4, align 4, !tbaa !9
  %5 = zext i32 %2 to i64
  %6 = call i64 @s2n_recv(ptr noundef %0, ptr noundef %1, i64 noundef %5, ptr noundef nonnull %4) #8
  %7 = load i32, ptr @test_count, align 4, !tbaa !9
  %8 = add nsw i32 %7, 1
  store i32 %8, ptr @test_count, align 4, !tbaa !9
  %9 = icmp eq i64 %6, -1
  br i1 %9, label %34, label %10

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

17:                                               ; preds = %10
  %18 = load ptr, ptr @stderr, align 8, !tbaa !11
  %19 = call i32 @fileno(ptr noundef %18) #8
  %20 = call i32 @isatty(i32 noundef %19) #8
  %.not = icmp eq i32 %20, 0
  br i1 %.not, label %21, label %22

21:                                               ; preds = %17, %10
  br label %22

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

34:                                               ; preds = %3
  %35 = add nsw i32 %7, 2
  store i32 %35, ptr @test_count, align 4, !tbaa !9
  %36 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %37 = load i32, ptr %36, align 4, !tbaa !9
  %38 = icmp eq i32 %37, 469762111
  br i1 %38, label %62, label %39

39:                                               ; preds = %34
  %40 = tail call ptr @__errno_location() #9
  %41 = load i32, ptr %40, align 4, !tbaa !9
  %42 = load ptr, ptr @stderr, align 8, !tbaa !11
  %43 = call i32 @s2n_print_stacktrace(ptr noundef %42) #8
  %44 = load i8, ptr @s2n_use_color_in_output, align 1, !tbaa !5, !range !13, !noundef !14
  %45 = trunc nuw i8 %44 to i1
  br i1 %45, label %46, label %50

46:                                               ; preds = %39
  %47 = load ptr, ptr @stderr, align 8, !tbaa !11
  %48 = call i32 @fileno(ptr noundef %47) #8
  %49 = call i32 @isatty(i32 noundef %48) #8
  %.not11 = icmp eq i32 %49, 0
  br i1 %.not11, label %50, label %51

50:                                               ; preds = %46, %39
  br label %51

51:                                               ; preds = %46, %50
  %.str.4.sink23 = phi ptr [ @.str.4, %50 ], [ @.str, %46 ]
  store i32 %41, ptr %40, align 4, !tbaa !9
  %52 = load ptr, ptr @stderr, align 8, !tbaa !11
  %53 = load i32, ptr @test_count, align 4, !tbaa !9
  %54 = load i32, ptr %36, align 4, !tbaa !9
  %55 = call ptr @s2n_strerror(i32 noundef %54, ptr noundef nonnull @.str.3) #8
  %56 = load i32, ptr %36, align 4, !tbaa !9
  %57 = call ptr @s2n_strerror_debug(i32 noundef %56, ptr noundef nonnull @.str.3) #8
  %58 = load i32, ptr %40, align 4, !tbaa !9
  %59 = call ptr @strerror(i32 noundef %58) #8
  %60 = load i32, ptr %40, align 4, !tbaa !9
  %61 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %52, ptr noundef nonnull %.str.4.sink23, i32 noundef %53, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.2, i32 noundef 32, ptr noundef %55, ptr noundef %57, ptr noundef %59, i32 noundef %60) #10
  call void @exit(i32 noundef 1) #11
  unreachable

62:                                               ; preds = %34
  %63 = add nsw i32 %7, 3
  store i32 %63, ptr @test_count, align 4, !tbaa !9
  %64 = call ptr @s2n_strerror_debug(i32 noundef 469762111, ptr noundef nonnull @.str.3) #8
  %65 = icmp eq ptr %64, null
  br i1 %65, label %66, label %89

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

73:                                               ; preds = %66
  %74 = load ptr, ptr @stderr, align 8, !tbaa !11
  %75 = call i32 @fileno(ptr noundef %74) #8
  %76 = call i32 @isatty(i32 noundef %75) #8
  %.not12 = icmp eq i32 %76, 0
  br i1 %.not12, label %77, label %78

77:                                               ; preds = %73, %66
  br label %78

78:                                               ; preds = %73, %77
  %.str.4.sink32 = phi ptr [ @.str.4, %77 ], [ @.str, %73 ]
  store i32 %68, ptr %67, align 4, !tbaa !9
  %79 = load ptr, ptr @stderr, align 8, !tbaa !11
  %80 = load i32, ptr @test_count, align 4, !tbaa !9
  %81 = load i32, ptr %36, align 4, !tbaa !9
  %82 = call ptr @s2n_strerror(i32 noundef %81, ptr noundef nonnull @.str.3) #8
  %83 = load i32, ptr %36, align 4, !tbaa !9
  %84 = call ptr @s2n_strerror_debug(i32 noundef %83, ptr noundef nonnull @.str.3) #8
  %85 = load i32, ptr %67, align 4, !tbaa !9
  %86 = call ptr @strerror(i32 noundef %85) #8
  %87 = load i32, ptr %67, align 4, !tbaa !9
  %88 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %79, ptr noundef nonnull %.str.4.sink32, i32 noundef %80, ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.2, i32 noundef 32, ptr noundef %82, ptr noundef %84, ptr noundef %86, i32 noundef %87) #10
  call void @exit(i32 noundef 1) #11
  unreachable

89:                                               ; preds = %62
  store i32 0, ptr %36, align 4, !tbaa !9
  call void @s2n_debug_info_reset() #8
  %90 = tail call ptr @__errno_location() #9
  store i32 0, ptr %90, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #8
  ret i32 -1
}

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

declare i64 @s2n_recv(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

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

declare i32 @s2n_print_stacktrace(ptr noundef) local_unnamed_addr #2

; 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 #2

; 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 #2

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

; Function Attrs: mustprogress 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) local_unnamed_addr #7

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


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