; LLVM IR from aws/s2n-tls :: bin (echo)

; 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_debug_info = type { ptr, ptr }
%struct.pollfd = type { i32, i16, i16 }

@stderr = external global ptr, align 8
@s2n_errno = external thread_local global i32, align 4
@.str.14 = external hidden unnamed_addr constant [3 x i8], align 1
@_s2n_debug_info = external thread_local global %struct.s2n_debug_info, align 8
@.str.70 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.77 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.78 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.79 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.80 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.81 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [81 x i8], align 1

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

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

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

declare i32 @poll(ptr noundef, i64 noundef, i32 noundef) #1

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

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

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

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

declare i32 @s2n_calculate_stacktrace() #1

declare i32 @s2n_error_get_type(i32 noundef) #1

declare i32 @s2n_connection_get_alert(ptr noundef) #1

declare i64 @write(i32 noundef, ptr noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @send_data(ptr noundef, i32 noundef, ptr noundef, i64 noundef, ptr noundef) #7

; Function Attrs: nounwind uwtable
define dso_local i32 @echo(ptr noundef %0, i32 noundef %1, ptr noundef %2) #7 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca [2 x %struct.pollfd], align 16
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca [10240 x i8], align 16
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #8
  %18 = load i32, ptr %6, align 4, !tbaa !9
  %19 = getelementptr inbounds [2 x %struct.pollfd], ptr %8, i64 0, i64 0
  %20 = getelementptr inbounds %struct.pollfd, ptr %19, i32 0, i32 0
  store i32 %18, ptr %20, align 16, !tbaa !11
  %21 = getelementptr inbounds [2 x %struct.pollfd], ptr %8, i64 0, i64 0
  %22 = getelementptr inbounds %struct.pollfd, ptr %21, i32 0, i32 1
  store i16 1, ptr %22, align 4, !tbaa !14
  %23 = getelementptr inbounds [2 x %struct.pollfd], ptr %8, i64 0, i64 1
  %24 = getelementptr inbounds %struct.pollfd, ptr %23, i32 0, i32 0
  store i32 0, ptr %24, align 8, !tbaa !11
  %25 = getelementptr inbounds [2 x %struct.pollfd], ptr %8, i64 0, i64 1
  %26 = getelementptr inbounds %struct.pollfd, ptr %25, i32 0, i32 1
  store i16 1, ptr %26, align 4, !tbaa !14
  %27 = call ptr @__errno_location() #9
  store i32 0, ptr %27, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %28

28:                                               ; preds = %299, %3
  br label %29

29:                                               ; preds = %290, %288, %28
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = load i8, ptr %30, align 1, !tbaa !15, !range !17, !noundef !18
  %32 = trunc i8 %31 to i1
  br i1 %32, label %37, label %33

33:                                               ; preds = %29
  %34 = getelementptr inbounds [2 x %struct.pollfd], ptr %8, i64 0, i64 0
  %35 = call i32 @poll(ptr noundef %34, i64 noundef 2, i32 noundef -1)
  store i32 %35, ptr %9, align 4, !tbaa !9
  %36 = icmp sgt i32 %35, 0
  br label %37

37:                                               ; preds = %33, %29
  %38 = phi i1 [ false, %29 ], [ %36, %33 ]
  br i1 %38, label %39, label %291

39:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 10240, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  store i64 0, ptr %12, align 8, !tbaa !19
  %40 = getelementptr inbounds [2 x %struct.pollfd], ptr %8, i64 0, i64 0
  %41 = getelementptr inbounds %struct.pollfd, ptr %40, i32 0, i32 2
  %42 = load i16, ptr %41, align 2, !tbaa !21
  %43 = sext i16 %42 to i32
  %44 = and i32 %43, 1
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %46, label %96

46:                                               ; preds = %39
  %47 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 0, ptr %47, align 4, !tbaa !9
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds [10240 x i8], ptr %11, i64 0, i64 0
  %50 = call i64 @s2n_recv(ptr noundef %48, ptr noundef %49, i64 noundef 10240, ptr noundef %10)
  store i64 %50, ptr %12, align 8, !tbaa !19
  %51 = load i64, ptr %12, align 8, !tbaa !19
  %52 = icmp eq i64 %51, 0
  br i1 %52, label %53, label %54

53:                                               ; preds = %46
  store i32 0, ptr %4, align 4
  store i32 1, ptr %13, align 4
  br label %288

54:                                               ; preds = %46
  %55 = load i64, ptr %12, align 8, !tbaa !19
  %56 = icmp slt i64 %55, 0
  br i1 %56, label %57, label %74

57:                                               ; preds = %54
  %58 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %59 = load i32, ptr %58, align 4, !tbaa !9
  %60 = call i32 @s2n_error_get_type(i32 noundef %59)
  switch i32 %60, label %67 [
    i32 3, label %61
    i32 4, label %62
  ]

61:                                               ; preds = %57
  store i32 4, ptr %13, align 4
  br label %288, !llvm.loop !22

62:                                               ; preds = %57
  %63 = load ptr, ptr @stderr, align 8, !tbaa !5
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = call i32 @s2n_connection_get_alert(ptr noundef %64)
  %66 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %63, ptr noundef @.str.76, i32 noundef %65) #8
  br label %73

67:                                               ; preds = %57
  %68 = load ptr, ptr @stderr, align 8, !tbaa !5
  %69 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %70 = load i32, ptr %69, align 4, !tbaa !9
  %71 = call ptr @s2n_strerror(i32 noundef %70, ptr noundef @.str.14)
  %72 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %68, ptr noundef @.str.77, ptr noundef %71) #8
  br label %73

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

74:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %75 = getelementptr inbounds [10240 x i8], ptr %11, i64 0, i64 0
  store ptr %75, ptr %14, align 8, !tbaa !5
  br label %76

76:                                               ; preds = %92, %74
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %77 = load ptr, ptr %14, align 8, !tbaa !5
  %78 = load i64, ptr %12, align 8, !tbaa !19
  %79 = call i64 @write(i32 noundef 1, ptr noundef %77, i64 noundef %78)
  store i64 %79, ptr %15, align 8, !tbaa !19
  %80 = load i64, ptr %15, align 8, !tbaa !19
  %81 = icmp slt i64 %80, 0
  br i1 %81, label %82, label %85

82:                                               ; preds = %76
  %83 = load ptr, ptr @stderr, align 8, !tbaa !5
  %84 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %83, ptr noundef @.str.70) #8
  call void @exit(i32 noundef 1) #10
  unreachable

85:                                               ; preds = %76
  %86 = load i64, ptr %15, align 8, !tbaa !19
  %87 = load i64, ptr %12, align 8, !tbaa !19
  %88 = sub nsw i64 %87, %86
  store i64 %88, ptr %12, align 8, !tbaa !19
  %89 = load i64, ptr %15, align 8, !tbaa !19
  %90 = load ptr, ptr %14, align 8, !tbaa !5
  %91 = getelementptr inbounds i8, ptr %90, i64 %89
  store ptr %91, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %92

92:                                               ; preds = %85
  %93 = load i64, ptr %12, align 8, !tbaa !19
  %94 = icmp sgt i64 %93, 0
  br i1 %94, label %76, label %95, !llvm.loop !24

95:                                               ; preds = %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %96

96:                                               ; preds = %95, %39
  %97 = getelementptr inbounds [2 x %struct.pollfd], ptr %8, i64 0, i64 1
  %98 = getelementptr inbounds %struct.pollfd, ptr %97, i32 0, i32 2
  %99 = load i16, ptr %98, align 2, !tbaa !21
  %100 = sext i16 %99 to i32
  %101 = and i32 %100, 1
  %102 = icmp ne i32 %101, 0
  br i1 %102, label %103, label %155

103:                                              ; preds = %96
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  store i64 0, ptr %16, align 8, !tbaa !19
  %104 = call i32 (i32, i64, ...) @ioctl(i32 noundef 0, i64 noundef 21531, ptr noundef %16) #8
  %105 = icmp slt i32 %104, 0
  br i1 %105, label %106, label %107

106:                                              ; preds = %103
  store i64 1, ptr %16, align 8, !tbaa !19
  br label %107

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

108:                                              ; preds = %149, %107
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %109 = load i64, ptr %16, align 8, !tbaa !19
  store i64 %109, ptr %17, align 8, !tbaa !19
  %110 = load i64, ptr %16, align 8, !tbaa !19
  %111 = icmp ugt i64 %110, 10240
  br i1 %111, label %112, label %113

112:                                              ; preds = %108
  store i64 10240, ptr %17, align 8, !tbaa !19
  br label %113

113:                                              ; preds = %112, %108
  %114 = getelementptr inbounds [10240 x i8], ptr %11, i64 0, i64 0
  %115 = load i64, ptr %17, align 8, !tbaa !19
  %116 = call i64 @read(i32 noundef 0, ptr noundef %114, i64 noundef %115)
  store i64 %116, ptr %12, align 8, !tbaa !19
  %117 = load i64, ptr %12, align 8, !tbaa !19
  %118 = icmp slt i64 %117, 0
  br i1 %118, label %119, label %126

119:                                              ; preds = %113
  %120 = call ptr @__errno_location() #9
  %121 = load i32, ptr %120, align 4, !tbaa !9
  %122 = icmp ne i32 %121, 4
  br i1 %122, label %123, label %126

123:                                              ; preds = %119
  %124 = load ptr, ptr @stderr, align 8, !tbaa !5
  %125 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %124, ptr noundef @.str.78) #8
  call void @exit(i32 noundef 1) #10
  unreachable

126:                                              ; preds = %119, %113
  %127 = load i64, ptr %12, align 8, !tbaa !19
  %128 = icmp eq i64 %127, 0
  br i1 %128, label %129, label %132

129:                                              ; preds = %126
  %130 = load ptr, ptr @stderr, align 8, !tbaa !5
  %131 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %130, ptr noundef @.str.79) #8
  store i32 0, ptr %4, align 4
  store i32 1, ptr %13, align 4
  br label %140

132:                                              ; preds = %126
  %133 = load i64, ptr %12, align 8, !tbaa !19
  %134 = load i64, ptr %16, align 8, !tbaa !19
  %135 = sub i64 %134, %133
  store i64 %135, ptr %16, align 8, !tbaa !19
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = load i32, ptr %6, align 4, !tbaa !9
  %138 = getelementptr inbounds [10240 x i8], ptr %11, i64 0, i64 0
  %139 = load i64, ptr %12, align 8, !tbaa !19
  call void @send_data(ptr noundef %136, i32 noundef %137, ptr noundef %138, i64 noundef %139, ptr noundef %10)
  store i32 0, ptr %13, align 4
  br label %140

140:                                              ; preds = %132, %129
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  %141 = load i32, ptr %13, align 4
  switch i32 %141, label %152 [
    i32 0, label %142
  ]

142:                                              ; preds = %140
  br label %143

143:                                              ; preds = %142
  %144 = load i64, ptr %16, align 8, !tbaa !19
  %145 = icmp ne i64 %144, 0
  br i1 %145, label %149, label %146

146:                                              ; preds = %143
  %147 = load i32, ptr %10, align 4, !tbaa !9
  %148 = icmp ne i32 %147, 0
  br label %149

149:                                              ; preds = %146, %143
  %150 = phi i1 [ true, %143 ], [ %148, %146 ]
  br i1 %150, label %108, label %151, !llvm.loop !25

151:                                              ; preds = %149
  store i32 0, ptr %13, align 4
  br label %152

152:                                              ; preds = %151, %140
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  %153 = load i32, ptr %13, align 4
  switch i32 %153, label %288 [
    i32 0, label %154
  ]

154:                                              ; preds = %152
  br label %155

155:                                              ; preds = %154, %96
  %156 = getelementptr inbounds [2 x %struct.pollfd], ptr %8, i64 0, i64 1
  %157 = getelementptr inbounds %struct.pollfd, ptr %156, i32 0, i32 2
  %158 = load i16, ptr %157, align 2, !tbaa !21
  %159 = sext i16 %158 to i32
  %160 = and i32 %159, 16
  %161 = icmp ne i32 %160, 0
  br i1 %161, label %162, label %163

162:                                              ; preds = %155
  store i32 0, ptr %4, align 4
  store i32 1, ptr %13, align 4
  br label %288

163:                                              ; preds = %155
  %164 = getelementptr inbounds [2 x %struct.pollfd], ptr %8, i64 0, i64 0
  %165 = getelementptr inbounds %struct.pollfd, ptr %164, i32 0, i32 2
  %166 = load i16, ptr %165, align 2, !tbaa !21
  %167 = sext i16 %166 to i32
  %168 = and i32 %167, 56
  %169 = icmp ne i32 %168, 0
  br i1 %169, label %170, label %229

170:                                              ; preds = %163
  %171 = load ptr, ptr @stderr, align 8, !tbaa !5
  %172 = getelementptr inbounds [2 x %struct.pollfd], ptr %8, i64 0, i64 0
  %173 = getelementptr inbounds %struct.pollfd, ptr %172, i32 0, i32 2
  %174 = load i16, ptr %173, align 2, !tbaa !21
  %175 = sext i16 %174 to i32
  %176 = and i32 %175, 8
  %177 = icmp ne i32 %176, 0
  %178 = zext i1 %177 to i64
  %179 = select i1 %177, i32 1, i32 0
  %180 = getelementptr inbounds [2 x %struct.pollfd], ptr %8, i64 0, i64 0
  %181 = getelementptr inbounds %struct.pollfd, ptr %180, i32 0, i32 2
  %182 = load i16, ptr %181, align 2, !tbaa !21
  %183 = sext i16 %182 to i32
  %184 = and i32 %183, 16
  %185 = icmp ne i32 %184, 0
  %186 = zext i1 %185 to i64
  %187 = select i1 %185, i32 1, i32 0
  %188 = getelementptr inbounds [2 x %struct.pollfd], ptr %8, i64 0, i64 0
  %189 = getelementptr inbounds %struct.pollfd, ptr %188, i32 0, i32 2
  %190 = load i16, ptr %189, align 2, !tbaa !21
  %191 = sext i16 %190 to i32
  %192 = and i32 %191, 32
  %193 = icmp ne i32 %192, 0
  %194 = zext i1 %193 to i64
  %195 = select i1 %193, i32 1, i32 0
  %196 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %171, ptr noundef @.str.80, i32 noundef %179, i32 noundef %187, i32 noundef %195) #8
  br label %197

197:                                              ; preds = %170
  br label %198

198:                                              ; preds = %197
  %199 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %200 = getelementptr inbounds %struct.s2n_debug_info, ptr %199, i32 0, i32 0
  store ptr @.str.81, ptr %200, align 8, !tbaa !26
  %201 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %202 = getelementptr inbounds %struct.s2n_debug_info, ptr %201, i32 0, i32 0
  %203 = load ptr, ptr %202, align 8, !tbaa !26
  %204 = getelementptr inbounds i8, ptr %203, i64 21
  %205 = call ptr @strrchr(ptr noundef %204, i32 noundef 47) #11
  %206 = icmp ne ptr %205, null
  br i1 %206, label %207, label %214

207:                                              ; preds = %198
  %208 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %209 = getelementptr inbounds %struct.s2n_debug_info, ptr %208, i32 0, i32 0
  %210 = load ptr, ptr %209, align 8, !tbaa !26
  %211 = getelementptr inbounds i8, ptr %210, i64 21
  %212 = call ptr @strrchr(ptr noundef %211, i32 noundef 47) #11
  %213 = getelementptr inbounds i8, ptr %212, i64 1
  br label %219

214:                                              ; preds = %198
  %215 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %216 = getelementptr inbounds %struct.s2n_debug_info, ptr %215, i32 0, i32 0
  %217 = load ptr, ptr %216, align 8, !tbaa !26
  %218 = getelementptr inbounds i8, ptr %217, i64 21
  br label %219

219:                                              ; preds = %214, %207
  %220 = phi ptr [ %213, %207 ], [ %218, %214 ]
  %221 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %222 = getelementptr inbounds %struct.s2n_debug_info, ptr %221, i32 0, i32 1
  store ptr %220, ptr %222, align 8, !tbaa !28
  %223 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653246, ptr %223, align 4, !tbaa !9
  %224 = call i32 @s2n_calculate_stacktrace()
  br label %225

225:                                              ; preds = %219
  br label %226

226:                                              ; preds = %225
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %13, align 4
  br label %288

227:                                              ; No predecessors!
  br label %228

228:                                              ; preds = %227
  br label %229

229:                                              ; preds = %228, %163
  %230 = getelementptr inbounds [2 x %struct.pollfd], ptr %8, i64 0, i64 1
  %231 = getelementptr inbounds %struct.pollfd, ptr %230, i32 0, i32 2
  %232 = load i16, ptr %231, align 2, !tbaa !21
  %233 = sext i16 %232 to i32
  %234 = and i32 %233, 40
  %235 = icmp ne i32 %234, 0
  br i1 %235, label %236, label %287

236:                                              ; preds = %229
  %237 = load ptr, ptr @stderr, align 8, !tbaa !5
  %238 = getelementptr inbounds [2 x %struct.pollfd], ptr %8, i64 0, i64 1
  %239 = getelementptr inbounds %struct.pollfd, ptr %238, i32 0, i32 2
  %240 = load i16, ptr %239, align 2, !tbaa !21
  %241 = sext i16 %240 to i32
  %242 = and i32 %241, 8
  %243 = icmp ne i32 %242, 0
  %244 = zext i1 %243 to i64
  %245 = select i1 %243, i32 1, i32 0
  %246 = getelementptr inbounds [2 x %struct.pollfd], ptr %8, i64 0, i64 1
  %247 = getelementptr inbounds %struct.pollfd, ptr %246, i32 0, i32 2
  %248 = load i16, ptr %247, align 2, !tbaa !21
  %249 = sext i16 %248 to i32
  %250 = and i32 %249, 32
  %251 = icmp ne i32 %250, 0
  %252 = zext i1 %251 to i64
  %253 = select i1 %251, i32 1, i32 0
  %254 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %237, ptr noundef @.str.82, i32 noundef %245, i32 noundef %253) #8
  br label %255

255:                                              ; preds = %236
  br label %256

256:                                              ; preds = %255
  %257 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %258 = getelementptr inbounds %struct.s2n_debug_info, ptr %257, i32 0, i32 0
  store ptr @.str.83, ptr %258, align 8, !tbaa !26
  %259 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %260 = getelementptr inbounds %struct.s2n_debug_info, ptr %259, i32 0, i32 0
  %261 = load ptr, ptr %260, align 8, !tbaa !26
  %262 = getelementptr inbounds i8, ptr %261, i64 21
  %263 = call ptr @strrchr(ptr noundef %262, i32 noundef 47) #11
  %264 = icmp ne ptr %263, null
  br i1 %264, label %265, label %272

265:                                              ; preds = %256
  %266 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %267 = getelementptr inbounds %struct.s2n_debug_info, ptr %266, i32 0, i32 0
  %268 = load ptr, ptr %267, align 8, !tbaa !26
  %269 = getelementptr inbounds i8, ptr %268, i64 21
  %270 = call ptr @strrchr(ptr noundef %269, i32 noundef 47) #11
  %271 = getelementptr inbounds i8, ptr %270, i64 1
  br label %277

272:                                              ; preds = %256
  %273 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %274 = getelementptr inbounds %struct.s2n_debug_info, ptr %273, i32 0, i32 0
  %275 = load ptr, ptr %274, align 8, !tbaa !26
  %276 = getelementptr inbounds i8, ptr %275, i64 21
  br label %277

277:                                              ; preds = %272, %265
  %278 = phi ptr [ %271, %265 ], [ %276, %272 ]
  %279 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  %280 = getelementptr inbounds %struct.s2n_debug_info, ptr %279, i32 0, i32 1
  store ptr %278, ptr %280, align 8, !tbaa !28
  %281 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  store i32 402653246, ptr %281, align 4, !tbaa !9
  %282 = call i32 @s2n_calculate_stacktrace()
  br label %283

283:                                              ; preds = %277
  br label %284

284:                                              ; preds = %283
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %13, align 4
  br label %288

285:                                              ; No predecessors!
  br label %286

286:                                              ; preds = %285
  br label %287

287:                                              ; preds = %286, %229
  store i32 0, ptr %13, align 4
  br label %288

288:                                              ; preds = %287, %284, %226, %162, %152, %61, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 10240, ptr %11) #8
  %289 = load i32, ptr %13, align 4
  switch i32 %289, label %302 [
    i32 0, label %290
    i32 4, label %29
  ]

290:                                              ; preds = %288
  br label %29, !llvm.loop !22

291:                                              ; preds = %37
  br label %292

292:                                              ; preds = %291
  %293 = load i32, ptr %9, align 4, !tbaa !9
  %294 = icmp slt i32 %293, 0
  br i1 %294, label %295, label %299

295:                                              ; preds = %292
  %296 = call ptr @__errno_location() #9
  %297 = load i32, ptr %296, align 4, !tbaa !9
  %298 = icmp eq i32 %297, 4
  br label %299

299:                                              ; preds = %295, %292
  %300 = phi i1 [ false, %292 ], [ %298, %295 ]
  br i1 %300, label %28, label %301, !llvm.loop !29

301:                                              ; preds = %299
  store i32 0, ptr %4, align 4
  store i32 1, ptr %13, align 4
  br label %302

302:                                              ; preds = %301, %288
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #8
  %303 = load i32, ptr %4, align 4
  ret i32 %303
}

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

; Function Attrs: nounwind
declare i32 @ioctl(i32 noundef, i64 noundef, ...) #0

declare i64 @read(i32 noundef, ptr noundef, i64 noundef) #1

attributes #0 = { 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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, !10, i64 0}
!12 = !{!"pollfd", !10, i64 0, !13, i64 4, !13, i64 6}
!13 = !{!"short", !7, i64 0}
!14 = !{!12, !13, i64 4}
!15 = !{!16, !16, i64 0}
!16 = !{!"_Bool", !7, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!20, !20, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = !{!12, !13, i64 6}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = distinct !{!25, !23}
!26 = !{!27, !6, i64 0}
!27 = !{!"s2n_debug_info", !6, i64 0, !6, i64 8}
!28 = !{!27, !6, i64 8}
!29 = distinct !{!29, !23}


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

%struct.s2n_debug_info = type { ptr, ptr }
%struct.pollfd = type { i32, i16, i16 }

@stderr = external local_unnamed_addr global ptr, align 8
@s2n_errno = external thread_local local_unnamed_addr global i32, align 4
@.str.14 = external hidden unnamed_addr constant [3 x i8], align 1
@_s2n_debug_info = external thread_local local_unnamed_addr global %struct.s2n_debug_info, align 8
@.str.70 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.77 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.78 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.79 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.80 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.81 = external hidden unnamed_addr constant [81 x i8], align 1
@.str.82 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.83 = external hidden unnamed_addr constant [81 x i8], align 1

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

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

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

declare i32 @poll(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() 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) #3

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare ptr @strrchr(ptr noundef, i32 noundef) local_unnamed_addr #6

declare i32 @s2n_calculate_stacktrace() local_unnamed_addr #1

declare i32 @s2n_error_get_type(i32 noundef) local_unnamed_addr #1

declare i32 @s2n_connection_get_alert(ptr noundef) local_unnamed_addr #1

; Function Attrs: nofree
declare noundef i64 @write(i32 noundef, ptr nocapture noundef readonly, i64 noundef) local_unnamed_addr #7

; Function Attrs: nounwind uwtable
declare dso_local void @send_data(ptr noundef, i32 noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #8

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @echo(ptr noundef %0, i32 noundef %1, ptr nocapture noundef readonly %2) local_unnamed_addr #8 {
  %4 = alloca [2 x %struct.pollfd], align 16
  %5 = alloca i32, align 4
  %6 = alloca [10240 x i8], align 16
  %7 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #11
  store i32 %1, ptr %4, align 16, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %4, i64 4
  store i16 1, ptr %8, align 4, !tbaa !11
  %9 = getelementptr inbounds i8, ptr %4, i64 8
  store i32 0, ptr %9, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %4, i64 12
  store i16 1, ptr %10, align 4, !tbaa !11
  %11 = tail call ptr @__errno_location() #12
  store i32 0, ptr %11, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #11
  store i32 0, ptr %5, align 4, !tbaa !12
  %12 = getelementptr inbounds i8, ptr %4, i64 6
  %13 = tail call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @s2n_errno)
  %14 = getelementptr inbounds i8, ptr %4, i64 14
  %15 = load i8, ptr %2, align 1, !tbaa !13, !range !15, !noundef !16
  %16 = trunc nuw i8 %15 to i1
  br i1 %16, label %.critedge3, label %.split

.split:                                           ; preds = %3, %114
  %.028 = phi i32 [ %.230, %114 ], [ 0, %3 ]
  %17 = load i8, ptr %2, align 1, !tbaa !13, !range !15, !noundef !16
  %18 = trunc nuw i8 %17 to i1
  br i1 %18, label %.critedge, label %.lr.ph

.lr.ph:                                           ; preds = %.split, %110
  %19 = call i32 @poll(ptr noundef nonnull %4, i64 noundef 2, i32 noundef -1) #11
  %20 = icmp sgt i32 %19, 0
  br i1 %20, label %21, label %.critedge

21:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.start.p0(i64 10240, ptr nonnull %6) #11
  %22 = load i16, ptr %12, align 2, !tbaa !17
  %23 = and i16 %22, 1
  %.not = icmp eq i16 %23, 0
  br i1 %.not, label %.loopexit, label %24

24:                                               ; preds = %21
  store i32 0, ptr %13, align 4, !tbaa !12
  %25 = call i64 @s2n_recv(ptr noundef %0, ptr noundef nonnull %6, i64 noundef 10240, ptr noundef nonnull %5) #11
  %26 = icmp eq i64 %25, 0
  br i1 %26, label %.thread70, label %27

27:                                               ; preds = %24
  %28 = icmp slt i64 %25, 0
  br i1 %28, label %29, label %.preheader

29:                                               ; preds = %27
  %30 = load i32, ptr %13, align 4, !tbaa !12
  %31 = call i32 @s2n_error_get_type(i32 noundef %30) #11
  switch i32 %31, label %36 [
    i32 3, label %110
    i32 4, label %32
  ], !llvm.loop !18

32:                                               ; preds = %29
  %33 = load ptr, ptr @stderr, align 8, !tbaa !20
  %34 = call i32 @s2n_connection_get_alert(ptr noundef %0) #11
  %35 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %33, ptr noundef nonnull @.str.76, i32 noundef %34) #13
  br label %41

36:                                               ; preds = %29
  %37 = load ptr, ptr @stderr, align 8, !tbaa !20
  %38 = load i32, ptr %13, align 4, !tbaa !12
  %39 = call ptr @s2n_strerror(i32 noundef %38, ptr noundef nonnull @.str.14) #11
  %40 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.77, ptr noundef %39) #13
  br label %41

41:                                               ; preds = %36, %32
  call void @exit(i32 noundef 1) #14
  unreachable

.preheader:                                       ; preds = %27, %47
  %.035 = phi i64 [ %48, %47 ], [ %25, %27 ]
  %.031 = phi ptr [ %49, %47 ], [ %6, %27 ]
  %42 = call i64 @write(i32 noundef 1, ptr noundef %.031, i64 noundef %.035) #11
  %43 = icmp slt i64 %42, 0
  br i1 %43, label %44, label %47

44:                                               ; preds = %.preheader
  %45 = load ptr, ptr @stderr, align 8, !tbaa !20
  %46 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %45, ptr noundef nonnull @.str.70) #13
  call void @exit(i32 noundef 1) #14
  unreachable

47:                                               ; preds = %.preheader
  %48 = sub nsw i64 %.035, %42
  %49 = getelementptr inbounds i8, ptr %.031, i64 %42
  %50 = icmp sgt i64 %48, 0
  br i1 %50, label %.preheader, label %.loopexit, !llvm.loop !22

.loopexit:                                        ; preds = %47, %21
  %51 = load i16, ptr %14, align 2, !tbaa !17
  %52 = and i16 %51, 1
  %.not44 = icmp eq i16 %52, 0
  br i1 %.not44, label %77, label %53

53:                                               ; preds = %.loopexit
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #11
  store i64 0, ptr %7, align 8, !tbaa !23
  %54 = call i32 (i32, i64, ...) @ioctl(i32 noundef 0, i64 noundef 21531, ptr noundef nonnull %7) #11
  %55 = icmp slt i32 %54, 0
  br i1 %55, label %56, label %._crit_edge

._crit_edge:                                      ; preds = %53
  %.pre.pre = load i64, ptr %7, align 8, !tbaa !23
  br label %.preheader119

56:                                               ; preds = %53
  store i64 1, ptr %7, align 8, !tbaa !23
  br label %.preheader119

.preheader119:                                    ; preds = %._crit_edge, %56
  %.ph = phi i64 [ 1, %56 ], [ %.pre.pre, %._crit_edge ]
  br label %57

57:                                               ; preds = %.preheader119, %.thread
  %58 = phi i64 [ %71, %.thread ], [ %.ph, %.preheader119 ]
  %spec.store.select = call i64 @llvm.umin.i64(i64 %58, i64 10240)
  %59 = call i64 @read(i32 noundef 0, ptr noundef nonnull %6, i64 noundef %spec.store.select) #11
  %60 = icmp slt i64 %59, 0
  br i1 %60, label %61, label %66

61:                                               ; preds = %57
  %62 = load i32, ptr %11, align 4, !tbaa !12
  %.not45 = icmp eq i32 %62, 4
  br i1 %.not45, label %.thread, label %63

63:                                               ; preds = %61
  %64 = load ptr, ptr @stderr, align 8, !tbaa !20
  %65 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %64, ptr noundef nonnull @.str.78) #13
  call void @exit(i32 noundef 1) #14
  unreachable

66:                                               ; preds = %57
  %.not46.not = icmp eq i64 %59, 0
  br i1 %.not46.not, label %.thread66, label %.thread

.thread66:                                        ; preds = %66
  %67 = load ptr, ptr @stderr, align 8, !tbaa !20
  %68 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %67, ptr noundef nonnull @.str.79) #13
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #11
  br label %.thread70

.thread:                                          ; preds = %61, %66
  %69 = load i64, ptr %7, align 8, !tbaa !23
  %70 = sub i64 %69, %59
  store i64 %70, ptr %7, align 8, !tbaa !23
  call void @send_data(ptr noundef %0, i32 noundef %1, ptr noundef nonnull %6, i64 noundef %59, ptr noundef nonnull %5)
  %71 = load i64, ptr %7, align 8, !tbaa !23
  %72 = icmp ne i64 %71, 0
  %73 = load i32, ptr %5, align 4
  %74 = icmp ne i32 %73, 0
  %75 = select i1 %72, i1 true, i1 %74
  br i1 %75, label %57, label %76, !llvm.loop !25

76:                                               ; preds = %.thread
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #11
  %.pre93 = load i16, ptr %14, align 2, !tbaa !17
  br label %77

77:                                               ; preds = %76, %.loopexit
  %78 = phi i16 [ %.pre93, %76 ], [ %51, %.loopexit ]
  %79 = zext i16 %78 to i32
  %80 = and i32 %79, 16
  %.not47 = icmp eq i32 %80, 0
  br i1 %.not47, label %81, label %.thread70

81:                                               ; preds = %77
  %82 = load i16, ptr %12, align 2, !tbaa !17
  %83 = zext i16 %82 to i32
  %84 = and i32 %83, 56
  %.not48 = icmp eq i32 %84, 0
  br i1 %.not48, label %97, label %85

85:                                               ; preds = %81
  %86 = load ptr, ptr @stderr, align 8, !tbaa !20
  %87 = lshr i32 %83, 3
  %.lobit55 = and i32 %87, 1
  %88 = lshr i32 %83, 4
  %.lobit57 = and i32 %88, 1
  %89 = lshr i32 %83, 5
  %.lobit59 = and i32 %89, 1
  %90 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %86, ptr noundef nonnull @.str.80, i32 noundef %.lobit55, i32 noundef %.lobit57, i32 noundef %.lobit59) #13
  %91 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.81, ptr %91, align 8, !tbaa !26
  %92 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.81, i64 21), i32 noundef 47) #15
  %.not60 = icmp eq ptr %92, null
  %93 = getelementptr inbounds i8, ptr %92, i64 1
  %94 = select i1 %.not60, ptr getelementptr inbounds (i8, ptr @.str.81, i64 21), ptr %93
  %95 = getelementptr inbounds i8, ptr %91, i64 8
  store ptr %94, ptr %95, align 8, !tbaa !28
  store i32 402653246, ptr %13, align 4, !tbaa !12
  %96 = call i32 @s2n_calculate_stacktrace() #11
  br label %.thread70

97:                                               ; preds = %81
  %98 = and i32 %79, 40
  %.not49 = icmp eq i32 %98, 0
  br i1 %.not49, label %110, label %99

99:                                               ; preds = %97
  %100 = load ptr, ptr @stderr, align 8, !tbaa !20
  %101 = lshr i32 %79, 3
  %.lobit = and i32 %101, 1
  %102 = lshr i32 %79, 5
  %.lobit52 = and i32 %102, 1
  %103 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %100, ptr noundef nonnull @.str.82, i32 noundef %.lobit, i32 noundef %.lobit52) #13
  %104 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @_s2n_debug_info)
  store ptr @.str.83, ptr %104, align 8, !tbaa !26
  %105 = call ptr @strrchr(ptr noundef nonnull dereferenceable(1) getelementptr inbounds (i8, ptr @.str.83, i64 21), i32 noundef 47) #15
  %.not53 = icmp eq ptr %105, null
  %106 = getelementptr inbounds i8, ptr %105, i64 1
  %107 = select i1 %.not53, ptr getelementptr inbounds (i8, ptr @.str.83, i64 21), ptr %106
  %108 = getelementptr inbounds i8, ptr %104, i64 8
  store ptr %107, ptr %108, align 8, !tbaa !28
  store i32 402653246, ptr %13, align 4, !tbaa !12
  %109 = call i32 @s2n_calculate_stacktrace() #11
  br label %.thread70

.thread70:                                        ; preds = %24, %77, %85, %99, %.thread66
  %.5.ph = phi i32 [ 0, %.thread66 ], [ -1, %99 ], [ -1, %85 ], [ 0, %77 ], [ 0, %24 ]
  call void @llvm.lifetime.end.p0(i64 10240, ptr nonnull %6) #11
  br label %.critedge3

110:                                              ; preds = %97, %29
  call void @llvm.lifetime.end.p0(i64 10240, ptr nonnull %6) #11
  %111 = load i8, ptr %2, align 1, !tbaa !13, !range !15, !noundef !16
  %112 = trunc nuw i8 %111 to i1
  br i1 %112, label %.critedge, label %.lr.ph

.critedge:                                        ; preds = %110, %.lr.ph, %.split
  %.230 = phi i32 [ %.028, %.split ], [ %19, %.lr.ph ], [ %19, %110 ]
  %113 = icmp slt i32 %.230, 0
  br i1 %113, label %114, label %.critedge3

114:                                              ; preds = %.critedge
  %115 = load i32, ptr %11, align 4, !tbaa !12
  %116 = icmp eq i32 %115, 4
  br i1 %116, label %.split, label %.critedge3, !llvm.loop !29

.critedge3:                                       ; preds = %.critedge, %114, %3, %.thread70
  %.6 = phi i32 [ %.5.ph, %.thread70 ], [ 0, %3 ], [ 0, %114 ], [ 0, %.critedge ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #11
  ret i32 %.6
}

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

; Function Attrs: nounwind
declare i32 @ioctl(i32 noundef, i64 noundef, ...) local_unnamed_addr #9

; Function Attrs: nofree
declare noundef i64 @read(i32 noundef, ptr nocapture noundef, i64 noundef) local_unnamed_addr #7

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #10

attributes #0 = { 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 #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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #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 = { mustprogress nofree nounwind willreturn memory(argmem: 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 = { nofree "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 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 #9 = { 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 #10 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #11 = { nounwind }
attributes #12 = { nounwind willreturn memory(none) }
attributes #13 = { cold nounwind }
attributes #14 = { noreturn nounwind }
attributes #15 = { 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, !7, i64 0}
!6 = !{!"pollfd", !7, i64 0, !10, i64 4, !10, i64 6}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"short", !8, i64 0}
!11 = !{!6, !10, i64 4}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_Bool", !8, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!6, !10, i64 6}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!21, !21, i64 0}
!21 = !{!"any pointer", !8, i64 0}
!22 = distinct !{!22, !19}
!23 = !{!24, !24, i64 0}
!24 = !{!"long", !8, i64 0}
!25 = distinct !{!25, !19}
!26 = !{!27, !21, i64 0}
!27 = !{!"s2n_debug_info", !21, i64 0, !21, i64 8}
!28 = !{!27, !21, i64 8}
!29 = distinct !{!29, !19, !30}
!30 = !{!"llvm.loop.unswitch.partial.disable"}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass