; LLVM IR from aws/s2n-tls :: tests/unit (s2n_async_pkey_test)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.s2n_blob = type { ptr, i32, i32, i8 }

@s2n_use_color_in_output = external dso_local global i8, align 1
@test_signature_data = external dso_local constant [14 x i8], align 1
@offload_callback_count = 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.2 = external hidden unnamed_addr constant [78 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.46 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [96 x i8], align 1

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

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

declare i32 @s2n_print_stacktrace(ptr noundef) #2

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

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

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

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) #4

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

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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 noundef) #6

; Function Attrs: nounwind uwtable
define dso_local i32 @s2n_async_sign_complete(ptr noundef %0, ptr noundef %1) #7 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  br label %9

9:                                                ; preds = %2
  %10 = load i32, ptr @test_count, align 4, !tbaa !9
  %11 = add nsw i32 %10, 1
  store i32 %11, ptr @test_count, align 4, !tbaa !9
  %12 = load ptr, ptr %3, align 8, !tbaa !5
  %13 = icmp eq ptr %12, null
  br i1 %13, label %14, label %65

14:                                               ; preds = %9
  br label %15

15:                                               ; preds = %14
  br label %16

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

23:                                               ; preds = %16
  %24 = load ptr, ptr @stderr, align 8, !tbaa !5
  %25 = call i32 @fileno(ptr noundef %24) #8
  %26 = call i32 @isatty(i32 noundef %25) #8
  %27 = icmp ne i32 %26, 0
  br i1 %27, label %28, label %45

28:                                               ; preds = %23
  %29 = load i32, ptr %5, align 4, !tbaa !9
  %30 = call ptr @__errno_location() #9
  store i32 %29, ptr %30, align 4, !tbaa !9
  %31 = load ptr, ptr @stderr, align 8, !tbaa !5
  %32 = load i32, ptr @test_count, align 4, !tbaa !9
  %33 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %34 = load i32, ptr %33, align 4, !tbaa !9
  %35 = call ptr @s2n_strerror(i32 noundef %34, ptr noundef @.str.3)
  %36 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %37 = load i32, ptr %36, align 4, !tbaa !9
  %38 = call ptr @s2n_strerror_debug(i32 noundef %37, ptr noundef @.str.3)
  %39 = call ptr @__errno_location() #9
  %40 = load i32, ptr %39, align 4, !tbaa !9
  %41 = call ptr @strerror(i32 noundef %40) #8
  %42 = call ptr @__errno_location() #9
  %43 = load i32, ptr %42, align 4, !tbaa !9
  %44 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %31, ptr noundef @.str, i32 noundef %32, ptr noundef @.str.46, ptr noundef @.str.2, i32 noundef 302, ptr noundef %35, ptr noundef %38, ptr noundef %41, i32 noundef %43) #8
  br label %62

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

62:                                               ; preds = %45, %28
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  br label %63

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

64:                                               ; No predecessors!
  br label %65

65:                                               ; preds = %64, %9
  br label %66

66:                                               ; preds = %65
  br label %67

67:                                               ; preds = %66
  %68 = load i32, ptr @test_count, align 4, !tbaa !9
  %69 = add nsw i32 %68, 1
  store i32 %69, ptr @test_count, align 4, !tbaa !9
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = icmp eq ptr %70, null
  br i1 %71, label %72, label %123

72:                                               ; preds = %67
  br label %73

73:                                               ; preds = %72
  br label %74

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

81:                                               ; preds = %74
  %82 = load ptr, ptr @stderr, align 8, !tbaa !5
  %83 = call i32 @fileno(ptr noundef %82) #8
  %84 = call i32 @isatty(i32 noundef %83) #8
  %85 = icmp ne i32 %84, 0
  br i1 %85, label %86, label %103

86:                                               ; preds = %81
  %87 = load i32, ptr %6, align 4, !tbaa !9
  %88 = call ptr @__errno_location() #9
  store i32 %87, ptr %88, align 4, !tbaa !9
  %89 = load ptr, ptr @stderr, align 8, !tbaa !5
  %90 = load i32, ptr @test_count, align 4, !tbaa !9
  %91 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %92 = load i32, ptr %91, align 4, !tbaa !9
  %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 !9
  %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 !9
  %99 = call ptr @strerror(i32 noundef %98) #8
  %100 = call ptr @__errno_location() #9
  %101 = load i32, ptr %100, align 4, !tbaa !9
  %102 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %89, ptr noundef @.str, i32 noundef %90, ptr noundef @.str.47, ptr noundef @.str.2, i32 noundef 303, ptr noundef %93, ptr noundef %96, ptr noundef %99, i32 noundef %101) #8
  br label %120

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

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

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

122:                                              ; No predecessors!
  br label %123

123:                                              ; preds = %122, %67
  br label %124

124:                                              ; preds = %123
  br label %125

125:                                              ; preds = %124
  %126 = load i32, ptr @test_count, align 4, !tbaa !9
  %127 = add nsw i32 %126, 1
  store i32 %127, ptr @test_count, align 4, !tbaa !9
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.s2n_blob, ptr %128, i32 0, i32 1
  %130 = load i32, ptr %129, align 8, !tbaa !15
  %131 = icmp eq i32 %130, 14
  br i1 %131, label %183, label %132

132:                                              ; preds = %125
  br label %133

133:                                              ; preds = %132
  br label %134

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

141:                                              ; preds = %134
  %142 = load ptr, ptr @stderr, align 8, !tbaa !5
  %143 = call i32 @fileno(ptr noundef %142) #8
  %144 = call i32 @isatty(i32 noundef %143) #8
  %145 = icmp ne i32 %144, 0
  br i1 %145, label %146, label %163

146:                                              ; preds = %141
  %147 = load i32, ptr %7, align 4, !tbaa !9
  %148 = call ptr @__errno_location() #9
  store i32 %147, ptr %148, align 4, !tbaa !9
  %149 = load ptr, ptr @stderr, align 8, !tbaa !5
  %150 = load i32, ptr @test_count, align 4, !tbaa !9
  %151 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %152 = load i32, ptr %151, align 4, !tbaa !9
  %153 = call ptr @s2n_strerror(i32 noundef %152, ptr noundef @.str.3)
  %154 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %155 = load i32, ptr %154, align 4, !tbaa !9
  %156 = call ptr @s2n_strerror_debug(i32 noundef %155, ptr noundef @.str.3)
  %157 = call ptr @__errno_location() #9
  %158 = load i32, ptr %157, align 4, !tbaa !9
  %159 = call ptr @strerror(i32 noundef %158) #8
  %160 = call ptr @__errno_location() #9
  %161 = load i32, ptr %160, align 4, !tbaa !9
  %162 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %149, ptr noundef @.str, i32 noundef %150, ptr noundef @.str.48, ptr noundef @.str.2, i32 noundef 305, ptr noundef %153, ptr noundef %156, ptr noundef %159, i32 noundef %161) #8
  br label %180

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

180:                                              ; preds = %163, %146
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #8
  br label %181

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

182:                                              ; No predecessors!
  br label %183

183:                                              ; preds = %182, %125
  br label %184

184:                                              ; preds = %183
  br label %185

185:                                              ; preds = %184
  br label %186

186:                                              ; preds = %185
  %187 = load i32, ptr @test_count, align 4, !tbaa !9
  %188 = add nsw i32 %187, 1
  store i32 %188, ptr @test_count, align 4, !tbaa !9
  %189 = load ptr, ptr %4, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.s2n_blob, ptr %189, i32 0, i32 0
  %191 = load ptr, ptr %190, align 8, !tbaa !17
  %192 = call i32 @memcmp(ptr noundef %191, ptr noundef @test_signature_data, i64 noundef 14) #11
  %193 = icmp eq i32 %192, 0
  br i1 %193, label %245, label %194

194:                                              ; preds = %186
  br label %195

195:                                              ; preds = %194
  br label %196

196:                                              ; preds = %195
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  %197 = call ptr @__errno_location() #9
  %198 = load i32, ptr %197, align 4, !tbaa !9
  store i32 %198, ptr %8, align 4, !tbaa !9
  %199 = load ptr, ptr @stderr, align 8, !tbaa !5
  %200 = call i32 @s2n_print_stacktrace(ptr noundef %199)
  %201 = load i8, ptr @s2n_use_color_in_output, align 1, !tbaa !11, !range !13, !noundef !14
  %202 = trunc i8 %201 to i1
  br i1 %202, label %203, label %225

203:                                              ; preds = %196
  %204 = load ptr, ptr @stderr, align 8, !tbaa !5
  %205 = call i32 @fileno(ptr noundef %204) #8
  %206 = call i32 @isatty(i32 noundef %205) #8
  %207 = icmp ne i32 %206, 0
  br i1 %207, label %208, label %225

208:                                              ; preds = %203
  %209 = load i32, ptr %8, align 4, !tbaa !9
  %210 = call ptr @__errno_location() #9
  store i32 %209, ptr %210, align 4, !tbaa !9
  %211 = load ptr, ptr @stderr, align 8, !tbaa !5
  %212 = load i32, ptr @test_count, align 4, !tbaa !9
  %213 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %214 = load i32, ptr %213, align 4, !tbaa !9
  %215 = call ptr @s2n_strerror(i32 noundef %214, ptr noundef @.str.3)
  %216 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %217 = load i32, ptr %216, align 4, !tbaa !9
  %218 = call ptr @s2n_strerror_debug(i32 noundef %217, ptr noundef @.str.3)
  %219 = call ptr @__errno_location() #9
  %220 = load i32, ptr %219, align 4, !tbaa !9
  %221 = call ptr @strerror(i32 noundef %220) #8
  %222 = call ptr @__errno_location() #9
  %223 = load i32, ptr %222, align 4, !tbaa !9
  %224 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %211, ptr noundef @.str, i32 noundef %212, ptr noundef @.str.49, ptr noundef @.str.2, i32 noundef 306, ptr noundef %215, ptr noundef %218, ptr noundef %221, i32 noundef %223) #8
  br label %242

225:                                              ; preds = %203, %196
  %226 = load i32, ptr %8, align 4, !tbaa !9
  %227 = call ptr @__errno_location() #9
  store i32 %226, ptr %227, align 4, !tbaa !9
  %228 = load ptr, ptr @stderr, align 8, !tbaa !5
  %229 = load i32, ptr @test_count, align 4, !tbaa !9
  %230 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %231 = load i32, ptr %230, align 4, !tbaa !9
  %232 = call ptr @s2n_strerror(i32 noundef %231, ptr noundef @.str.3)
  %233 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %234 = load i32, ptr %233, align 4, !tbaa !9
  %235 = call ptr @s2n_strerror_debug(i32 noundef %234, ptr noundef @.str.3)
  %236 = call ptr @__errno_location() #9
  %237 = load i32, ptr %236, align 4, !tbaa !9
  %238 = call ptr @strerror(i32 noundef %237) #8
  %239 = call ptr @__errno_location() #9
  %240 = load i32, ptr %239, align 4, !tbaa !9
  %241 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %228, ptr noundef @.str.4, i32 noundef %229, ptr noundef @.str.49, ptr noundef @.str.2, i32 noundef 306, ptr noundef %232, ptr noundef %235, ptr noundef %238, i32 noundef %240) #8
  br label %242

242:                                              ; preds = %225, %208
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  br label %243

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

244:                                              ; No predecessors!
  br label %245

245:                                              ; preds = %244, %186
  br label %246

246:                                              ; preds = %245
  br label %247

247:                                              ; preds = %246
  %248 = load i8, ptr @offload_callback_count, align 1, !tbaa !18
  %249 = add i8 %248, 1
  store i8 %249, ptr @offload_callback_count, align 1, !tbaa !18
  ret i32 0
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(none) }
attributes #10 = { noreturn nounwind }
attributes #11 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !10, i64 8}
!16 = !{!"s2n_blob", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16}
!17 = !{!16, !6, i64 0}
!18 = !{!7, !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@s2n_use_color_in_output = external dso_local local_unnamed_addr global i8, align 1
@test_signature_data = external dso_local constant [14 x i8], align 1
@offload_callback_count = 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.2 = external hidden unnamed_addr constant [78 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.46 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.47 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.48 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.49 = external hidden unnamed_addr constant [96 x i8], align 1

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

declare i32 @s2n_print_stacktrace(ptr noundef) local_unnamed_addr #1

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @s2n_async_sign_complete(ptr noundef readnone %0, ptr noundef readonly %1) local_unnamed_addr #6 {
  %3 = load i32, ptr @test_count, align 4, !tbaa !5
  %4 = add nsw i32 %3, 1
  store i32 %4, ptr @test_count, align 4, !tbaa !5
  %5 = icmp eq ptr %0, null
  br i1 %5, label %6, label %30

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

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

17:                                               ; preds = %13, %6
  br label %18

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

30:                                               ; preds = %2
  %31 = add nsw i32 %3, 2
  store i32 %31, ptr @test_count, align 4, !tbaa !5
  %32 = icmp eq ptr %1, null
  br i1 %32, label %33, label %57

33:                                               ; preds = %30
  %34 = tail call ptr @__errno_location() #8
  %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) #9
  %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) #9
  %43 = tail call i32 @isatty(i32 noundef %42) #9
  %.not12 = icmp eq i32 %43, 0
  br i1 %.not12, label %44, label %45

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

45:                                               ; preds = %40, %44
  %.str.4.sink24 = 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) #9
  %51 = load i32, ptr %48, align 4, !tbaa !5
  %52 = tail call ptr @s2n_strerror_debug(i32 noundef %51, ptr noundef nonnull @.str.3) #9
  %53 = load i32, ptr %34, align 4, !tbaa !5
  %54 = tail call ptr @strerror(i32 noundef %53) #9
  %55 = load i32, ptr %34, align 4, !tbaa !5
  %56 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %46, ptr noundef nonnull %.str.4.sink24, i32 noundef %47, ptr noundef nonnull @.str.47, ptr noundef nonnull @.str.2, i32 noundef 303, ptr noundef %50, ptr noundef %52, ptr noundef %54, i32 noundef %55) #10
  tail call void @exit(i32 noundef 1) #11
  unreachable

57:                                               ; preds = %30
  %58 = add nsw i32 %3, 3
  store i32 %58, ptr @test_count, align 4, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %1, i64 8
  %60 = load i32, ptr %59, align 8, !tbaa !15
  %61 = icmp eq i32 %60, 14
  br i1 %61, label %86, label %62

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

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

73:                                               ; preds = %69, %62
  br label %74

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

86:                                               ; preds = %57
  %87 = add nsw i32 %3, 4
  store i32 %87, ptr @test_count, align 4, !tbaa !5
  %88 = load ptr, ptr %1, align 8, !tbaa !17
  %bcmp = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(14) %88, ptr noundef nonnull dereferenceable(14) @test_signature_data, i64 14)
  %89 = icmp eq i32 %bcmp, 0
  br i1 %89, label %114, label %90

90:                                               ; preds = %86
  %91 = tail call ptr @__errno_location() #8
  %92 = load i32, ptr %91, align 4, !tbaa !5
  %93 = load ptr, ptr @stderr, align 8, !tbaa !9
  %94 = tail call i32 @s2n_print_stacktrace(ptr noundef %93) #9
  %95 = load i8, ptr @s2n_use_color_in_output, align 1, !tbaa !11, !range !13, !noundef !14
  %96 = trunc nuw i8 %95 to i1
  br i1 %96, label %97, label %101

97:                                               ; preds = %90
  %98 = load ptr, ptr @stderr, align 8, !tbaa !9
  %99 = tail call i32 @fileno(ptr noundef %98) #9
  %100 = tail call i32 @isatty(i32 noundef %99) #9
  %.not11 = icmp eq i32 %100, 0
  br i1 %.not11, label %101, label %102

101:                                              ; preds = %97, %90
  br label %102

102:                                              ; preds = %97, %101
  %.str.4.sink46 = phi ptr [ @.str.4, %101 ], [ @.str, %97 ]
  store i32 %92, ptr %91, align 4, !tbaa !5
  %103 = load ptr, ptr @stderr, align 8, !tbaa !9
  %104 = load i32, ptr @test_count, align 4, !tbaa !5
  %105 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %106 = load i32, ptr %105, align 4, !tbaa !5
  %107 = tail call ptr @s2n_strerror(i32 noundef %106, ptr noundef nonnull @.str.3) #9
  %108 = load i32, ptr %105, align 4, !tbaa !5
  %109 = tail call ptr @s2n_strerror_debug(i32 noundef %108, ptr noundef nonnull @.str.3) #9
  %110 = load i32, ptr %91, align 4, !tbaa !5
  %111 = tail call ptr @strerror(i32 noundef %110) #9
  %112 = load i32, ptr %91, align 4, !tbaa !5
  %113 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %103, ptr noundef nonnull %.str.4.sink46, i32 noundef %104, ptr noundef nonnull @.str.49, ptr noundef nonnull @.str.2, i32 noundef 306, ptr noundef %107, ptr noundef %109, ptr noundef %111, i32 noundef %112) #10
  tail call void @exit(i32 noundef 1) #11
  unreachable

114:                                              ; preds = %86
  %115 = load i8, ptr @offload_callback_count, align 1, !tbaa !18
  %116 = add i8 %115, 1
  store i8 %116, ptr @offload_callback_count, align 1, !tbaa !18
  ret i32 0
}

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #7

attributes #0 = { 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 #1 = { "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 = { 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 #3 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 #6 = { 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 #7 = { nofree nounwind willreturn memory(argmem: read) }
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 = !{!"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 = !{}
!15 = !{!16, !6, i64 8}
!16 = !{!"s2n_blob", !10, i64 0, !6, i64 8, !6, i64 12, !6, i64 16}
!17 = !{!16, !10, i64 0}
!18 = !{!7, !7, i64 0}


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