; LLVM IR from aws/s2n-tls :: tests/unit (s2n_self_talk_client_hello_cb_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
@test_count = external dso_local global i32, align 4
@stderr = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [101 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [93 x i8], align 1
@s2n_errno = external thread_local global i32, align 4
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [90 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [69 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

declare ptr @s2n_connection_new(i32 noundef) #1

declare i32 @s2n_connection_set_config(ptr noundef, ptr noundef) #1

declare i32 @s2n_connection_set_io_pair(ptr noundef, ptr noundef) #1

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

declare i32 @s2n_io_pair_close_one_end(ptr noundef, i32 noundef) #1

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

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

declare i32 @s2n_print_stacktrace(ptr noundef) #1

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

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

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

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

11:                                               ; preds = %3
  %12 = load i32, ptr @test_count, align 4, !tbaa !9
  %13 = add nsw i32 %12, 1
  store i32 %13, ptr @test_count, align 4, !tbaa !9
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = call i32 @s2n_io_pair_close_one_end(ptr noundef %14, i32 noundef 1)
  %16 = icmp eq i32 %15, -1
  br i1 %16, label %17, label %68

17:                                               ; preds = %11
  br label %18

18:                                               ; preds = %17
  br label %19

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

26:                                               ; preds = %19
  %27 = load ptr, ptr @stderr, align 8, !tbaa !5
  %28 = call i32 @fileno(ptr noundef %27) #7
  %29 = call i32 @isatty(i32 noundef %28) #7
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %31, label %48

31:                                               ; preds = %26
  %32 = load i32, ptr %7, align 4, !tbaa !9
  %33 = call ptr @__errno_location() #8
  store i32 %32, ptr %33, align 4, !tbaa !9
  %34 = load ptr, ptr @stderr, align 8, !tbaa !5
  %35 = load i32, 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 = call ptr @s2n_strerror(i32 noundef %37, ptr noundef @.str.6)
  %39 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %40 = load i32, ptr %39, align 4, !tbaa !9
  %41 = call ptr @s2n_strerror_debug(i32 noundef %40, ptr noundef @.str.6)
  %42 = call ptr @__errno_location() #8
  %43 = load i32, ptr %42, align 4, !tbaa !9
  %44 = call ptr @strerror(i32 noundef %43) #7
  %45 = call ptr @__errno_location() #8
  %46 = load i32, ptr %45, align 4, !tbaa !9
  %47 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %34, ptr noundef @.str.3, i32 noundef %35, ptr noundef @.str.19, ptr noundef @.str.5, i32 noundef 252, ptr noundef %38, ptr noundef %41, ptr noundef %44, i32 noundef %46) #7
  br label %65

48:                                               ; preds = %26, %19
  %49 = load i32, ptr %7, align 4, !tbaa !9
  %50 = call ptr @__errno_location() #8
  store i32 %49, ptr %50, align 4, !tbaa !9
  %51 = load ptr, ptr @stderr, align 8, !tbaa !5
  %52 = load i32, ptr @test_count, align 4, !tbaa !9
  %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(i32 noundef %54, ptr noundef @.str.6)
  %56 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %57 = load i32, ptr %56, align 4, !tbaa !9
  %58 = call ptr @s2n_strerror_debug(i32 noundef %57, ptr noundef @.str.6)
  %59 = call ptr @__errno_location() #8
  %60 = load i32, ptr %59, align 4, !tbaa !9
  %61 = call ptr @strerror(i32 noundef %60) #7
  %62 = call ptr @__errno_location() #8
  %63 = load i32, ptr %62, align 4, !tbaa !9
  %64 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %51, ptr noundef @.str.7, i32 noundef %52, ptr noundef @.str.19, ptr noundef @.str.5, i32 noundef 252, ptr noundef %55, ptr noundef %58, ptr noundef %61, i32 noundef %63) #7
  br label %65

65:                                               ; preds = %48, %31
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  br label %66

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

67:                                               ; No predecessors!
  br label %68

68:                                               ; preds = %67, %11
  br label %69

69:                                               ; preds = %68
  br label %70

70:                                               ; preds = %69
  %71 = load i32, ptr @test_count, align 4, !tbaa !9
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr @test_count, align 4, !tbaa !9
  %73 = call ptr @s2n_connection_new(i32 noundef 0)
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %73, ptr %74, align 8, !tbaa !5
  %75 = icmp eq ptr %73, null
  br i1 %75, label %76, label %127

76:                                               ; preds = %70
  br label %77

77:                                               ; preds = %76
  br label %78

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

85:                                               ; preds = %78
  %86 = load ptr, ptr @stderr, align 8, !tbaa !5
  %87 = call i32 @fileno(ptr noundef %86) #7
  %88 = call i32 @isatty(i32 noundef %87) #7
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %90, label %107

90:                                               ; preds = %85
  %91 = load i32, ptr %8, align 4, !tbaa !9
  %92 = call ptr @__errno_location() #8
  store i32 %91, ptr %92, align 4, !tbaa !9
  %93 = load ptr, ptr @stderr, align 8, !tbaa !5
  %94 = load i32, ptr @test_count, align 4, !tbaa !9
  %95 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %96 = load i32, ptr %95, align 4, !tbaa !9
  %97 = call ptr @s2n_strerror(i32 noundef %96, ptr noundef @.str.6)
  %98 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %99 = load i32, ptr %98, align 4, !tbaa !9
  %100 = call ptr @s2n_strerror_debug(i32 noundef %99, ptr noundef @.str.6)
  %101 = call ptr @__errno_location() #8
  %102 = load i32, ptr %101, align 4, !tbaa !9
  %103 = call ptr @strerror(i32 noundef %102) #7
  %104 = call ptr @__errno_location() #8
  %105 = load i32, ptr %104, align 4, !tbaa !9
  %106 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %93, ptr noundef @.str.3, i32 noundef %94, ptr noundef @.str.20, ptr noundef @.str.5, i32 noundef 254, ptr noundef %97, ptr noundef %100, ptr noundef %103, i32 noundef %105) #7
  br label %124

107:                                              ; preds = %85, %78
  %108 = load i32, ptr %8, align 4, !tbaa !9
  %109 = call ptr @__errno_location() #8
  store i32 %108, ptr %109, align 4, !tbaa !9
  %110 = load ptr, ptr @stderr, align 8, !tbaa !5
  %111 = load i32, ptr @test_count, align 4, !tbaa !9
  %112 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %113 = load i32, ptr %112, align 4, !tbaa !9
  %114 = call ptr @s2n_strerror(i32 noundef %113, ptr noundef @.str.6)
  %115 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %116 = load i32, ptr %115, align 4, !tbaa !9
  %117 = call ptr @s2n_strerror_debug(i32 noundef %116, ptr noundef @.str.6)
  %118 = call ptr @__errno_location() #8
  %119 = load i32, ptr %118, align 4, !tbaa !9
  %120 = call ptr @strerror(i32 noundef %119) #7
  %121 = call ptr @__errno_location() #8
  %122 = load i32, ptr %121, align 4, !tbaa !9
  %123 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %110, ptr noundef @.str.7, i32 noundef %111, ptr noundef @.str.20, ptr noundef @.str.5, i32 noundef 254, ptr noundef %114, ptr noundef %117, ptr noundef %120, i32 noundef %122) #7
  br label %124

124:                                              ; preds = %107, %90
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %125

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

126:                                              ; No predecessors!
  br label %127

127:                                              ; preds = %126, %70
  br label %128

128:                                              ; preds = %127
  br label %129

129:                                              ; preds = %128
  %130 = load i32, ptr @test_count, align 4, !tbaa !9
  %131 = add nsw i32 %130, 1
  store i32 %131, ptr @test_count, align 4, !tbaa !9
  %132 = load ptr, ptr %4, align 8, !tbaa !5
  %133 = load ptr, ptr %132, align 8, !tbaa !5
  %134 = load ptr, ptr %5, align 8, !tbaa !5
  %135 = call i32 @s2n_connection_set_io_pair(ptr noundef %133, ptr noundef %134)
  %136 = icmp eq i32 %135, -1
  br i1 %136, label %137, label %188

137:                                              ; preds = %129
  br label %138

138:                                              ; preds = %137
  br label %139

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

146:                                              ; preds = %139
  %147 = load ptr, ptr @stderr, align 8, !tbaa !5
  %148 = call i32 @fileno(ptr noundef %147) #7
  %149 = call i32 @isatty(i32 noundef %148) #7
  %150 = icmp ne i32 %149, 0
  br i1 %150, label %151, label %168

151:                                              ; preds = %146
  %152 = load i32, ptr %9, align 4, !tbaa !9
  %153 = call ptr @__errno_location() #8
  store i32 %152, ptr %153, align 4, !tbaa !9
  %154 = load ptr, ptr @stderr, align 8, !tbaa !5
  %155 = load i32, ptr @test_count, align 4, !tbaa !9
  %156 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %157 = load i32, ptr %156, align 4, !tbaa !9
  %158 = call ptr @s2n_strerror(i32 noundef %157, ptr noundef @.str.6)
  %159 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %160 = load i32, ptr %159, align 4, !tbaa !9
  %161 = call ptr @s2n_strerror_debug(i32 noundef %160, ptr noundef @.str.6)
  %162 = call ptr @__errno_location() #8
  %163 = load i32, ptr %162, align 4, !tbaa !9
  %164 = call ptr @strerror(i32 noundef %163) #7
  %165 = call ptr @__errno_location() #8
  %166 = load i32, ptr %165, align 4, !tbaa !9
  %167 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %154, ptr noundef @.str.3, i32 noundef %155, ptr noundef @.str.21, ptr noundef @.str.5, i32 noundef 257, ptr noundef %158, ptr noundef %161, ptr noundef %164, i32 noundef %166) #7
  br label %185

168:                                              ; preds = %146, %139
  %169 = load i32, ptr %9, align 4, !tbaa !9
  %170 = call ptr @__errno_location() #8
  store i32 %169, ptr %170, align 4, !tbaa !9
  %171 = load ptr, ptr @stderr, align 8, !tbaa !5
  %172 = load i32, ptr @test_count, align 4, !tbaa !9
  %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(i32 noundef %174, ptr noundef @.str.6)
  %176 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %177 = load i32, ptr %176, align 4, !tbaa !9
  %178 = call ptr @s2n_strerror_debug(i32 noundef %177, ptr noundef @.str.6)
  %179 = call ptr @__errno_location() #8
  %180 = load i32, ptr %179, align 4, !tbaa !9
  %181 = call ptr @strerror(i32 noundef %180) #7
  %182 = call ptr @__errno_location() #8
  %183 = load i32, ptr %182, align 4, !tbaa !9
  %184 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %171, ptr noundef @.str.7, i32 noundef %172, ptr noundef @.str.21, ptr noundef @.str.5, i32 noundef 257, ptr noundef %175, ptr noundef %178, ptr noundef %181, i32 noundef %183) #7
  br label %185

185:                                              ; preds = %168, %151
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #7
  br label %186

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

187:                                              ; No predecessors!
  br label %188

188:                                              ; preds = %187, %129
  br label %189

189:                                              ; preds = %188
  br label %190

190:                                              ; preds = %189
  %191 = load i32, ptr @test_count, align 4, !tbaa !9
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr @test_count, align 4, !tbaa !9
  %193 = load ptr, ptr %4, align 8, !tbaa !5
  %194 = load ptr, ptr %193, align 8, !tbaa !5
  %195 = load ptr, ptr %6, align 8, !tbaa !5
  %196 = call i32 @s2n_connection_set_config(ptr noundef %194, ptr noundef %195)
  %197 = icmp eq i32 %196, -1
  br i1 %197, label %198, label %249

198:                                              ; preds = %190
  br label %199

199:                                              ; preds = %198
  br label %200

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

207:                                              ; preds = %200
  %208 = load ptr, ptr @stderr, align 8, !tbaa !5
  %209 = call i32 @fileno(ptr noundef %208) #7
  %210 = call i32 @isatty(i32 noundef %209) #7
  %211 = icmp ne i32 %210, 0
  br i1 %211, label %212, label %229

212:                                              ; preds = %207
  %213 = load i32, ptr %10, align 4, !tbaa !9
  %214 = call ptr @__errno_location() #8
  store i32 %213, ptr %214, align 4, !tbaa !9
  %215 = load ptr, ptr @stderr, align 8, !tbaa !5
  %216 = load i32, ptr @test_count, align 4, !tbaa !9
  %217 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %218 = load i32, ptr %217, align 4, !tbaa !9
  %219 = call ptr @s2n_strerror(i32 noundef %218, ptr noundef @.str.6)
  %220 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %221 = load i32, ptr %220, align 4, !tbaa !9
  %222 = call ptr @s2n_strerror_debug(i32 noundef %221, ptr noundef @.str.6)
  %223 = call ptr @__errno_location() #8
  %224 = load i32, ptr %223, align 4, !tbaa !9
  %225 = call ptr @strerror(i32 noundef %224) #7
  %226 = call ptr @__errno_location() #8
  %227 = load i32, ptr %226, align 4, !tbaa !9
  %228 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %215, ptr noundef @.str.3, i32 noundef %216, ptr noundef @.str.22, ptr noundef @.str.5, i32 noundef 258, ptr noundef %219, ptr noundef %222, ptr noundef %225, i32 noundef %227) #7
  br label %246

229:                                              ; preds = %207, %200
  %230 = load i32, ptr %10, align 4, !tbaa !9
  %231 = call ptr @__errno_location() #8
  store i32 %230, ptr %231, align 4, !tbaa !9
  %232 = load ptr, ptr @stderr, align 8, !tbaa !5
  %233 = load i32, ptr @test_count, align 4, !tbaa !9
  %234 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %235 = load i32, ptr %234, align 4, !tbaa !9
  %236 = call ptr @s2n_strerror(i32 noundef %235, ptr noundef @.str.6)
  %237 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %238 = load i32, ptr %237, align 4, !tbaa !9
  %239 = call ptr @s2n_strerror_debug(i32 noundef %238, ptr noundef @.str.6)
  %240 = call ptr @__errno_location() #8
  %241 = load i32, ptr %240, align 4, !tbaa !9
  %242 = call ptr @strerror(i32 noundef %241) #7
  %243 = call ptr @__errno_location() #8
  %244 = load i32, ptr %243, align 4, !tbaa !9
  %245 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %232, ptr noundef @.str.7, i32 noundef %233, ptr noundef @.str.22, ptr noundef @.str.5, i32 noundef 258, ptr noundef %236, ptr noundef %239, ptr noundef %242, i32 noundef %244) #7
  br label %246

246:                                              ; preds = %229, %212
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  br label %247

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

248:                                              ; No predecessors!
  br label %249

249:                                              ; preds = %248, %190
  br label %250

250:                                              ; preds = %249
  ret i32 0
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #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 = { 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 = { 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 = !{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
@test_count = external dso_local local_unnamed_addr global i32, align 4
@stderr = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [101 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [93 x i8], align 1
@s2n_errno = external thread_local local_unnamed_addr global i32, align 4
@.str.6 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [90 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [73 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [69 x i8], align 1

declare ptr @s2n_connection_new(i32 noundef) local_unnamed_addr #0

declare i32 @s2n_connection_set_config(ptr noundef, ptr noundef) local_unnamed_addr #0

declare i32 @s2n_connection_set_io_pair(ptr noundef, ptr noundef) local_unnamed_addr #0

declare i32 @s2n_io_pair_close_one_end(ptr noundef, i32 noundef) local_unnamed_addr #0

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

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

declare i32 @s2n_print_stacktrace(ptr noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @init_server_conn(ptr nocapture noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #6 {
  %4 = load i32, ptr @test_count, align 4, !tbaa !5
  %5 = add nsw i32 %4, 1
  store i32 %5, ptr @test_count, align 4, !tbaa !5
  %6 = tail call i32 @s2n_io_pair_close_one_end(ptr noundef %1, i32 noundef 1) #7
  %7 = icmp eq i32 %6, -1
  br i1 %7, label %8, label %32

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

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

19:                                               ; preds = %15, %8
  br label %20

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

32:                                               ; preds = %3
  %33 = load i32, ptr @test_count, align 4, !tbaa !5
  %34 = add nsw i32 %33, 1
  store i32 %34, ptr @test_count, align 4, !tbaa !5
  %35 = tail call ptr @s2n_connection_new(i32 noundef 0) #7
  store ptr %35, ptr %0, align 8, !tbaa !9
  %36 = icmp eq ptr %35, null
  br i1 %36, label %37, label %61

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

44:                                               ; preds = %37
  %45 = load ptr, ptr @stderr, align 8, !tbaa !9
  %46 = tail call i32 @fileno(ptr noundef %45) #7
  %47 = tail call i32 @isatty(i32 noundef %46) #7
  %.not14 = icmp eq i32 %47, 0
  br i1 %.not14, label %48, label %49

48:                                               ; preds = %44, %37
  br label %49

49:                                               ; preds = %44, %48
  %.str.7.sink26 = phi ptr [ @.str.7, %48 ], [ @.str.3, %44 ]
  store i32 %39, ptr %38, align 4, !tbaa !5
  %50 = load ptr, ptr @stderr, align 8, !tbaa !9
  %51 = load i32, ptr @test_count, align 4, !tbaa !5
  %52 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %53 = load i32, ptr %52, align 4, !tbaa !5
  %54 = tail call ptr @s2n_strerror(i32 noundef %53, ptr noundef nonnull @.str.6) #7
  %55 = load i32, ptr %52, align 4, !tbaa !5
  %56 = tail call ptr @s2n_strerror_debug(i32 noundef %55, ptr noundef nonnull @.str.6) #7
  %57 = load i32, ptr %38, align 4, !tbaa !5
  %58 = tail call ptr @strerror(i32 noundef %57) #7
  %59 = load i32, ptr %38, align 4, !tbaa !5
  %60 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %50, ptr noundef nonnull %.str.7.sink26, i32 noundef %51, ptr noundef nonnull @.str.20, ptr noundef nonnull @.str.5, i32 noundef 254, ptr noundef %54, ptr noundef %56, ptr noundef %58, i32 noundef %59) #9
  tail call void @exit(i32 noundef 1) #10
  unreachable

61:                                               ; preds = %32
  %62 = load i32, ptr @test_count, align 4, !tbaa !5
  %63 = add nsw i32 %62, 1
  store i32 %63, ptr @test_count, align 4, !tbaa !5
  %64 = tail call i32 @s2n_connection_set_io_pair(ptr noundef nonnull %35, ptr noundef %1) #7
  %65 = icmp eq i32 %64, -1
  br i1 %65, label %66, label %90

66:                                               ; preds = %61
  %67 = tail call ptr @__errno_location() #8
  %68 = load i32, ptr %67, align 4, !tbaa !5
  %69 = load ptr, ptr @stderr, align 8, !tbaa !9
  %70 = tail call i32 @s2n_print_stacktrace(ptr noundef %69) #7
  %71 = load i8, ptr @s2n_use_color_in_output, align 1, !tbaa !11, !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 !9
  %75 = tail call i32 @fileno(ptr noundef %74) #7
  %76 = tail call i32 @isatty(i32 noundef %75) #7
  %.not13 = icmp eq i32 %76, 0
  br i1 %.not13, label %77, label %78

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

78:                                               ; preds = %73, %77
  %.str.7.sink37 = phi ptr [ @.str.7, %77 ], [ @.str.3, %73 ]
  store i32 %68, ptr %67, align 4, !tbaa !5
  %79 = load ptr, ptr @stderr, align 8, !tbaa !9
  %80 = load i32, ptr @test_count, align 4, !tbaa !5
  %81 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %82 = load i32, ptr %81, align 4, !tbaa !5
  %83 = tail call ptr @s2n_strerror(i32 noundef %82, ptr noundef nonnull @.str.6) #7
  %84 = load i32, ptr %81, align 4, !tbaa !5
  %85 = tail call ptr @s2n_strerror_debug(i32 noundef %84, ptr noundef nonnull @.str.6) #7
  %86 = load i32, ptr %67, align 4, !tbaa !5
  %87 = tail call ptr @strerror(i32 noundef %86) #7
  %88 = load i32, ptr %67, align 4, !tbaa !5
  %89 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %79, ptr noundef nonnull %.str.7.sink37, i32 noundef %80, ptr noundef nonnull @.str.21, ptr noundef nonnull @.str.5, i32 noundef 257, ptr noundef %83, ptr noundef %85, ptr noundef %87, i32 noundef %88) #9
  tail call void @exit(i32 noundef 1) #10
  unreachable

90:                                               ; preds = %61
  %91 = load i32, ptr @test_count, align 4, !tbaa !5
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr @test_count, align 4, !tbaa !5
  %93 = load ptr, ptr %0, align 8, !tbaa !9
  %94 = tail call i32 @s2n_connection_set_config(ptr noundef %93, ptr noundef %2) #7
  %95 = icmp eq i32 %94, -1
  br i1 %95, label %96, label %120

96:                                               ; preds = %90
  %97 = tail call ptr @__errno_location() #8
  %98 = load i32, ptr %97, align 4, !tbaa !5
  %99 = load ptr, ptr @stderr, align 8, !tbaa !9
  %100 = tail call i32 @s2n_print_stacktrace(ptr noundef %99) #7
  %101 = load i8, ptr @s2n_use_color_in_output, align 1, !tbaa !11, !range !13, !noundef !14
  %102 = trunc nuw i8 %101 to i1
  br i1 %102, label %103, label %107

103:                                              ; preds = %96
  %104 = load ptr, ptr @stderr, align 8, !tbaa !9
  %105 = tail call i32 @fileno(ptr noundef %104) #7
  %106 = tail call i32 @isatty(i32 noundef %105) #7
  %.not = icmp eq i32 %106, 0
  br i1 %.not, label %107, label %108

107:                                              ; preds = %103, %96
  br label %108

108:                                              ; preds = %103, %107
  %.str.7.sink48 = phi ptr [ @.str.7, %107 ], [ @.str.3, %103 ]
  store i32 %98, ptr %97, align 4, !tbaa !5
  %109 = load ptr, ptr @stderr, align 8, !tbaa !9
  %110 = load i32, ptr @test_count, align 4, !tbaa !5
  %111 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %112 = load i32, ptr %111, align 4, !tbaa !5
  %113 = tail call ptr @s2n_strerror(i32 noundef %112, ptr noundef nonnull @.str.6) #7
  %114 = load i32, ptr %111, align 4, !tbaa !5
  %115 = tail call ptr @s2n_strerror_debug(i32 noundef %114, ptr noundef nonnull @.str.6) #7
  %116 = load i32, ptr %97, align 4, !tbaa !5
  %117 = tail call ptr @strerror(i32 noundef %116) #7
  %118 = load i32, ptr %97, align 4, !tbaa !5
  %119 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %109, ptr noundef nonnull %.str.7.sink48, i32 noundef %110, ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.5, i32 noundef 258, ptr noundef %113, ptr noundef %115, ptr noundef %117, i32 noundef %118) #9
  tail call void @exit(i32 noundef 1) #10
  unreachable

120:                                              ; preds = %90
  ret i32 0
}

attributes #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 = { 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 #2 = { mustprogress nofree nosync nounwind willreturn memory(none) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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 = { nounwind }
attributes #8 = { nounwind willreturn memory(none) }
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: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass