; LLVM IR from thalium/icebox :: third_party/virtualbox/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal (TcpTransmitSegment)

; 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.NET_BUF = type { i32, i64, %struct._LIST_ENTRY, %union.NET_IP_HEAD, ptr, ptr, [64 x i8], ptr, i32, i32, [1 x %struct.NET_BLOCK_OP] }
%struct._LIST_ENTRY = type { ptr, ptr }
%union.NET_IP_HEAD = type { ptr }
%struct.NET_BLOCK_OP = type { ptr, ptr, ptr, ptr, i32 }
%struct._TCP_SEG = type { i32, i32, i32, i8, i16, i32 }
%struct._TCP_CB = type { %struct._LIST_ENTRY, ptr, ptr, %struct._TCP_PEER, %struct._TCP_PEER, %struct._LIST_ENTRY, %struct._LIST_ENTRY, i32, i32, i8, i8, i16, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i32, i32, i32, i32, i32, i16, i16, [6 x i32], i32, i32, i32, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16, i8, i8, i32, i32, i32, i8, i8, i16, i32, i32, i32, i8, i8, i8, %struct.EFI_IPv4_ADDRESS, ptr }
%struct._TCP_PEER = type { i32, i16 }
%struct.EFI_IPv4_ADDRESS = type { [4 x i8] }
%struct.TCP_HEAD = type { i16, i16, i32, i32, i8, i8, i16, i16, i16 }
%struct._SOCKET = type { i32, ptr, ptr, ptr, ptr, %struct._LIST_ENTRY, i8, i32, i8, i16, %struct.EFI_LOCK, %struct._SOCK_BUFFER, %struct._SOCK_BUFFER, i64, i8, i32, i32, ptr, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct._LIST_ENTRY, ptr, ptr, ptr, [20 x i8], %union._NET_PROTOCOL, ptr, ptr, ptr }
%struct.EFI_LOCK = type { i64, i64, i32 }
%struct._SOCK_BUFFER = type { i32, i32, ptr }
%union._NET_PROTOCOL = type { %struct._EFI_TCP4_PROTOCOL }
%struct._EFI_TCP4_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.NET_BUF_QUEUE = type { i32, i64, %struct._LIST_ENTRY, %struct._LIST_ENTRY, i32, i32 }

@.str = external hidden unnamed_addr constant [153 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [21 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare zeroext i8 @DebugAssertEnabled() #1

declare void @DebugAssert(ptr noundef, i64 noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local zeroext i16 @TcpComputeWnd(ptr noundef, i8 noundef zeroext) #2

declare zeroext i16 @SwapBytes16(i16 noundef zeroext) #1

; Function Attrs: nounwind uwtable
define dso_local i64 @TcpTransmitSegment(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i16, align 2
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 2, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  br label %10

10:                                               ; preds = %2
  %11 = call zeroext i8 @DebugAssertEnabled()
  %12 = icmp ne i8 %11, 0
  br i1 %12, label %13, label %27

13:                                               ; preds = %10
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = icmp ne ptr %14, null
  br i1 %15, label %16, label %25

16:                                               ; preds = %13
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.NET_BUF, ptr %17, i32 0, i32 4
  %19 = load ptr, ptr %18, align 8, !tbaa !9
  %20 = icmp eq ptr %19, null
  br i1 %20, label %21, label %25

21:                                               ; preds = %16
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = call i64 @TcpVerifySegment(ptr noundef %22)
  %24 = icmp ne i64 %23, 0
  br i1 %24, label %26, label %25

25:                                               ; preds = %21, %16, %13
  call void @DebugAssert(ptr noundef @.str, i64 noundef 301, ptr noundef @.str.4)
  br label %26

26:                                               ; preds = %25, %21
  br label %27

27:                                               ; preds = %26, %10
  br label %28

28:                                               ; preds = %27
  br label %29

29:                                               ; preds = %28
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.NET_BUF, ptr %30, i32 0, i32 9
  %32 = load i32, ptr %31, align 4, !tbaa !14
  store i32 %32, ptr %9, align 4, !tbaa !15
  %33 = load ptr, ptr %4, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.NET_BUF, ptr %33, i32 0, i32 6
  %35 = getelementptr inbounds [64 x i8], ptr %34, i64 0, i64 0
  store ptr %35, ptr %7, align 8, !tbaa !5
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct._TCP_SEG, ptr %36, i32 0, i32 3
  %38 = load i8, ptr %37, align 4, !tbaa !16
  %39 = zext i8 %38 to i32
  %40 = and i32 %39, 2
  %41 = icmp ne i32 %40, 0
  %42 = zext i1 %41 to i32
  %43 = trunc i32 %42 to i8
  store i8 %43, ptr %8, align 1, !tbaa !19
  %44 = load i8, ptr %8, align 1, !tbaa !19
  %45 = icmp ne i8 %44, 0
  br i1 %45, label %46, label %50

46:                                               ; preds = %29
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = call zeroext i16 @TcpSynBuildOption(ptr noundef %47, ptr noundef %48)
  store i16 %49, ptr %5, align 2, !tbaa !20
  br label %54

50:                                               ; preds = %29
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = call zeroext i16 @TcpBuildOption(ptr noundef %51, ptr noundef %52)
  store i16 %53, ptr %5, align 2, !tbaa !20
  br label %54

54:                                               ; preds = %50, %46
  br label %55

55:                                               ; preds = %54
  %56 = call zeroext i8 @DebugAssertEnabled()
  %57 = icmp ne i8 %56, 0
  br i1 %57, label %58, label %69

58:                                               ; preds = %55
  %59 = load i16, ptr %5, align 2, !tbaa !20
  %60 = zext i16 %59 to i32
  %61 = srem i32 %60, 4
  %62 = icmp eq i32 %61, 0
  br i1 %62, label %63, label %67

63:                                               ; preds = %58
  %64 = load i16, ptr %5, align 2, !tbaa !20
  %65 = zext i16 %64 to i32
  %66 = icmp sle i32 %65, 40
  br i1 %66, label %68, label %67

67:                                               ; preds = %63, %58
  call void @DebugAssert(ptr noundef @.str, i64 noundef 316, ptr noundef @.str.5)
  br label %68

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

69:                                               ; preds = %68, %55
  br label %70

70:                                               ; preds = %69
  br label %71

71:                                               ; preds = %70
  %72 = load i16, ptr %5, align 2, !tbaa !20
  %73 = zext i16 %72 to i64
  %74 = add i64 %73, 20
  %75 = trunc i64 %74 to i16
  store i16 %75, ptr %5, align 2, !tbaa !20
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = call ptr @NetbufAllocSpace(ptr noundef %76, i32 noundef 20, i8 noundef zeroext 1)
  store ptr %77, ptr %6, align 8, !tbaa !5
  br label %78

78:                                               ; preds = %71
  %79 = call zeroext i8 @DebugAssertEnabled()
  %80 = icmp ne i8 %79, 0
  br i1 %80, label %81, label %86

81:                                               ; preds = %78
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = icmp ne ptr %82, null
  br i1 %83, label %85, label %84

84:                                               ; preds = %81
  call void @DebugAssert(ptr noundef @.str, i64 noundef 326, ptr noundef @.str.6)
  br label %85

85:                                               ; preds = %84, %81
  br label %86

86:                                               ; preds = %85, %78
  br label %87

87:                                               ; preds = %86
  br label %88

88:                                               ; preds = %87
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.NET_BUF, ptr %90, i32 0, i32 4
  store ptr %89, ptr %91, align 8, !tbaa !9
  %92 = load ptr, ptr %3, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct._TCP_CB, ptr %92, i32 0, i32 3
  %94 = getelementptr inbounds %struct._TCP_PEER, ptr %93, i32 0, i32 1
  %95 = load i16, ptr %94, align 4, !tbaa !21
  %96 = load ptr, ptr %6, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.TCP_HEAD, ptr %96, i32 0, i32 0
  store i16 %95, ptr %97, align 1, !tbaa !25
  %98 = load ptr, ptr %3, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct._TCP_CB, ptr %98, i32 0, i32 4
  %100 = getelementptr inbounds %struct._TCP_PEER, ptr %99, i32 0, i32 1
  %101 = load i16, ptr %100, align 4, !tbaa !27
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.TCP_HEAD, ptr %102, i32 0, i32 1
  store i16 %101, ptr %103, align 1, !tbaa !28
  %104 = load ptr, ptr %7, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct._TCP_SEG, ptr %104, i32 0, i32 0
  %106 = load i32, ptr %105, align 4, !tbaa !29
  %107 = call i32 @SwapBytes32(i32 noundef %106)
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.TCP_HEAD, ptr %108, i32 0, i32 2
  store i32 %107, ptr %109, align 1, !tbaa !30
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct._TCP_CB, ptr %110, i32 0, i32 22
  %112 = load i32, ptr %111, align 4, !tbaa !31
  %113 = call i32 @SwapBytes32(i32 noundef %112)
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.TCP_HEAD, ptr %114, i32 0, i32 3
  store i32 %113, ptr %115, align 1, !tbaa !32
  %116 = load i16, ptr %5, align 2, !tbaa !20
  %117 = zext i16 %116 to i32
  %118 = ashr i32 %117, 2
  %119 = trunc i32 %118 to i8
  %120 = load ptr, ptr %6, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.TCP_HEAD, ptr %120, i32 0, i32 4
  %122 = load i8, ptr %121, align 1
  %123 = and i8 %119, 15
  %124 = shl i8 %123, 4
  %125 = and i8 %122, 15
  %126 = or i8 %125, %124
  store i8 %126, ptr %121, align 1
  %127 = load ptr, ptr %6, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.TCP_HEAD, ptr %127, i32 0, i32 4
  %129 = load i8, ptr %128, align 1
  %130 = and i8 %129, -16
  %131 = or i8 %130, 0
  store i8 %131, ptr %128, align 1
  %132 = load ptr, ptr %3, align 8, !tbaa !5
  %133 = load i8, ptr %8, align 1, !tbaa !19
  %134 = call zeroext i16 @TcpComputeWnd(ptr noundef %132, i8 noundef zeroext %133)
  %135 = load ptr, ptr %6, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.TCP_HEAD, ptr %135, i32 0, i32 6
  store i16 %134, ptr %136, align 1, !tbaa !33
  %137 = load ptr, ptr %6, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.TCP_HEAD, ptr %137, i32 0, i32 7
  store i16 0, ptr %138, align 1, !tbaa !34
  %139 = load ptr, ptr %7, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct._TCP_SEG, ptr %139, i32 0, i32 3
  %141 = load i8, ptr %140, align 4, !tbaa !16
  %142 = zext i8 %141 to i32
  %143 = and i32 %142, -9
  %144 = trunc i32 %143 to i8
  store i8 %144, ptr %140, align 4, !tbaa !16
  %145 = load i32, ptr %9, align 4, !tbaa !15
  %146 = icmp ne i32 %145, 0
  br i1 %146, label %147, label %211

147:                                              ; preds = %88
  %148 = load ptr, ptr %3, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct._TCP_CB, ptr %148, i32 0, i32 7
  %150 = load i32, ptr %149, align 8, !tbaa !35
  %151 = and i32 %150, 512
  %152 = icmp ne i32 %151, 0
  %153 = zext i1 %152 to i32
  %154 = trunc i32 %153 to i8
  %155 = zext i8 %154 to i32
  %156 = icmp ne i32 %155, 0
  br i1 %156, label %157, label %184

157:                                              ; preds = %147
  %158 = load ptr, ptr %7, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct._TCP_SEG, ptr %158, i32 0, i32 1
  %160 = load i32, ptr %159, align 4, !tbaa !36
  %161 = load ptr, ptr %7, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct._TCP_SEG, ptr %161, i32 0, i32 0
  %163 = load i32, ptr %162, align 4, !tbaa !29
  %164 = sub i32 %160, %163
  %165 = load ptr, ptr %3, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct._TCP_CB, ptr %165, i32 0, i32 15
  %167 = load i32, ptr %166, align 8, !tbaa !37
  %168 = load ptr, ptr %7, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct._TCP_SEG, ptr %168, i32 0, i32 0
  %170 = load i32, ptr %169, align 4, !tbaa !29
  %171 = sub i32 %167, %170
  %172 = icmp uge i32 %164, %171
  br i1 %172, label %173, label %184

173:                                              ; preds = %157
  %174 = load ptr, ptr %7, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct._TCP_SEG, ptr %174, i32 0, i32 3
  %176 = load i8, ptr %175, align 4, !tbaa !16
  %177 = zext i8 %176 to i32
  %178 = or i32 %177, 8
  %179 = trunc i32 %178 to i8
  store i8 %179, ptr %175, align 4, !tbaa !16
  %180 = load ptr, ptr %3, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct._TCP_CB, ptr %180, i32 0, i32 7
  %182 = load i32, ptr %181, align 8, !tbaa !35
  %183 = and i32 %182, -513
  store i32 %183, ptr %181, align 8, !tbaa !35
  br label %210

184:                                              ; preds = %157, %147
  %185 = load ptr, ptr %7, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct._TCP_SEG, ptr %185, i32 0, i32 1
  %187 = load i32, ptr %186, align 4, !tbaa !36
  %188 = load ptr, ptr %3, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct._TCP_CB, ptr %188, i32 0, i32 14
  %190 = load i32, ptr %189, align 4, !tbaa !38
  %191 = icmp eq i32 %187, %190
  br i1 %191, label %192, label %209

192:                                              ; preds = %184
  %193 = load ptr, ptr %3, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct._TCP_CB, ptr %193, i32 0, i32 2
  %195 = load ptr, ptr %194, align 8, !tbaa !39
  %196 = getelementptr inbounds %struct._SOCKET, ptr %195, i32 0, i32 11
  %197 = getelementptr inbounds %struct._SOCK_BUFFER, ptr %196, i32 0, i32 2
  %198 = load ptr, ptr %197, align 8, !tbaa !40
  %199 = getelementptr inbounds %struct.NET_BUF_QUEUE, ptr %198, i32 0, i32 4
  %200 = load i32, ptr %199, align 8, !tbaa !44
  %201 = icmp eq i32 %200, 0
  br i1 %201, label %202, label %209

202:                                              ; preds = %192
  %203 = load ptr, ptr %7, align 8, !tbaa !5
  %204 = getelementptr inbounds %struct._TCP_SEG, ptr %203, i32 0, i32 3
  %205 = load i8, ptr %204, align 4, !tbaa !16
  %206 = zext i8 %205 to i32
  %207 = or i32 %206, 8
  %208 = trunc i32 %207 to i8
  store i8 %208, ptr %204, align 4, !tbaa !16
  br label %209

209:                                              ; preds = %202, %192, %184
  br label %210

210:                                              ; preds = %209, %173
  br label %211

211:                                              ; preds = %210, %88
  %212 = load ptr, ptr %7, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct._TCP_SEG, ptr %212, i32 0, i32 3
  %214 = load i8, ptr %213, align 4, !tbaa !16
  %215 = zext i8 %214 to i32
  %216 = and i32 %215, -33
  %217 = trunc i32 %216 to i8
  store i8 %217, ptr %213, align 4, !tbaa !16
  %218 = load ptr, ptr %3, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct._TCP_CB, ptr %218, i32 0, i32 7
  %220 = load i32, ptr %219, align 8, !tbaa !35
  %221 = and i32 %220, 128
  %222 = icmp ne i32 %221, 0
  %223 = zext i1 %222 to i32
  %224 = trunc i32 %223 to i8
  %225 = zext i8 %224 to i32
  %226 = icmp ne i32 %225, 0
  br i1 %226, label %227, label %286

227:                                              ; preds = %211
  %228 = load ptr, ptr %7, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct._TCP_SEG, ptr %228, i32 0, i32 0
  %230 = load i32, ptr %229, align 4, !tbaa !29
  %231 = load ptr, ptr %3, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct._TCP_CB, ptr %231, i32 0, i32 16
  %233 = load i32, ptr %232, align 4, !tbaa !46
  %234 = sub i32 %230, %233
  %235 = icmp sle i32 %234, 0
  br i1 %235, label %236, label %286

236:                                              ; preds = %227
  %237 = load ptr, ptr %7, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct._TCP_SEG, ptr %237, i32 0, i32 3
  %239 = load i8, ptr %238, align 4, !tbaa !16
  %240 = zext i8 %239 to i32
  %241 = or i32 %240, 32
  %242 = trunc i32 %241 to i8
  store i8 %242, ptr %238, align 4, !tbaa !16
  %243 = load ptr, ptr %3, align 8, !tbaa !5
  %244 = getelementptr inbounds %struct._TCP_CB, ptr %243, i32 0, i32 16
  %245 = load i32, ptr %244, align 4, !tbaa !46
  %246 = load ptr, ptr %7, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct._TCP_SEG, ptr %246, i32 0, i32 1
  %248 = load i32, ptr %247, align 4, !tbaa !36
  %249 = sub i32 %245, %248
  %250 = icmp slt i32 %249, 0
  br i1 %250, label %251, label %262

251:                                              ; preds = %236
  %252 = load ptr, ptr %3, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct._TCP_CB, ptr %252, i32 0, i32 16
  %254 = load i32, ptr %253, align 4, !tbaa !46
  %255 = load ptr, ptr %7, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct._TCP_SEG, ptr %255, i32 0, i32 0
  %257 = load i32, ptr %256, align 4, !tbaa !29
  %258 = sub i32 %254, %257
  %259 = trunc i32 %258 to i16
  %260 = load ptr, ptr %7, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct._TCP_SEG, ptr %260, i32 0, i32 4
  store i16 %259, ptr %261, align 2, !tbaa !47
  br label %285

262:                                              ; preds = %236
  %263 = load ptr, ptr %3, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct._TCP_CB, ptr %263, i32 0, i32 16
  %265 = load i32, ptr %264, align 4, !tbaa !46
  %266 = load ptr, ptr %7, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct._TCP_SEG, ptr %266, i32 0, i32 0
  %268 = load i32, ptr %267, align 4, !tbaa !29
  %269 = sub i32 %265, %268
  %270 = icmp ult i32 %269, 65535
  br i1 %270, label %271, label %279

271:                                              ; preds = %262
  %272 = load ptr, ptr %3, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct._TCP_CB, ptr %272, i32 0, i32 16
  %274 = load i32, ptr %273, align 4, !tbaa !46
  %275 = load ptr, ptr %7, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct._TCP_SEG, ptr %275, i32 0, i32 0
  %277 = load i32, ptr %276, align 4, !tbaa !29
  %278 = sub i32 %274, %277
  br label %280

279:                                              ; preds = %262
  br label %280

280:                                              ; preds = %279, %271
  %281 = phi i32 [ %278, %271 ], [ 65535, %279 ]
  %282 = trunc i32 %281 to i16
  %283 = load ptr, ptr %7, align 8, !tbaa !5
  %284 = getelementptr inbounds %struct._TCP_SEG, ptr %283, i32 0, i32 4
  store i16 %282, ptr %284, align 2, !tbaa !47
  br label %285

285:                                              ; preds = %280, %251
  br label %286

286:                                              ; preds = %285, %227, %211
  %287 = load ptr, ptr %7, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct._TCP_SEG, ptr %287, i32 0, i32 3
  %289 = load i8, ptr %288, align 4, !tbaa !16
  %290 = load ptr, ptr %6, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.TCP_HEAD, ptr %290, i32 0, i32 5
  store i8 %289, ptr %291, align 1, !tbaa !48
  %292 = load ptr, ptr %7, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct._TCP_SEG, ptr %292, i32 0, i32 4
  %294 = load i16, ptr %293, align 2, !tbaa !47
  %295 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %294)
  %296 = load ptr, ptr %6, align 8, !tbaa !5
  %297 = getelementptr inbounds %struct.TCP_HEAD, ptr %296, i32 0, i32 8
  store i16 %295, ptr %297, align 1, !tbaa !49
  %298 = load ptr, ptr %4, align 8, !tbaa !5
  %299 = load ptr, ptr %3, align 8, !tbaa !5
  %300 = getelementptr inbounds %struct._TCP_CB, ptr %299, i32 0, i32 11
  %301 = load i16, ptr %300, align 2, !tbaa !50
  %302 = call zeroext i16 @TcpChecksum(ptr noundef %298, i16 noundef zeroext %301)
  %303 = load ptr, ptr %6, align 8, !tbaa !5
  %304 = getelementptr inbounds %struct.TCP_HEAD, ptr %303, i32 0, i32 7
  store i16 %302, ptr %304, align 1, !tbaa !34
  %305 = load ptr, ptr %3, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct._TCP_CB, ptr %305, i32 0, i32 22
  %307 = load i32, ptr %306, align 4, !tbaa !31
  %308 = load ptr, ptr %3, align 8, !tbaa !5
  %309 = getelementptr inbounds %struct._TCP_CB, ptr %308, i32 0, i32 24
  store i32 %307, ptr %309, align 4, !tbaa !51
  %310 = load i8, ptr %8, align 1, !tbaa !19
  %311 = icmp ne i8 %310, 0
  br i1 %311, label %312, label %320

312:                                              ; preds = %286
  %313 = load ptr, ptr %6, align 8, !tbaa !5
  %314 = getelementptr inbounds %struct.TCP_HEAD, ptr %313, i32 0, i32 6
  %315 = load i16, ptr %314, align 1, !tbaa !33
  %316 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %315)
  %317 = zext i16 %316 to i32
  %318 = load ptr, ptr %3, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct._TCP_CB, ptr %318, i32 0, i32 23
  store i32 %317, ptr %319, align 8, !tbaa !52
  br label %320

320:                                              ; preds = %312, %286
  %321 = load ptr, ptr %3, align 8, !tbaa !5
  %322 = getelementptr inbounds %struct._TCP_CB, ptr %321, i32 0, i32 10
  store i8 0, ptr %322, align 1, !tbaa !53
  %323 = load ptr, ptr %3, align 8, !tbaa !5
  %324 = load ptr, ptr %4, align 8, !tbaa !5
  %325 = load ptr, ptr %3, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct._TCP_CB, ptr %325, i32 0, i32 3
  %327 = getelementptr inbounds %struct._TCP_PEER, ptr %326, i32 0, i32 0
  %328 = load i32, ptr %327, align 8, !tbaa !54
  %329 = load ptr, ptr %3, align 8, !tbaa !5
  %330 = getelementptr inbounds %struct._TCP_CB, ptr %329, i32 0, i32 4
  %331 = getelementptr inbounds %struct._TCP_PEER, ptr %330, i32 0, i32 0
  %332 = load i32, ptr %331, align 8, !tbaa !55
  %333 = call i64 @TcpSendIpPacket(ptr noundef %323, ptr noundef %324, i32 noundef %328, i32 noundef %332)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %5) #3
  ret i64 %333
}

; Function Attrs: nounwind uwtable
declare dso_local i64 @TcpVerifySegment(ptr noundef) #2

declare zeroext i16 @TcpSynBuildOption(ptr noundef, ptr noundef) #1

declare zeroext i16 @TcpBuildOption(ptr noundef, ptr noundef) #1

declare ptr @NetbufAllocSpace(ptr noundef, i32 noundef, i8 noundef zeroext) #1

declare i32 @SwapBytes32(i32 noundef) #1

declare zeroext i16 @TcpChecksum(ptr noundef, i16 noundef zeroext) #1

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

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 = { 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 #3 = { 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, !6, i64 40}
!10 = !{!"", !11, i64 0, !12, i64 8, !13, i64 16, !7, i64 32, !6, i64 40, !6, i64 48, !7, i64 56, !6, i64 120, !11, i64 128, !11, i64 132, !7, i64 136}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!14 = !{!10, !11, i64 132}
!15 = !{!11, !11, i64 0}
!16 = !{!17, !7, i64 12}
!17 = !{!"_TCP_SEG", !11, i64 0, !11, i64 4, !11, i64 8, !7, i64 12, !18, i64 14, !11, i64 16}
!18 = !{!"short", !7, i64 0}
!19 = !{!7, !7, i64 0}
!20 = !{!18, !18, i64 0}
!21 = !{!22, !18, i64 36}
!22 = !{!"_TCP_CB", !13, i64 0, !6, i64 16, !6, i64 24, !23, i64 32, !23, i64 40, !13, i64 48, !13, i64 64, !11, i64 80, !11, i64 84, !7, i64 88, !7, i64 89, !18, i64 90, !11, i64 92, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !11, i64 112, !11, i64 116, !11, i64 120, !11, i64 124, !18, i64 128, !11, i64 132, !11, i64 136, !11, i64 140, !11, i64 144, !11, i64 148, !18, i64 152, !18, i64 154, !7, i64 156, !11, i64 180, !11, i64 184, !11, i64 188, !7, i64 192, !7, i64 193, !7, i64 194, !11, i64 196, !11, i64 200, !11, i64 204, !11, i64 208, !11, i64 212, !11, i64 216, !11, i64 220, !11, i64 224, !11, i64 228, !11, i64 232, !18, i64 236, !7, i64 238, !7, i64 239, !11, i64 240, !11, i64 244, !11, i64 248, !7, i64 252, !7, i64 253, !18, i64 254, !11, i64 256, !11, i64 260, !11, i64 264, !7, i64 268, !7, i64 269, !7, i64 270, !24, i64 271, !6, i64 280}
!23 = !{!"_TCP_PEER", !11, i64 0, !18, i64 4}
!24 = !{!"", !7, i64 0}
!25 = !{!26, !18, i64 0}
!26 = !{!"", !18, i64 0, !18, i64 2, !11, i64 4, !11, i64 8, !7, i64 12, !7, i64 12, !7, i64 13, !18, i64 14, !18, i64 16, !18, i64 18}
!27 = !{!22, !18, i64 44}
!28 = !{!26, !18, i64 2}
!29 = !{!17, !11, i64 0}
!30 = !{!26, !11, i64 4}
!31 = !{!22, !11, i64 132}
!32 = !{!26, !11, i64 8}
!33 = !{!26, !18, i64 14}
!34 = !{!26, !18, i64 16}
!35 = !{!22, !11, i64 80}
!36 = !{!17, !11, i64 4}
!37 = !{!22, !11, i64 104}
!38 = !{!22, !11, i64 100}
!39 = !{!22, !6, i64 24}
!40 = !{!41, !6, i64 104}
!41 = !{!"_SOCKET", !11, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !13, i64 40, !7, i64 56, !11, i64 60, !7, i64 64, !18, i64 66, !42, i64 72, !43, i64 96, !43, i64 112, !12, i64 128, !7, i64 136, !11, i64 140, !11, i64 144, !6, i64 152, !13, i64 160, !13, i64 176, !13, i64 192, !13, i64 208, !13, i64 224, !6, i64 240, !6, i64 248, !6, i64 256, !7, i64 264, !7, i64 288, !6, i64 368, !6, i64 376, !6, i64 384}
!42 = !{!"", !12, i64 0, !12, i64 8, !11, i64 16}
!43 = !{!"_SOCK_BUFFER", !11, i64 0, !11, i64 4, !6, i64 8}
!44 = !{!45, !11, i64 48}
!45 = !{!"", !11, i64 0, !12, i64 8, !13, i64 16, !13, i64 32, !11, i64 48, !11, i64 52}
!46 = !{!22, !11, i64 108}
!47 = !{!17, !18, i64 14}
!48 = !{!26, !7, i64 13}
!49 = !{!26, !18, i64 18}
!50 = !{!22, !18, i64 90}
!51 = !{!22, !11, i64 140}
!52 = !{!22, !11, i64 136}
!53 = !{!22, !7, i64 89}
!54 = !{!22, !11, i64 32}
!55 = !{!22, !11, i64 40}


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

@.str = external hidden unnamed_addr constant [153 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [21 x i8], align 1

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #0

declare void @DebugAssert(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local zeroext i16 @TcpComputeWnd(ptr noundef, i8 noundef zeroext) local_unnamed_addr #1

declare zeroext i16 @SwapBytes16(i16 noundef zeroext) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i64 @TcpTransmitSegment(ptr noundef %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = tail call zeroext i8 @DebugAssertEnabled() #3
  %.not = icmp eq i8 %3, 0
  br i1 %.not, label %12, label %4

4:                                                ; preds = %2
  %.not83 = icmp eq ptr %1, null
  br i1 %.not83, label %11, label %5

5:                                                ; preds = %4
  %6 = getelementptr inbounds i8, ptr %1, i64 40
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = icmp eq ptr %7, null
  br i1 %8, label %9, label %11

9:                                                ; preds = %5
  %10 = tail call i64 @TcpVerifySegment(ptr noundef nonnull %1)
  %.not84 = icmp eq i64 %10, 0
  br i1 %.not84, label %11, label %12

11:                                               ; preds = %9, %5, %4
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 301, ptr noundef nonnull @.str.4) #3
  br label %12

12:                                               ; preds = %9, %11, %2
  %13 = getelementptr inbounds i8, ptr %1, i64 132
  %14 = load i32, ptr %13, align 4, !tbaa !13
  %15 = getelementptr inbounds i8, ptr %1, i64 56
  %16 = getelementptr inbounds i8, ptr %1, i64 68
  %17 = load i8, ptr %16, align 4, !tbaa !14
  %18 = lshr i8 %17, 1
  %.lobit = and i8 %18, 1
  %.not85 = icmp eq i8 %.lobit, 0
  br i1 %.not85, label %21, label %19

19:                                               ; preds = %12
  %20 = tail call zeroext i16 @TcpSynBuildOption(ptr noundef %0, ptr noundef nonnull %1) #3
  br label %23

21:                                               ; preds = %12
  %22 = tail call zeroext i16 @TcpBuildOption(ptr noundef %0, ptr noundef nonnull %1) #3
  br label %23

23:                                               ; preds = %19, %21
  %.0 = phi i16 [ %20, %19 ], [ %22, %21 ]
  %24 = tail call zeroext i8 @DebugAssertEnabled() #3
  %.not86 = icmp eq i8 %24, 0
  br i1 %.not86, label %30, label %25

25:                                               ; preds = %23
  %26 = and i16 %.0, 3
  %27 = icmp eq i16 %26, 0
  %28 = icmp ult i16 %.0, 41
  %or.cond = and i1 %28, %27
  br i1 %or.cond, label %30, label %29

29:                                               ; preds = %25
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 316, ptr noundef nonnull @.str.5) #3
  br label %30

30:                                               ; preds = %29, %25, %23
  %31 = tail call ptr @NetbufAllocSpace(ptr noundef nonnull %1, i32 noundef 20, i8 noundef zeroext 1) #3
  %32 = tail call zeroext i8 @DebugAssertEnabled() #3
  %33 = icmp eq i8 %32, 0
  %34 = icmp ne ptr %31, null
  %or.cond4 = select i1 %33, i1 true, i1 %34
  br i1 %or.cond4, label %36, label %35

35:                                               ; preds = %30
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 326, ptr noundef nonnull @.str.6) #3
  br label %36

36:                                               ; preds = %35, %30
  %37 = getelementptr inbounds i8, ptr %1, i64 40
  store ptr %31, ptr %37, align 8, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %0, i64 36
  %39 = load i16, ptr %38, align 4, !tbaa !17
  store i16 %39, ptr %31, align 1, !tbaa !21
  %40 = getelementptr inbounds i8, ptr %0, i64 44
  %41 = load i16, ptr %40, align 4, !tbaa !23
  %42 = getelementptr inbounds i8, ptr %31, i64 2
  store i16 %41, ptr %42, align 1, !tbaa !24
  %43 = load i32, ptr %15, align 4, !tbaa !25
  %44 = tail call i32 @SwapBytes32(i32 noundef %43) #3
  %45 = getelementptr inbounds i8, ptr %31, i64 4
  store i32 %44, ptr %45, align 1, !tbaa !26
  %46 = getelementptr inbounds i8, ptr %0, i64 132
  %47 = load i32, ptr %46, align 4, !tbaa !27
  %48 = tail call i32 @SwapBytes32(i32 noundef %47) #3
  %49 = getelementptr inbounds i8, ptr %31, i64 8
  store i32 %48, ptr %49, align 1, !tbaa !28
  %50 = trunc i16 %.0 to i8
  %51 = getelementptr inbounds i8, ptr %31, i64 12
  %52 = shl i8 %50, 2
  %53 = and i8 %52, -16
  %54 = add i8 %53, 80
  store i8 %54, ptr %51, align 1
  %55 = tail call zeroext i16 @TcpComputeWnd(ptr noundef %0, i8 noundef zeroext %.lobit)
  %56 = getelementptr inbounds i8, ptr %31, i64 14
  store i16 %55, ptr %56, align 1, !tbaa !29
  %57 = getelementptr inbounds i8, ptr %31, i64 16
  store i16 0, ptr %57, align 1, !tbaa !30
  %58 = load i8, ptr %16, align 4, !tbaa !14
  %59 = and i8 %58, -9
  %.not87 = icmp eq i32 %14, 0
  %.phi.trans.insert95 = getelementptr inbounds i8, ptr %0, i64 80
  %.pre96 = load i32, ptr %.phi.trans.insert95, align 8, !tbaa !31
  br i1 %.not87, label %._crit_edge94, label %60

60:                                               ; preds = %36
  %61 = and i32 %.pre96, 512
  %.not89 = icmp eq i32 %61, 0
  %.phi.trans.insert = getelementptr inbounds i8, ptr %1, i64 60
  %.pre = load i32, ptr %.phi.trans.insert, align 4, !tbaa !32
  br i1 %.not89, label %._crit_edge, label %62

62:                                               ; preds = %60
  %63 = load i32, ptr %15, align 4, !tbaa !25
  %64 = sub i32 %.pre, %63
  %65 = getelementptr inbounds i8, ptr %0, i64 104
  %66 = load i32, ptr %65, align 8, !tbaa !33
  %67 = sub i32 %66, %63
  %.not90 = icmp ult i32 %64, %67
  br i1 %.not90, label %._crit_edge, label %68

68:                                               ; preds = %62
  %69 = or i8 %58, 8
  %70 = and i32 %.pre96, -513
  store i32 %70, ptr %.phi.trans.insert95, align 8, !tbaa !31
  br label %._crit_edge94

._crit_edge:                                      ; preds = %60, %62
  %71 = getelementptr inbounds i8, ptr %0, i64 100
  %72 = load i32, ptr %71, align 4, !tbaa !34
  %73 = icmp eq i32 %.pre, %72
  br i1 %73, label %74, label %._crit_edge94

74:                                               ; preds = %._crit_edge
  %75 = getelementptr inbounds i8, ptr %0, i64 24
  %76 = load ptr, ptr %75, align 8, !tbaa !35
  %77 = getelementptr inbounds i8, ptr %76, i64 104
  %78 = load ptr, ptr %77, align 8, !tbaa !36
  %79 = getelementptr inbounds i8, ptr %78, i64 48
  %80 = load i32, ptr %79, align 8, !tbaa !40
  %81 = icmp eq i32 %80, 0
  %masksel = select i1 %81, i8 8, i8 0
  %spec.select97 = or disjoint i8 %59, %masksel
  br label %._crit_edge94

._crit_edge94:                                    ; preds = %74, %36, %68, %._crit_edge
  %82 = phi i32 [ %70, %68 ], [ %.pre96, %._crit_edge ], [ %.pre96, %36 ], [ %.pre96, %74 ]
  %83 = phi i8 [ %69, %68 ], [ %59, %._crit_edge ], [ %59, %36 ], [ %spec.select97, %74 ]
  %84 = and i8 %83, -33
  store i8 %84, ptr %16, align 4, !tbaa !14
  %85 = and i32 %82, 128
  %.not92 = icmp eq i32 %85, 0
  br i1 %.not92, label %100, label %86

86:                                               ; preds = %._crit_edge94
  %87 = load i32, ptr %15, align 4, !tbaa !25
  %88 = getelementptr inbounds i8, ptr %0, i64 108
  %89 = load i32, ptr %88, align 4, !tbaa !42
  %90 = sub i32 %87, %89
  %91 = icmp slt i32 %90, 1
  br i1 %91, label %.sink.split, label %100

.sink.split:                                      ; preds = %86
  %92 = or i8 %83, 32
  store i8 %92, ptr %16, align 4, !tbaa !14
  %93 = getelementptr inbounds i8, ptr %1, i64 60
  %94 = load i32, ptr %93, align 4, !tbaa !32
  %95 = sub i32 %89, %94
  %96 = icmp slt i32 %95, 0
  %97 = sub i32 %89, %87
  %spec.select93 = tail call i32 @llvm.umin.i32(i32 %97, i32 65535)
  %.sink99 = select i1 %96, i32 %97, i32 %spec.select93
  %98 = trunc i32 %.sink99 to i16
  %99 = getelementptr inbounds i8, ptr %1, i64 70
  store i16 %98, ptr %99, align 2, !tbaa !43
  br label %100

100:                                              ; preds = %.sink.split, %86, %._crit_edge94
  %101 = phi i8 [ %84, %86 ], [ %84, %._crit_edge94 ], [ %92, %.sink.split ]
  %102 = getelementptr inbounds i8, ptr %31, i64 13
  store i8 %101, ptr %102, align 1, !tbaa !44
  %103 = getelementptr inbounds i8, ptr %1, i64 70
  %104 = load i16, ptr %103, align 2, !tbaa !43
  %105 = tail call zeroext i16 @SwapBytes16(i16 noundef zeroext %104) #3
  %106 = getelementptr inbounds i8, ptr %31, i64 18
  store i16 %105, ptr %106, align 1, !tbaa !45
  %107 = getelementptr inbounds i8, ptr %0, i64 90
  %108 = load i16, ptr %107, align 2, !tbaa !46
  %109 = tail call zeroext i16 @TcpChecksum(ptr noundef nonnull %1, i16 noundef zeroext %108) #3
  store i16 %109, ptr %57, align 1, !tbaa !30
  %110 = load i32, ptr %46, align 4, !tbaa !27
  %111 = getelementptr inbounds i8, ptr %0, i64 140
  store i32 %110, ptr %111, align 4, !tbaa !47
  br i1 %.not85, label %117, label %112

112:                                              ; preds = %100
  %113 = load i16, ptr %56, align 1, !tbaa !29
  %114 = tail call zeroext i16 @SwapBytes16(i16 noundef zeroext %113) #3
  %115 = zext i16 %114 to i32
  %116 = getelementptr inbounds i8, ptr %0, i64 136
  store i32 %115, ptr %116, align 8, !tbaa !48
  br label %117

117:                                              ; preds = %112, %100
  %118 = getelementptr inbounds i8, ptr %0, i64 40
  %119 = getelementptr inbounds i8, ptr %0, i64 32
  %120 = getelementptr inbounds i8, ptr %0, i64 89
  store i8 0, ptr %120, align 1, !tbaa !49
  %121 = load i32, ptr %119, align 8, !tbaa !50
  %122 = load i32, ptr %118, align 8, !tbaa !51
  %123 = tail call i64 @TcpSendIpPacket(ptr noundef nonnull %0, ptr noundef nonnull %1, i32 noundef %121, i32 noundef %122) #3
  ret i64 %123
}

; Function Attrs: nounwind uwtable
declare dso_local i64 @TcpVerifySegment(ptr noundef) local_unnamed_addr #1

declare zeroext i16 @TcpSynBuildOption(ptr noundef, ptr noundef) local_unnamed_addr #0

declare zeroext i16 @TcpBuildOption(ptr noundef, ptr noundef) local_unnamed_addr #0

declare ptr @NetbufAllocSpace(ptr noundef, i32 noundef, i8 noundef zeroext) local_unnamed_addr #0

declare i32 @SwapBytes32(i32 noundef) local_unnamed_addr #0

declare zeroext i16 @TcpChecksum(ptr noundef, i16 noundef zeroext) local_unnamed_addr #0

declare i64 @TcpSendIpPacket(ptr noundef, ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

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 = { 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 #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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, !12, i64 40}
!6 = !{!"", !7, i64 0, !10, i64 8, !11, i64 16, !8, i64 32, !12, i64 40, !12, i64 48, !8, i64 56, !12, i64 120, !7, i64 128, !7, i64 132, !8, i64 136}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long long", !8, i64 0}
!11 = !{!"_LIST_ENTRY", !12, i64 0, !12, i64 8}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!6, !7, i64 132}
!14 = !{!15, !8, i64 12}
!15 = !{!"_TCP_SEG", !7, i64 0, !7, i64 4, !7, i64 8, !8, i64 12, !16, i64 14, !7, i64 16}
!16 = !{!"short", !8, i64 0}
!17 = !{!18, !16, i64 36}
!18 = !{!"_TCP_CB", !11, i64 0, !12, i64 16, !12, i64 24, !19, i64 32, !19, i64 40, !11, i64 48, !11, i64 64, !7, i64 80, !7, i64 84, !8, i64 88, !8, i64 89, !16, i64 90, !7, i64 92, !7, i64 96, !7, i64 100, !7, i64 104, !7, i64 108, !7, i64 112, !7, i64 116, !7, i64 120, !7, i64 124, !16, i64 128, !7, i64 132, !7, i64 136, !7, i64 140, !7, i64 144, !7, i64 148, !16, i64 152, !16, i64 154, !8, i64 156, !7, i64 180, !7, i64 184, !7, i64 188, !8, i64 192, !8, i64 193, !8, i64 194, !7, i64 196, !7, i64 200, !7, i64 204, !7, i64 208, !7, i64 212, !7, i64 216, !7, i64 220, !7, i64 224, !7, i64 228, !7, i64 232, !16, i64 236, !8, i64 238, !8, i64 239, !7, i64 240, !7, i64 244, !7, i64 248, !8, i64 252, !8, i64 253, !16, i64 254, !7, i64 256, !7, i64 260, !7, i64 264, !8, i64 268, !8, i64 269, !8, i64 270, !20, i64 271, !12, i64 280}
!19 = !{!"_TCP_PEER", !7, i64 0, !16, i64 4}
!20 = !{!"", !8, i64 0}
!21 = !{!22, !16, i64 0}
!22 = !{!"", !16, i64 0, !16, i64 2, !7, i64 4, !7, i64 8, !8, i64 12, !8, i64 12, !8, i64 13, !16, i64 14, !16, i64 16, !16, i64 18}
!23 = !{!18, !16, i64 44}
!24 = !{!22, !16, i64 2}
!25 = !{!15, !7, i64 0}
!26 = !{!22, !7, i64 4}
!27 = !{!18, !7, i64 132}
!28 = !{!22, !7, i64 8}
!29 = !{!22, !16, i64 14}
!30 = !{!22, !16, i64 16}
!31 = !{!18, !7, i64 80}
!32 = !{!15, !7, i64 4}
!33 = !{!18, !7, i64 104}
!34 = !{!18, !7, i64 100}
!35 = !{!18, !12, i64 24}
!36 = !{!37, !12, i64 104}
!37 = !{!"_SOCKET", !7, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !12, i64 32, !11, i64 40, !8, i64 56, !7, i64 60, !8, i64 64, !16, i64 66, !38, i64 72, !39, i64 96, !39, i64 112, !10, i64 128, !8, i64 136, !7, i64 140, !7, i64 144, !12, i64 152, !11, i64 160, !11, i64 176, !11, i64 192, !11, i64 208, !11, i64 224, !12, i64 240, !12, i64 248, !12, i64 256, !8, i64 264, !8, i64 288, !12, i64 368, !12, i64 376, !12, i64 384}
!38 = !{!"", !10, i64 0, !10, i64 8, !7, i64 16}
!39 = !{!"_SOCK_BUFFER", !7, i64 0, !7, i64 4, !12, i64 8}
!40 = !{!41, !7, i64 48}
!41 = !{!"", !7, i64 0, !10, i64 8, !11, i64 16, !11, i64 32, !7, i64 48, !7, i64 52}
!42 = !{!18, !7, i64 108}
!43 = !{!15, !16, i64 14}
!44 = !{!22, !8, i64 13}
!45 = !{!22, !16, i64 18}
!46 = !{!18, !16, i64 90}
!47 = !{!18, !7, i64 140}
!48 = !{!18, !7, i64 136}
!49 = !{!18, !8, i64 89}
!50 = !{!18, !7, i64 32}
!51 = !{!18, !7, i64 40}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass