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

; 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.EFI_IP4_CONFIG_DATA = type { i8, i8, i8, i8, i8, i8, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, i8, i8, i8, i8, i32, i32 }
%struct.EFI_IPv4_ADDRESS = type { [4 x i8] }
%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 }
%struct._LIST_ENTRY = type { ptr, 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._TCP4_PROTO_DATA = type { ptr, ptr }
%struct.EFI_TCP4_CONFIG_DATA = type { i8, i8, %struct.EFI_TCP4_ACCESS_POINT, ptr }
%struct.EFI_TCP4_ACCESS_POINT = type { i8, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, i16, %struct.EFI_IPv4_ADDRESS, i16, i8 }
%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_TCP4_OPTION = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8, i8, i8, i8, i8 }

@.str = external hidden unnamed_addr constant [157 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [86 x i8], align 1
@mIp4IoDefaultIpConfigData = external global %struct.EFI_IP4_CONFIG_DATA, align 4
@.str.7 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [76 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 zeroext i8 @DebugAssertEnabled() #1

declare void @DebugAssert(ptr noundef, i64 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 ptr @CopyMem(ptr noundef, ptr noundef, i64 noundef) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @Tcp4Bind(ptr noundef) #3

declare zeroext i8 @DebugPrintEnabled() #1

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) #1

declare void @DebugPrint(i64 noundef, ptr noundef, ...) #1

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

; Function Attrs: nounwind uwtable
define dso_local i64 @Tcp4ConfigurePcb(ptr noundef %0, ptr noundef %1) #3 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %struct.EFI_IP4_CONFIG_DATA, align 4
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  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 28, ptr %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  br label %10

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

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

16:                                               ; preds = %13
  %17 = load ptr, ptr %3, align 8, !tbaa !5
  %18 = icmp ne ptr %17, null
  br i1 %18, label %19, label %24

19:                                               ; preds = %16
  %20 = load ptr, ptr %3, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct._SOCKET, ptr %20, i32 0, i32 1
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  %23 = icmp ne ptr %22, null
  br i1 %23, label %25, label %24

24:                                               ; preds = %19, %16, %13
  call void @DebugAssert(ptr noundef @.str, i64 noundef 377, ptr noundef @.str.6)
  br label %25

25:                                               ; preds = %24, %19
  br label %26

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

27:                                               ; preds = %26
  br label %28

28:                                               ; preds = %27
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct._SOCKET, ptr %29, i32 0, i32 26
  %31 = getelementptr inbounds [20 x i8], ptr %30, i64 0, i64 0
  store ptr %31, ptr %8, align 8, !tbaa !5
  %32 = load ptr, ptr %8, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct._TCP4_PROTO_DATA, ptr %32, i32 0, i32 1
  %34 = load ptr, ptr %33, align 8, !tbaa !17
  store ptr %34, ptr %9, align 8, !tbaa !5
  br label %35

35:                                               ; preds = %28
  %36 = call zeroext i8 @DebugAssertEnabled()
  %37 = icmp ne i8 %36, 0
  br i1 %37, label %38, label %43

38:                                               ; preds = %35
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = icmp ne ptr %39, null
  br i1 %40, label %42, label %41

41:                                               ; preds = %38
  call void @DebugAssert(ptr noundef @.str, i64 noundef 382, ptr noundef @.str.5)
  br label %42

42:                                               ; preds = %41, %38
  br label %43

43:                                               ; preds = %42, %35
  br label %44

44:                                               ; preds = %43
  br label %45

45:                                               ; preds = %44
  %46 = call ptr @CopyMem(ptr noundef %5, ptr noundef @mIp4IoDefaultIpConfigData, i64 noundef 28)
  %47 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %5, i32 0, i32 0
  store i8 6, ptr %47, align 4, !tbaa !19
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.EFI_TCP4_CONFIG_DATA, ptr %48, i32 0, i32 2
  %50 = getelementptr inbounds %struct.EFI_TCP4_ACCESS_POINT, ptr %49, i32 0, i32 0
  %51 = load i8, ptr %50, align 2, !tbaa !22
  %52 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %5, i32 0, i32 5
  store i8 %51, ptr %52, align 1, !tbaa !25
  %53 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %5, i32 0, i32 6
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.EFI_TCP4_CONFIG_DATA, ptr %54, i32 0, i32 2
  %56 = getelementptr inbounds %struct.EFI_TCP4_ACCESS_POINT, ptr %55, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %53, ptr align 1 %56, i64 4, i1 false), !tbaa.struct !26
  %57 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %5, i32 0, i32 7
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.EFI_TCP4_CONFIG_DATA, ptr %58, i32 0, i32 2
  %60 = getelementptr inbounds %struct.EFI_TCP4_ACCESS_POINT, ptr %59, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 2 %57, ptr align 1 %60, i64 4, i1 false), !tbaa.struct !26
  %61 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %5, i32 0, i32 12
  store i32 -1, ptr %61, align 4, !tbaa !28
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct._TCP_CB, ptr %62, i32 0, i32 62
  %64 = load ptr, ptr %63, align 8, !tbaa !29
  %65 = call i64 @IpIoConfigIp(ptr noundef %64, ptr noundef %5)
  store i64 %65, ptr %6, align 8, !tbaa !32
  %66 = load i64, ptr %6, align 8, !tbaa !32
  %67 = icmp slt i64 %66, 0
  br i1 %67, label %68, label %69

68:                                               ; preds = %45
  br label %515

69:                                               ; preds = %45
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.EFI_TCP4_CONFIG_DATA, ptr %70, i32 0, i32 2
  %72 = getelementptr inbounds %struct.EFI_TCP4_ACCESS_POINT, ptr %71, i32 0, i32 0
  %73 = load i8, ptr %72, align 2, !tbaa !22
  %74 = icmp ne i8 %73, 0
  br i1 %74, label %75, label %84

75:                                               ; preds = %69
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.EFI_TCP4_CONFIG_DATA, ptr %76, i32 0, i32 2
  %78 = getelementptr inbounds %struct.EFI_TCP4_ACCESS_POINT, ptr %77, i32 0, i32 1
  %79 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %5, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %78, ptr align 2 %79, i64 4, i1 false), !tbaa.struct !26
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.EFI_TCP4_CONFIG_DATA, ptr %80, i32 0, i32 2
  %82 = getelementptr inbounds %struct.EFI_TCP4_ACCESS_POINT, ptr %81, i32 0, i32 2
  %83 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %5, i32 0, i32 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %82, ptr align 2 %83, i64 4, i1 false), !tbaa.struct !26
  br label %84

84:                                               ; preds = %75, %69
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.EFI_TCP4_CONFIG_DATA, ptr %85, i32 0, i32 2
  %87 = call i64 @Tcp4Bind(ptr noundef %86)
  store i64 %87, ptr %6, align 8, !tbaa !32
  %88 = load i64, ptr %6, align 8, !tbaa !32
  %89 = icmp slt i64 %88, 0
  br i1 %89, label %90, label %106

90:                                               ; preds = %84
  br label %91

91:                                               ; preds = %90
  %92 = call zeroext i8 @DebugPrintEnabled()
  %93 = icmp ne i8 %92, 0
  br i1 %93, label %94, label %103

94:                                               ; preds = %91
  br label %95

95:                                               ; preds = %94
  %96 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %97 = icmp ne i8 %96, 0
  br i1 %97, label %98, label %100

98:                                               ; preds = %95
  %99 = load i64, ptr %6, align 8, !tbaa !32
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.7, i64 noundef %99)
  br label %100

100:                                              ; preds = %98, %95
  br label %101

101:                                              ; preds = %100
  br label %102

102:                                              ; preds = %101
  br label %103

103:                                              ; preds = %102, %91
  br label %104

104:                                              ; preds = %103
  br label %105

105:                                              ; preds = %104
  br label %515

106:                                              ; preds = %84
  br label %107

107:                                              ; preds = %106
  %108 = call zeroext i8 @DebugAssertEnabled()
  %109 = icmp ne i8 %108, 0
  br i1 %109, label %110, label %130

110:                                              ; preds = %107
  %111 = load ptr, ptr %9, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct._TCP_CB, ptr %111, i32 0, i32 9
  %113 = load i8, ptr %112, align 8, !tbaa !33
  %114 = zext i8 %113 to i32
  %115 = icmp eq i32 %114, 0
  br i1 %115, label %116, label %128

116:                                              ; preds = %110
  %117 = load ptr, ptr %9, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct._TCP_CB, ptr %117, i32 0, i32 5
  %119 = call zeroext i8 @IsListEmpty(ptr noundef %118)
  %120 = zext i8 %119 to i32
  %121 = icmp ne i32 %120, 0
  br i1 %121, label %122, label %128

122:                                              ; preds = %116
  %123 = load ptr, ptr %9, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct._TCP_CB, ptr %123, i32 0, i32 6
  %125 = call zeroext i8 @IsListEmpty(ptr noundef %124)
  %126 = zext i8 %125 to i32
  %127 = icmp ne i32 %126, 0
  br i1 %127, label %129, label %128

128:                                              ; preds = %122, %116, %110
  call void @DebugAssert(ptr noundef @.str, i64 noundef 427, ptr noundef @.str.8)
  br label %129

129:                                              ; preds = %128, %122
  br label %130

130:                                              ; preds = %129, %107
  br label %131

131:                                              ; preds = %130
  br label %132

132:                                              ; preds = %131
  %133 = load ptr, ptr %9, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct._TCP_CB, ptr %133, i32 0, i32 7
  %135 = load i32, ptr %134, align 8, !tbaa !34
  %136 = or i32 %135, 2
  store i32 %136, ptr %134, align 8, !tbaa !34
  %137 = load ptr, ptr %9, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct._TCP_CB, ptr %137, i32 0, i32 9
  store i8 0, ptr %138, align 8, !tbaa !33
  %139 = load ptr, ptr %9, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct._TCP_CB, ptr %139, i32 0, i32 21
  store i16 536, ptr %140, align 8, !tbaa !35
  %141 = load ptr, ptr %3, align 8, !tbaa !5
  %142 = call zeroext i16 @TcpGetRcvMss(ptr noundef %141)
  %143 = load ptr, ptr %9, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct._TCP_CB, ptr %143, i32 0, i32 27
  store i16 %142, ptr %144, align 8, !tbaa !36
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct._TCP_CB, ptr %145, i32 0, i32 40
  store i32 0, ptr %146, align 4, !tbaa !37
  %147 = load ptr, ptr %9, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct._TCP_CB, ptr %147, i32 0, i32 42
  store i32 15, ptr %148, align 4, !tbaa !38
  %149 = load ptr, ptr %9, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct._TCP_CB, ptr %149, i32 0, i32 21
  %151 = load i16, ptr %150, align 8, !tbaa !35
  %152 = zext i16 %151 to i32
  %153 = load ptr, ptr %9, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct._TCP_CB, ptr %153, i32 0, i32 43
  store i32 %152, ptr %154, align 8, !tbaa !39
  %155 = load ptr, ptr %9, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct._TCP_CB, ptr %155, i32 0, i32 44
  store i32 -1, ptr %156, align 4, !tbaa !40
  %157 = load ptr, ptr %9, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct._TCP_CB, ptr %157, i32 0, i32 47
  store i8 3, ptr %158, align 2, !tbaa !41
  %159 = load ptr, ptr %9, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct._TCP_CB, ptr %159, i32 0, i32 50
  store i32 36000, ptr %160, align 4, !tbaa !42
  %161 = load ptr, ptr %9, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct._TCP_CB, ptr %161, i32 0, i32 51
  store i32 300, ptr %162, align 8, !tbaa !43
  %163 = load ptr, ptr %9, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct._TCP_CB, ptr %163, i32 0, i32 52
  store i8 8, ptr %164, align 4, !tbaa !44
  %165 = load ptr, ptr %9, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct._TCP_CB, ptr %165, i32 0, i32 54
  store i16 12, ptr %166, align 2, !tbaa !45
  %167 = load ptr, ptr %9, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct._TCP_CB, ptr %167, i32 0, i32 55
  store i32 10, ptr %168, align 8, !tbaa !46
  %169 = load ptr, ptr %9, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct._TCP_CB, ptr %169, i32 0, i32 56
  store i32 10, ptr %170, align 4, !tbaa !47
  %171 = load ptr, ptr %9, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct._TCP_CB, ptr %171, i32 0, i32 57
  store i32 375, ptr %172, align 8, !tbaa !48
  %173 = load ptr, ptr %4, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.EFI_TCP4_CONFIG_DATA, ptr %173, i32 0, i32 1
  %175 = load i8, ptr %174, align 1, !tbaa !49
  %176 = load ptr, ptr %9, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct._TCP_CB, ptr %176, i32 0, i32 60
  store i8 %175, ptr %177, align 2, !tbaa !50
  %178 = load ptr, ptr %4, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.EFI_TCP4_CONFIG_DATA, ptr %178, i32 0, i32 0
  %180 = load i8, ptr %179, align 8, !tbaa !51
  %181 = load ptr, ptr %9, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct._TCP_CB, ptr %181, i32 0, i32 59
  store i8 %180, ptr %182, align 1, !tbaa !52
  %183 = load ptr, ptr %4, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.EFI_TCP4_CONFIG_DATA, ptr %183, i32 0, i32 2
  %185 = getelementptr inbounds %struct.EFI_TCP4_ACCESS_POINT, ptr %184, i32 0, i32 0
  %186 = load i8, ptr %185, align 2, !tbaa !22
  %187 = load ptr, ptr %9, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct._TCP_CB, ptr %187, i32 0, i32 58
  store i8 %186, ptr %188, align 4, !tbaa !53
  %189 = load ptr, ptr %9, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct._TCP_CB, ptr %189, i32 0, i32 3
  %191 = getelementptr inbounds %struct._TCP_PEER, ptr %190, i32 0, i32 0
  %192 = load ptr, ptr %4, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.EFI_TCP4_CONFIG_DATA, ptr %192, i32 0, i32 2
  %194 = getelementptr inbounds %struct.EFI_TCP4_ACCESS_POINT, ptr %193, i32 0, i32 1
  %195 = call ptr @CopyMem(ptr noundef %191, ptr noundef %194, i64 noundef 4)
  %196 = load ptr, ptr %4, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.EFI_TCP4_CONFIG_DATA, ptr %196, i32 0, i32 2
  %198 = getelementptr inbounds %struct.EFI_TCP4_ACCESS_POINT, ptr %197, i32 0, i32 3
  %199 = load i16, ptr %198, align 2, !tbaa !54
  %200 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %199)
  %201 = load ptr, ptr %9, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct._TCP_CB, ptr %201, i32 0, i32 3
  %203 = getelementptr inbounds %struct._TCP_PEER, ptr %202, i32 0, i32 1
  store i16 %200, ptr %203, align 4, !tbaa !55
  %204 = load ptr, ptr %9, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct._TCP_CB, ptr %204, i32 0, i32 61
  %206 = load ptr, ptr %4, align 8, !tbaa !5
  %207 = getelementptr inbounds %struct.EFI_TCP4_CONFIG_DATA, ptr %206, i32 0, i32 2
  %208 = getelementptr inbounds %struct.EFI_TCP4_ACCESS_POINT, ptr %207, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %205, ptr align 1 %208, i64 4, i1 false), !tbaa.struct !26
  %209 = load ptr, ptr %4, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.EFI_TCP4_CONFIG_DATA, ptr %209, i32 0, i32 2
  %211 = getelementptr inbounds %struct.EFI_TCP4_ACCESS_POINT, ptr %210, i32 0, i32 6
  %212 = load i8, ptr %211, align 2, !tbaa !56
  %213 = icmp ne i8 %212, 0
  br i1 %213, label %214, label %230

214:                                              ; preds = %132
  %215 = load ptr, ptr %9, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct._TCP_CB, ptr %215, i32 0, i32 4
  %217 = getelementptr inbounds %struct._TCP_PEER, ptr %216, i32 0, i32 0
  %218 = load ptr, ptr %4, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.EFI_TCP4_CONFIG_DATA, ptr %218, i32 0, i32 2
  %220 = getelementptr inbounds %struct.EFI_TCP4_ACCESS_POINT, ptr %219, i32 0, i32 4
  %221 = call ptr @CopyMem(ptr noundef %217, ptr noundef %220, i64 noundef 4)
  %222 = load ptr, ptr %4, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.EFI_TCP4_CONFIG_DATA, ptr %222, i32 0, i32 2
  %224 = getelementptr inbounds %struct.EFI_TCP4_ACCESS_POINT, ptr %223, i32 0, i32 5
  %225 = load i16, ptr %224, align 2, !tbaa !57
  %226 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %225)
  %227 = load ptr, ptr %9, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct._TCP_CB, ptr %227, i32 0, i32 4
  %229 = getelementptr inbounds %struct._TCP_PEER, ptr %228, i32 0, i32 1
  store i16 %226, ptr %229, align 4, !tbaa !58
  br label %237

230:                                              ; preds = %132
  %231 = load ptr, ptr %9, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct._TCP_CB, ptr %231, i32 0, i32 4
  %233 = getelementptr inbounds %struct._TCP_PEER, ptr %232, i32 0, i32 0
  store i32 0, ptr %233, align 8, !tbaa !59
  %234 = load ptr, ptr %9, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct._TCP_CB, ptr %234, i32 0, i32 4
  %236 = getelementptr inbounds %struct._TCP_PEER, ptr %235, i32 0, i32 1
  store i16 0, ptr %236, align 4, !tbaa !58
  br label %237

237:                                              ; preds = %230, %214
  %238 = load ptr, ptr %4, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.EFI_TCP4_CONFIG_DATA, ptr %238, i32 0, i32 3
  %240 = load ptr, ptr %239, align 8, !tbaa !60
  store ptr %240, ptr %7, align 8, !tbaa !5
  %241 = load ptr, ptr %7, align 8, !tbaa !5
  %242 = icmp ne ptr %241, null
  br i1 %242, label %243, label %492

243:                                              ; preds = %237
  %244 = load ptr, ptr %7, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %244, i32 0, i32 0
  %246 = load i32, ptr %245, align 4, !tbaa !61
  %247 = icmp ule i32 %246, 2097152
  br i1 %247, label %248, label %257

248:                                              ; preds = %243
  %249 = load ptr, ptr %7, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %249, i32 0, i32 0
  %251 = load i32, ptr %250, align 4, !tbaa !61
  %252 = icmp uge i32 %251, 8192
  br i1 %252, label %253, label %257

253:                                              ; preds = %248
  %254 = load ptr, ptr %7, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %254, i32 0, i32 0
  %256 = load i32, ptr %255, align 4, !tbaa !61
  br label %258

257:                                              ; preds = %248, %243
  br label %258

258:                                              ; preds = %257, %253
  %259 = phi i32 [ %256, %253 ], [ 2097152, %257 ]
  %260 = load ptr, ptr %3, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct._SOCKET, ptr %260, i32 0, i32 12
  %262 = getelementptr inbounds %struct._SOCK_BUFFER, ptr %261, i32 0, i32 0
  store i32 %259, ptr %262, align 8, !tbaa !63
  %263 = load ptr, ptr %7, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %263, i32 0, i32 1
  %265 = load i32, ptr %264, align 4, !tbaa !64
  %266 = icmp ule i32 %265, 2097152
  br i1 %266, label %267, label %276

267:                                              ; preds = %258
  %268 = load ptr, ptr %7, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %268, i32 0, i32 1
  %270 = load i32, ptr %269, align 4, !tbaa !64
  %271 = icmp uge i32 %270, 8192
  br i1 %271, label %272, label %276

272:                                              ; preds = %267
  %273 = load ptr, ptr %7, align 8, !tbaa !5
  %274 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %273, i32 0, i32 1
  %275 = load i32, ptr %274, align 4, !tbaa !64
  br label %277

276:                                              ; preds = %267, %258
  br label %277

277:                                              ; preds = %276, %272
  %278 = phi i32 [ %275, %272 ], [ 2097152, %276 ]
  %279 = load ptr, ptr %3, align 8, !tbaa !5
  %280 = getelementptr inbounds %struct._SOCKET, ptr %279, i32 0, i32 11
  %281 = getelementptr inbounds %struct._SOCK_BUFFER, ptr %280, i32 0, i32 0
  store i32 %278, ptr %281, align 8, !tbaa !65
  %282 = load ptr, ptr %7, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %282, i32 0, i32 2
  %284 = load i32, ptr %283, align 4, !tbaa !66
  %285 = icmp ule i32 %284, 10
  br i1 %285, label %286, label %295

286:                                              ; preds = %277
  %287 = load ptr, ptr %7, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %287, i32 0, i32 2
  %289 = load i32, ptr %288, align 4, !tbaa !66
  %290 = icmp uge i32 %289, 5
  br i1 %290, label %291, label %295

291:                                              ; preds = %286
  %292 = load ptr, ptr %7, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %292, i32 0, i32 2
  %294 = load i32, ptr %293, align 4, !tbaa !66
  br label %296

295:                                              ; preds = %286, %277
  br label %296

296:                                              ; preds = %295, %291
  %297 = phi i32 [ %294, %291 ], [ 10, %295 ]
  %298 = load ptr, ptr %3, align 8, !tbaa !5
  %299 = getelementptr inbounds %struct._SOCKET, ptr %298, i32 0, i32 15
  store i32 %297, ptr %299, align 4, !tbaa !67
  %300 = load ptr, ptr %7, align 8, !tbaa !5
  %301 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %300, i32 0, i32 4
  %302 = load i32, ptr %301, align 4, !tbaa !68
  %303 = icmp ule i32 %302, 12
  br i1 %303, label %304, label %313

304:                                              ; preds = %296
  %305 = load ptr, ptr %7, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %305, i32 0, i32 4
  %307 = load i32, ptr %306, align 4, !tbaa !68
  %308 = icmp uge i32 %307, 6
  br i1 %308, label %309, label %313

309:                                              ; preds = %304
  %310 = load ptr, ptr %7, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %310, i32 0, i32 4
  %312 = load i32, ptr %311, align 4, !tbaa !68
  br label %314

313:                                              ; preds = %304, %296
  br label %314

314:                                              ; preds = %313, %309
  %315 = phi i32 [ %312, %309 ], [ 12, %313 ]
  %316 = trunc i32 %315 to i16
  %317 = load ptr, ptr %9, align 8, !tbaa !5
  %318 = getelementptr inbounds %struct._TCP_CB, ptr %317, i32 0, i32 54
  store i16 %316, ptr %318, align 2, !tbaa !45
  %319 = load ptr, ptr %7, align 8, !tbaa !5
  %320 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %319, i32 0, i32 5
  %321 = load i32, ptr %320, align 4, !tbaa !69
  %322 = mul i32 %321, 5
  %323 = icmp ule i32 %322, 20
  br i1 %323, label %324, label %335

324:                                              ; preds = %314
  %325 = load ptr, ptr %7, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %325, i32 0, i32 5
  %327 = load i32, ptr %326, align 4, !tbaa !69
  %328 = mul i32 %327, 5
  %329 = icmp uge i32 %328, 10
  br i1 %329, label %330, label %335

330:                                              ; preds = %324
  %331 = load ptr, ptr %7, align 8, !tbaa !5
  %332 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %331, i32 0, i32 5
  %333 = load i32, ptr %332, align 4, !tbaa !69
  %334 = mul i32 %333, 5
  br label %336

335:                                              ; preds = %324, %314
  br label %336

336:                                              ; preds = %335, %330
  %337 = phi i32 [ %334, %330 ], [ 10, %335 ]
  %338 = load ptr, ptr %9, align 8, !tbaa !5
  %339 = getelementptr inbounds %struct._TCP_CB, ptr %338, i32 0, i32 55
  store i32 %337, ptr %339, align 8, !tbaa !46
  %340 = load ptr, ptr %7, align 8, !tbaa !5
  %341 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %340, i32 0, i32 6
  %342 = load i32, ptr %341, align 4, !tbaa !70
  %343 = icmp ne i32 %342, 0
  br i1 %343, label %344, label %366

344:                                              ; preds = %336
  %345 = load ptr, ptr %7, align 8, !tbaa !5
  %346 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %345, i32 0, i32 6
  %347 = load i32, ptr %346, align 4, !tbaa !70
  %348 = mul i32 %347, 5
  %349 = icmp ule i32 %348, 300
  br i1 %349, label %350, label %361

350:                                              ; preds = %344
  %351 = load ptr, ptr %7, align 8, !tbaa !5
  %352 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %351, i32 0, i32 6
  %353 = load i32, ptr %352, align 4, !tbaa !70
  %354 = mul i32 %353, 5
  %355 = icmp uge i32 %354, 10
  br i1 %355, label %356, label %361

356:                                              ; preds = %350
  %357 = load ptr, ptr %7, align 8, !tbaa !5
  %358 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %357, i32 0, i32 6
  %359 = load i32, ptr %358, align 4, !tbaa !70
  %360 = mul i32 %359, 5
  br label %362

361:                                              ; preds = %350, %344
  br label %362

362:                                              ; preds = %361, %356
  %363 = phi i32 [ %360, %356 ], [ 10, %361 ]
  %364 = load ptr, ptr %9, align 8, !tbaa !5
  %365 = getelementptr inbounds %struct._TCP_CB, ptr %364, i32 0, i32 56
  store i32 %363, ptr %365, align 4, !tbaa !47
  br label %369

366:                                              ; preds = %336
  %367 = load ptr, ptr %9, align 8, !tbaa !5
  %368 = getelementptr inbounds %struct._TCP_CB, ptr %367, i32 0, i32 56
  store i32 0, ptr %368, align 4, !tbaa !47
  br label %369

369:                                              ; preds = %366, %362
  %370 = load ptr, ptr %7, align 8, !tbaa !5
  %371 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %370, i32 0, i32 7
  %372 = load i32, ptr %371, align 4, !tbaa !71
  %373 = icmp ne i32 %372, 0
  br i1 %373, label %374, label %440

374:                                              ; preds = %369
  %375 = load ptr, ptr %9, align 8, !tbaa !5
  %376 = getelementptr inbounds %struct._TCP_CB, ptr %375, i32 0, i32 7
  %377 = load i32, ptr %376, align 8, !tbaa !34
  %378 = and i32 %377, -3
  store i32 %378, ptr %376, align 8, !tbaa !34
  %379 = load ptr, ptr %7, align 8, !tbaa !5
  %380 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %379, i32 0, i32 7
  %381 = load i32, ptr %380, align 4, !tbaa !71
  %382 = icmp ule i32 %381, 8
  br i1 %382, label %383, label %392

383:                                              ; preds = %374
  %384 = load ptr, ptr %7, align 8, !tbaa !5
  %385 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %384, i32 0, i32 7
  %386 = load i32, ptr %385, align 4, !tbaa !71
  %387 = icmp uge i32 %386, 4
  br i1 %387, label %388, label %392

388:                                              ; preds = %383
  %389 = load ptr, ptr %7, align 8, !tbaa !5
  %390 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %389, i32 0, i32 7
  %391 = load i32, ptr %390, align 4, !tbaa !71
  br label %393

392:                                              ; preds = %383, %374
  br label %393

393:                                              ; preds = %392, %388
  %394 = phi i32 [ %391, %388 ], [ 8, %392 ]
  %395 = trunc i32 %394 to i8
  %396 = load ptr, ptr %9, align 8, !tbaa !5
  %397 = getelementptr inbounds %struct._TCP_CB, ptr %396, i32 0, i32 52
  store i8 %395, ptr %397, align 4, !tbaa !44
  %398 = load ptr, ptr %7, align 8, !tbaa !5
  %399 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %398, i32 0, i32 8
  %400 = load i32, ptr %399, align 4, !tbaa !72
  %401 = mul i32 %400, 5
  %402 = icmp ule i32 %401, 72000
  br i1 %402, label %403, label %414

403:                                              ; preds = %393
  %404 = load ptr, ptr %7, align 8, !tbaa !5
  %405 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %404, i32 0, i32 8
  %406 = load i32, ptr %405, align 4, !tbaa !72
  %407 = mul i32 %406, 5
  %408 = icmp uge i32 %407, 36000
  br i1 %408, label %409, label %414

409:                                              ; preds = %403
  %410 = load ptr, ptr %7, align 8, !tbaa !5
  %411 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %410, i32 0, i32 8
  %412 = load i32, ptr %411, align 4, !tbaa !72
  %413 = mul i32 %412, 5
  br label %415

414:                                              ; preds = %403, %393
  br label %415

415:                                              ; preds = %414, %409
  %416 = phi i32 [ %413, %409 ], [ 36000, %414 ]
  %417 = load ptr, ptr %9, align 8, !tbaa !5
  %418 = getelementptr inbounds %struct._TCP_CB, ptr %417, i32 0, i32 50
  store i32 %416, ptr %418, align 4, !tbaa !42
  %419 = load ptr, ptr %7, align 8, !tbaa !5
  %420 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %419, i32 0, i32 9
  %421 = load i32, ptr %420, align 4, !tbaa !73
  %422 = mul i32 %421, 5
  %423 = icmp ule i32 %422, 300
  br i1 %423, label %424, label %435

424:                                              ; preds = %415
  %425 = load ptr, ptr %7, align 8, !tbaa !5
  %426 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %425, i32 0, i32 9
  %427 = load i32, ptr %426, align 4, !tbaa !73
  %428 = mul i32 %427, 5
  %429 = icmp uge i32 %428, 150
  br i1 %429, label %430, label %435

430:                                              ; preds = %424
  %431 = load ptr, ptr %7, align 8, !tbaa !5
  %432 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %431, i32 0, i32 9
  %433 = load i32, ptr %432, align 4, !tbaa !73
  %434 = mul i32 %433, 5
  br label %436

435:                                              ; preds = %424, %415
  br label %436

436:                                              ; preds = %435, %430
  %437 = phi i32 [ %434, %430 ], [ 300, %435 ]
  %438 = load ptr, ptr %9, align 8, !tbaa !5
  %439 = getelementptr inbounds %struct._TCP_CB, ptr %438, i32 0, i32 51
  store i32 %437, ptr %439, align 8, !tbaa !43
  br label %440

440:                                              ; preds = %436, %369
  %441 = load ptr, ptr %7, align 8, !tbaa !5
  %442 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %441, i32 0, i32 3
  %443 = load i32, ptr %442, align 4, !tbaa !74
  %444 = mul i32 %443, 5
  %445 = icmp ule i32 %444, 375
  br i1 %445, label %446, label %457

446:                                              ; preds = %440
  %447 = load ptr, ptr %7, align 8, !tbaa !5
  %448 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %447, i32 0, i32 3
  %449 = load i32, ptr %448, align 4, !tbaa !74
  %450 = mul i32 %449, 5
  %451 = icmp uge i32 %450, 300
  br i1 %451, label %452, label %457

452:                                              ; preds = %446
  %453 = load ptr, ptr %7, align 8, !tbaa !5
  %454 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %453, i32 0, i32 3
  %455 = load i32, ptr %454, align 4, !tbaa !74
  %456 = mul i32 %455, 5
  br label %458

457:                                              ; preds = %446, %440
  br label %458

458:                                              ; preds = %457, %452
  %459 = phi i32 [ %456, %452 ], [ 375, %457 ]
  %460 = load ptr, ptr %9, align 8, !tbaa !5
  %461 = getelementptr inbounds %struct._TCP_CB, ptr %460, i32 0, i32 57
  store i32 %459, ptr %461, align 8, !tbaa !48
  %462 = load ptr, ptr %7, align 8, !tbaa !5
  %463 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %462, i32 0, i32 10
  %464 = load i8, ptr %463, align 4, !tbaa !75
  %465 = icmp ne i8 %464, 0
  br i1 %465, label %471, label %466

466:                                              ; preds = %458
  %467 = load ptr, ptr %9, align 8, !tbaa !5
  %468 = getelementptr inbounds %struct._TCP_CB, ptr %467, i32 0, i32 7
  %469 = load i32, ptr %468, align 8, !tbaa !34
  %470 = or i32 %469, 1
  store i32 %470, ptr %468, align 8, !tbaa !34
  br label %471

471:                                              ; preds = %466, %458
  %472 = load ptr, ptr %7, align 8, !tbaa !5
  %473 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %472, i32 0, i32 11
  %474 = load i8, ptr %473, align 1, !tbaa !76
  %475 = icmp ne i8 %474, 0
  br i1 %475, label %481, label %476

476:                                              ; preds = %471
  %477 = load ptr, ptr %9, align 8, !tbaa !5
  %478 = getelementptr inbounds %struct._TCP_CB, ptr %477, i32 0, i32 7
  %479 = load i32, ptr %478, align 8, !tbaa !34
  %480 = or i32 %479, 16
  store i32 %480, ptr %478, align 8, !tbaa !34
  br label %481

481:                                              ; preds = %476, %471
  %482 = load ptr, ptr %7, align 8, !tbaa !5
  %483 = getelementptr inbounds %struct.EFI_TCP4_OPTION, ptr %482, i32 0, i32 12
  %484 = load i8, ptr %483, align 2, !tbaa !77
  %485 = icmp ne i8 %484, 0
  br i1 %485, label %491, label %486

486:                                              ; preds = %481
  %487 = load ptr, ptr %9, align 8, !tbaa !5
  %488 = getelementptr inbounds %struct._TCP_CB, ptr %487, i32 0, i32 7
  %489 = load i32, ptr %488, align 8, !tbaa !34
  %490 = or i32 %489, 4
  store i32 %490, ptr %488, align 8, !tbaa !34
  br label %491

491:                                              ; preds = %486, %481
  br label %492

492:                                              ; preds = %491, %237
  %493 = load ptr, ptr %3, align 8, !tbaa !5
  %494 = call i64 @TcpInstallDevicePath(ptr noundef %493)
  store i64 %494, ptr %6, align 8, !tbaa !32
  %495 = load i64, ptr %6, align 8, !tbaa !32
  %496 = icmp slt i64 %495, 0
  br i1 %496, label %497, label %498

497:                                              ; preds = %492
  br label %515

498:                                              ; preds = %492
  %499 = load ptr, ptr %4, align 8, !tbaa !5
  %500 = getelementptr inbounds %struct.EFI_TCP4_CONFIG_DATA, ptr %499, i32 0, i32 2
  %501 = getelementptr inbounds %struct.EFI_TCP4_ACCESS_POINT, ptr %500, i32 0, i32 6
  %502 = load i8, ptr %501, align 2, !tbaa !56
  %503 = icmp ne i8 %502, 0
  br i1 %503, label %509, label %504

504:                                              ; preds = %498
  %505 = load ptr, ptr %9, align 8, !tbaa !5
  call void @TcpSetState(ptr noundef %505, i8 noundef zeroext 1)
  %506 = load ptr, ptr %3, align 8, !tbaa !5
  call void @SockSetState(ptr noundef %506, i8 noundef zeroext 1)
  %507 = load ptr, ptr %3, align 8, !tbaa !5
  %508 = getelementptr inbounds %struct._SOCKET, ptr %507, i32 0, i32 6
  store i8 2, ptr %508, align 8, !tbaa !78
  br label %512

509:                                              ; preds = %498
  %510 = load ptr, ptr %3, align 8, !tbaa !5
  %511 = getelementptr inbounds %struct._SOCKET, ptr %510, i32 0, i32 6
  store i8 1, ptr %511, align 8, !tbaa !78
  br label %512

512:                                              ; preds = %509, %504
  %513 = load ptr, ptr %9, align 8, !tbaa !5
  %514 = call i64 @TcpInsertTcb(ptr noundef %513)
  br label %515

515:                                              ; preds = %512, %497, %105, %68
  %516 = load i64, ptr %6, align 8, !tbaa !32
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 28, ptr %5) #4
  ret i64 %516
}

declare zeroext i8 @IsListEmpty(ptr noundef) #1

declare zeroext i16 @TcpGetRcvMss(ptr noundef) #1

declare i64 @TcpInstallDevicePath(ptr noundef) #1

declare void @TcpSetState(ptr noundef, i8 noundef zeroext) #1

declare void @SockSetState(ptr noundef, i8 noundef zeroext) #1

declare i64 @TcpInsertTcb(ptr 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { 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 8}
!10 = !{!"_SOCKET", !11, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !12, i64 40, !7, i64 56, !11, i64 60, !7, i64 64, !13, i64 66, !14, i64 72, !16, i64 96, !16, i64 112, !15, i64 128, !7, i64 136, !11, i64 140, !11, i64 144, !6, i64 152, !12, i64 160, !12, i64 176, !12, i64 192, !12, i64 208, !12, 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}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!13 = !{!"short", !7, i64 0}
!14 = !{!"", !15, i64 0, !15, i64 8, !11, i64 16}
!15 = !{!"long long", !7, i64 0}
!16 = !{!"_SOCK_BUFFER", !11, i64 0, !11, i64 4, !6, i64 8}
!17 = !{!18, !6, i64 8}
!18 = !{!"_TCP4_PROTO_DATA", !6, i64 0, !6, i64 8}
!19 = !{!20, !7, i64 0}
!20 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !21, i64 6, !21, i64 10, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 17, !11, i64 20, !11, i64 24}
!21 = !{!"", !7, i64 0}
!22 = !{!23, !7, i64 2}
!23 = !{!"", !7, i64 0, !7, i64 1, !24, i64 2, !6, i64 24}
!24 = !{!"", !7, i64 0, !21, i64 1, !21, i64 5, !13, i64 10, !21, i64 12, !13, i64 16, !7, i64 18}
!25 = !{!20, !7, i64 5}
!26 = !{i64 0, i64 4, !27}
!27 = !{!7, !7, i64 0}
!28 = !{!20, !11, i64 20}
!29 = !{!30, !6, i64 280}
!30 = !{!"_TCP_CB", !12, i64 0, !6, i64 16, !6, i64 24, !31, i64 32, !31, i64 40, !12, i64 48, !12, i64 64, !11, i64 80, !11, i64 84, !7, i64 88, !7, i64 89, !13, 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, !13, i64 128, !11, i64 132, !11, i64 136, !11, i64 140, !11, i64 144, !11, i64 148, !13, i64 152, !13, 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, !13, i64 236, !7, i64 238, !7, i64 239, !11, i64 240, !11, i64 244, !11, i64 248, !7, i64 252, !7, i64 253, !13, i64 254, !11, i64 256, !11, i64 260, !11, i64 264, !7, i64 268, !7, i64 269, !7, i64 270, !21, i64 271, !6, i64 280}
!31 = !{!"_TCP_PEER", !11, i64 0, !13, i64 4}
!32 = !{!15, !15, i64 0}
!33 = !{!30, !7, i64 88}
!34 = !{!30, !11, i64 80}
!35 = !{!30, !13, i64 128}
!36 = !{!30, !13, i64 152}
!37 = !{!30, !11, i64 212}
!38 = !{!30, !11, i64 220}
!39 = !{!30, !11, i64 224}
!40 = !{!30, !11, i64 228}
!41 = !{!30, !7, i64 238}
!42 = !{!30, !11, i64 244}
!43 = !{!30, !11, i64 248}
!44 = !{!30, !7, i64 252}
!45 = !{!30, !13, i64 254}
!46 = !{!30, !11, i64 256}
!47 = !{!30, !11, i64 260}
!48 = !{!30, !11, i64 264}
!49 = !{!23, !7, i64 1}
!50 = !{!30, !7, i64 270}
!51 = !{!23, !7, i64 0}
!52 = !{!30, !7, i64 269}
!53 = !{!30, !7, i64 268}
!54 = !{!23, !13, i64 12}
!55 = !{!30, !13, i64 36}
!56 = !{!23, !7, i64 20}
!57 = !{!23, !13, i64 18}
!58 = !{!30, !13, i64 44}
!59 = !{!30, !11, i64 40}
!60 = !{!23, !6, i64 24}
!61 = !{!62, !11, i64 0}
!62 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !7, i64 40, !7, i64 41, !7, i64 42, !7, i64 43, !7, i64 44}
!63 = !{!10, !11, i64 112}
!64 = !{!62, !11, i64 4}
!65 = !{!10, !11, i64 96}
!66 = !{!62, !11, i64 8}
!67 = !{!10, !11, i64 140}
!68 = !{!62, !11, i64 16}
!69 = !{!62, !11, i64 20}
!70 = !{!62, !11, i64 24}
!71 = !{!62, !11, i64 28}
!72 = !{!62, !11, i64 32}
!73 = !{!62, !11, i64 36}
!74 = !{!62, !11, i64 12}
!75 = !{!62, !7, i64 40}
!76 = !{!62, !7, i64 41}
!77 = !{!62, !7, i64 42}
!78 = !{!10, !7, i64 56}


; 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.EFI_IP4_CONFIG_DATA = type { i8, i8, i8, i8, i8, i8, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, i8, i8, i8, i8, i32, i32 }
%struct.EFI_IPv4_ADDRESS = type { [4 x i8] }

@.str = external hidden unnamed_addr constant [157 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [86 x i8], align 1
@mIp4IoDefaultIpConfigData = external global %struct.EFI_IP4_CONFIG_DATA, align 4
@.str.7 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [76 x i8], align 1

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

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #1

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

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

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

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

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

declare zeroext i8 @DebugPrintEnabled() local_unnamed_addr #1

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) local_unnamed_addr #1

declare void @DebugPrint(i64 noundef, ptr noundef, ...) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local i64 @Tcp4ConfigurePcb(ptr noundef %0, ptr noundef %1) local_unnamed_addr #2 {
  %3 = alloca %struct.EFI_IP4_CONFIG_DATA, align 4
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %3) #3
  %4 = tail call zeroext i8 @DebugAssertEnabled() #3
  %.not = icmp eq i8 %4, 0
  br i1 %.not, label %12, label %5

5:                                                ; preds = %2
  %6 = icmp ne ptr %1, null
  %7 = icmp ne ptr %0, null
  %or.cond = and i1 %7, %6
  br i1 %or.cond, label %8, label %11

8:                                                ; preds = %5
  %9 = getelementptr inbounds i8, ptr %0, i64 8
  %10 = load ptr, ptr %9, align 8, !tbaa !5
  %.not136 = icmp eq ptr %10, null
  br i1 %.not136, label %11, label %12

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

12:                                               ; preds = %8, %11, %2
  %13 = getelementptr inbounds i8, ptr %0, i64 272
  %14 = load ptr, ptr %13, align 8, !tbaa !16
  %15 = tail call zeroext i8 @DebugAssertEnabled() #3
  %16 = icmp eq i8 %15, 0
  %17 = icmp ne ptr %14, null
  %or.cond3 = select i1 %16, i1 true, i1 %17
  br i1 %or.cond3, label %19, label %18

18:                                               ; preds = %12
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 382, ptr noundef nonnull @.str.5) #3
  br label %19

19:                                               ; preds = %18, %12
  %20 = call ptr @CopyMem(ptr noundef nonnull %3, ptr noundef nonnull @mIp4IoDefaultIpConfigData, i64 noundef 28) #3
  store i8 6, ptr %3, align 4, !tbaa !18
  %21 = getelementptr inbounds i8, ptr %1, i64 2
  %22 = load i8, ptr %21, align 2, !tbaa !21
  %23 = getelementptr inbounds i8, ptr %3, i64 5
  store i8 %22, ptr %23, align 1, !tbaa !24
  %24 = getelementptr inbounds i8, ptr %3, i64 6
  %25 = getelementptr inbounds i8, ptr %1, i64 3
  %26 = getelementptr inbounds i8, ptr %1, i64 7
  %27 = load <2 x i32>, ptr %25, align 1, !tbaa !25
  store <2 x i32> %27, ptr %24, align 2, !tbaa !25
  %28 = getelementptr inbounds i8, ptr %3, i64 20
  store i32 -1, ptr %28, align 4, !tbaa !26
  %29 = getelementptr inbounds i8, ptr %14, i64 280
  %30 = load ptr, ptr %29, align 8, !tbaa !27
  %31 = call i64 @IpIoConfigIp(ptr noundef %30, ptr noundef nonnull %3) #3
  %32 = icmp slt i64 %31, 0
  br i1 %32, label %189, label %33

33:                                               ; preds = %19
  %34 = load i8, ptr %21, align 2, !tbaa !21
  %.not137 = icmp eq i8 %34, 0
  br i1 %.not137, label %37, label %35

35:                                               ; preds = %33
  %36 = load <2 x i32>, ptr %24, align 2, !tbaa !25
  store <2 x i32> %36, ptr %25, align 1, !tbaa !25
  br label %37

37:                                               ; preds = %35, %33
  %38 = call i64 @Tcp4Bind(ptr noundef nonnull %21)
  %39 = icmp slt i64 %38, 0
  br i1 %39, label %40, label %45

40:                                               ; preds = %37
  %41 = call zeroext i8 @DebugPrintEnabled() #3
  %.not149 = icmp eq i8 %41, 0
  br i1 %.not149, label %189, label %42

42:                                               ; preds = %40
  %43 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not150 = icmp eq i8 %43, 0
  br i1 %.not150, label %189, label %44

44:                                               ; preds = %42
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.7, i64 noundef %38) #3
  br label %189

45:                                               ; preds = %37
  %46 = call zeroext i8 @DebugAssertEnabled() #3
  %.not138 = icmp eq i8 %46, 0
  br i1 %.not138, label %58, label %47

47:                                               ; preds = %45
  %48 = getelementptr inbounds i8, ptr %14, i64 88
  %49 = load i8, ptr %48, align 8, !tbaa !30
  %50 = icmp eq i8 %49, 0
  br i1 %50, label %51, label %57

51:                                               ; preds = %47
  %52 = getelementptr inbounds i8, ptr %14, i64 48
  %53 = call zeroext i8 @IsListEmpty(ptr noundef nonnull %52) #3
  %.not139 = icmp eq i8 %53, 0
  br i1 %.not139, label %57, label %54

54:                                               ; preds = %51
  %55 = getelementptr inbounds i8, ptr %14, i64 64
  %56 = call zeroext i8 @IsListEmpty(ptr noundef nonnull %55) #3
  %.not140 = icmp eq i8 %56, 0
  br i1 %.not140, label %57, label %58

57:                                               ; preds = %54, %51, %47
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 427, ptr noundef nonnull @.str.8) #3
  br label %58

58:                                               ; preds = %54, %57, %45
  %59 = getelementptr inbounds i8, ptr %14, i64 80
  %60 = load i32, ptr %59, align 8, !tbaa !31
  %61 = or i32 %60, 2
  store i32 %61, ptr %59, align 8, !tbaa !31
  %62 = getelementptr inbounds i8, ptr %14, i64 88
  store i8 0, ptr %62, align 8, !tbaa !30
  %63 = getelementptr inbounds i8, ptr %14, i64 128
  store i16 536, ptr %63, align 8, !tbaa !32
  %64 = call zeroext i16 @TcpGetRcvMss(ptr noundef nonnull %0) #3
  %65 = getelementptr inbounds i8, ptr %14, i64 152
  store i16 %64, ptr %65, align 8, !tbaa !33
  %66 = getelementptr inbounds i8, ptr %14, i64 212
  store i32 0, ptr %66, align 4, !tbaa !34
  %67 = getelementptr inbounds i8, ptr %14, i64 220
  store i32 15, ptr %67, align 4, !tbaa !35
  %68 = load i16, ptr %63, align 8, !tbaa !32
  %69 = zext i16 %68 to i32
  %70 = getelementptr inbounds i8, ptr %14, i64 224
  store i32 %69, ptr %70, align 8, !tbaa !36
  %71 = getelementptr inbounds i8, ptr %14, i64 228
  store i32 -1, ptr %71, align 4, !tbaa !37
  %72 = getelementptr inbounds i8, ptr %14, i64 238
  store i8 3, ptr %72, align 2, !tbaa !38
  %73 = getelementptr inbounds i8, ptr %14, i64 244
  store i32 36000, ptr %73, align 4, !tbaa !39
  %74 = getelementptr inbounds i8, ptr %14, i64 248
  store i32 300, ptr %74, align 8, !tbaa !40
  %75 = getelementptr inbounds i8, ptr %14, i64 252
  store i8 8, ptr %75, align 4, !tbaa !41
  %76 = getelementptr inbounds i8, ptr %14, i64 254
  store i16 12, ptr %76, align 2, !tbaa !42
  %77 = getelementptr inbounds i8, ptr %14, i64 256
  store i32 10, ptr %77, align 8, !tbaa !43
  %78 = getelementptr inbounds i8, ptr %14, i64 260
  store i32 10, ptr %78, align 4, !tbaa !44
  %79 = getelementptr inbounds i8, ptr %14, i64 264
  store i32 375, ptr %79, align 8, !tbaa !45
  %80 = getelementptr inbounds i8, ptr %1, i64 1
  %81 = load i8, ptr %80, align 1, !tbaa !46
  %82 = getelementptr inbounds i8, ptr %14, i64 270
  store i8 %81, ptr %82, align 2, !tbaa !47
  %83 = load i8, ptr %1, align 8, !tbaa !48
  %84 = getelementptr inbounds i8, ptr %14, i64 269
  store i8 %83, ptr %84, align 1, !tbaa !49
  %85 = load i8, ptr %21, align 2, !tbaa !21
  %86 = getelementptr inbounds i8, ptr %14, i64 268
  store i8 %85, ptr %86, align 4, !tbaa !50
  %87 = getelementptr inbounds i8, ptr %14, i64 32
  %88 = call ptr @CopyMem(ptr noundef nonnull %87, ptr noundef nonnull %25, i64 noundef 4) #3
  %89 = getelementptr inbounds i8, ptr %1, i64 12
  %90 = load i16, ptr %89, align 2, !tbaa !51
  %91 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %90) #3
  %92 = getelementptr inbounds i8, ptr %14, i64 36
  store i16 %91, ptr %92, align 4, !tbaa !52
  %93 = getelementptr inbounds i8, ptr %14, i64 271
  %94 = load i32, ptr %26, align 1, !tbaa !25
  store i32 %94, ptr %93, align 1, !tbaa !25
  %95 = getelementptr inbounds i8, ptr %1, i64 20
  %96 = load i8, ptr %95, align 2, !tbaa !53
  %.not141 = icmp eq i8 %96, 0
  %97 = getelementptr inbounds i8, ptr %14, i64 40
  br i1 %.not141, label %104, label %98

98:                                               ; preds = %58
  %99 = getelementptr inbounds i8, ptr %1, i64 14
  %100 = call ptr @CopyMem(ptr noundef nonnull %97, ptr noundef nonnull %99, i64 noundef 4) #3
  %101 = getelementptr inbounds i8, ptr %1, i64 18
  %102 = load i16, ptr %101, align 2, !tbaa !54
  %103 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %102) #3
  br label %105

104:                                              ; preds = %58
  store i32 0, ptr %97, align 8, !tbaa !55
  br label %105

105:                                              ; preds = %104, %98
  %.sink = phi i16 [ 0, %104 ], [ %103, %98 ]
  %106 = getelementptr inbounds i8, ptr %14, i64 44
  store i16 %.sink, ptr %106, align 4
  %107 = getelementptr inbounds i8, ptr %1, i64 24
  %108 = load ptr, ptr %107, align 8, !tbaa !56
  %.not142 = icmp eq ptr %108, null
  br i1 %.not142, label %180, label %109

109:                                              ; preds = %105
  %110 = load i32, ptr %108, align 4, !tbaa !57
  %111 = add i32 %110, -8192
  %or.cond151 = icmp ult i32 %111, 2088961
  %112 = select i1 %or.cond151, i32 %110, i32 2097152
  %113 = getelementptr inbounds i8, ptr %0, i64 112
  store i32 %112, ptr %113, align 8, !tbaa !59
  %114 = getelementptr inbounds i8, ptr %108, i64 4
  %115 = load i32, ptr %114, align 4, !tbaa !60
  %116 = add i32 %115, -8192
  %or.cond152 = icmp ult i32 %116, 2088961
  %117 = select i1 %or.cond152, i32 %115, i32 2097152
  %118 = getelementptr inbounds i8, ptr %0, i64 96
  store i32 %117, ptr %118, align 8, !tbaa !61
  %119 = getelementptr inbounds i8, ptr %108, i64 8
  %120 = load i32, ptr %119, align 4, !tbaa !62
  %121 = add i32 %120, -5
  %or.cond153 = icmp ult i32 %121, 6
  %122 = select i1 %or.cond153, i32 %120, i32 10
  %123 = getelementptr inbounds i8, ptr %0, i64 140
  store i32 %122, ptr %123, align 4, !tbaa !63
  %124 = getelementptr inbounds i8, ptr %108, i64 16
  %125 = load i32, ptr %124, align 4, !tbaa !64
  %126 = add i32 %125, -6
  %or.cond154 = icmp ult i32 %126, 7
  %127 = trunc nuw nsw i32 %125 to i16
  %128 = select i1 %or.cond154, i16 %127, i16 12
  store i16 %128, ptr %76, align 2, !tbaa !42
  %129 = getelementptr inbounds i8, ptr %108, i64 20
  %130 = load i32, ptr %129, align 4, !tbaa !65
  %131 = mul i32 %130, 5
  %132 = add i32 %131, -10
  %or.cond155 = icmp ult i32 %132, 11
  %133 = select i1 %or.cond155, i32 %131, i32 10
  store i32 %133, ptr %77, align 8, !tbaa !43
  %134 = getelementptr inbounds i8, ptr %108, i64 24
  %135 = load i32, ptr %134, align 4, !tbaa !66
  %.not143 = icmp eq i32 %135, 0
  %136 = mul i32 %135, 5
  %137 = add i32 %136, -10
  %or.cond156 = icmp ult i32 %137, 291
  %138 = select i1 %or.cond156, i32 %136, i32 10
  %storemerge = select i1 %.not143, i32 0, i32 %138
  store i32 %storemerge, ptr %78, align 4, !tbaa !44
  %139 = getelementptr inbounds i8, ptr %108, i64 28
  %140 = load i32, ptr %139, align 4, !tbaa !67
  %.not144 = icmp eq i32 %140, 0
  br i1 %.not144, label %157, label %141

141:                                              ; preds = %109
  %142 = load i32, ptr %59, align 8, !tbaa !31
  %143 = and i32 %142, -3
  store i32 %143, ptr %59, align 8, !tbaa !31
  %144 = add i32 %140, -4
  %or.cond157 = icmp ult i32 %144, 5
  %145 = trunc nuw nsw i32 %140 to i8
  %146 = select i1 %or.cond157, i8 %145, i8 8
  store i8 %146, ptr %75, align 4, !tbaa !41
  %147 = getelementptr inbounds i8, ptr %108, i64 32
  %148 = load i32, ptr %147, align 4, !tbaa !68
  %149 = mul i32 %148, 5
  %150 = add i32 %149, -36000
  %or.cond158 = icmp ult i32 %150, 36001
  %151 = select i1 %or.cond158, i32 %149, i32 36000
  store i32 %151, ptr %73, align 4, !tbaa !39
  %152 = getelementptr inbounds i8, ptr %108, i64 36
  %153 = load i32, ptr %152, align 4, !tbaa !69
  %154 = mul i32 %153, 5
  %155 = add i32 %154, -150
  %or.cond159 = icmp ult i32 %155, 151
  %156 = select i1 %or.cond159, i32 %154, i32 300
  store i32 %156, ptr %74, align 8, !tbaa !40
  br label %157

157:                                              ; preds = %141, %109
  %158 = getelementptr inbounds i8, ptr %108, i64 12
  %159 = load i32, ptr %158, align 4, !tbaa !70
  %160 = mul i32 %159, 5
  %161 = add i32 %160, -300
  %or.cond160 = icmp ult i32 %161, 76
  %162 = select i1 %or.cond160, i32 %160, i32 375
  store i32 %162, ptr %79, align 8, !tbaa !45
  %163 = getelementptr inbounds i8, ptr %108, i64 40
  %164 = load i8, ptr %163, align 4, !tbaa !71
  %.not145 = icmp eq i8 %164, 0
  br i1 %.not145, label %165, label %168

165:                                              ; preds = %157
  %166 = load i32, ptr %59, align 8, !tbaa !31
  %167 = or i32 %166, 1
  store i32 %167, ptr %59, align 8, !tbaa !31
  br label %168

168:                                              ; preds = %165, %157
  %169 = getelementptr inbounds i8, ptr %108, i64 41
  %170 = load i8, ptr %169, align 1, !tbaa !72
  %.not146 = icmp eq i8 %170, 0
  br i1 %.not146, label %171, label %174

171:                                              ; preds = %168
  %172 = load i32, ptr %59, align 8, !tbaa !31
  %173 = or i32 %172, 16
  store i32 %173, ptr %59, align 8, !tbaa !31
  br label %174

174:                                              ; preds = %171, %168
  %175 = getelementptr inbounds i8, ptr %108, i64 42
  %176 = load i8, ptr %175, align 2, !tbaa !73
  %.not147 = icmp eq i8 %176, 0
  br i1 %.not147, label %177, label %180

177:                                              ; preds = %174
  %178 = load i32, ptr %59, align 8, !tbaa !31
  %179 = or i32 %178, 4
  store i32 %179, ptr %59, align 8, !tbaa !31
  br label %180

180:                                              ; preds = %174, %177, %105
  %181 = call i64 @TcpInstallDevicePath(ptr noundef nonnull %0) #3
  %182 = icmp slt i64 %181, 0
  br i1 %182, label %189, label %183

183:                                              ; preds = %180
  %184 = load i8, ptr %95, align 2, !tbaa !53
  %.not148 = icmp eq i8 %184, 0
  br i1 %.not148, label %185, label %186

185:                                              ; preds = %183
  call void @TcpSetState(ptr noundef nonnull %14, i8 noundef zeroext 1) #3
  call void @SockSetState(ptr noundef nonnull %0, i8 noundef zeroext 1) #3
  br label %186

186:                                              ; preds = %183, %185
  %.sink161 = phi i8 [ 2, %185 ], [ 1, %183 ]
  %187 = getelementptr inbounds i8, ptr %0, i64 56
  store i8 %.sink161, ptr %187, align 8
  %188 = call i64 @TcpInsertTcb(ptr noundef nonnull %14) #3
  br label %189

189:                                              ; preds = %180, %40, %44, %42, %19, %186
  %.0 = phi i64 [ %31, %19 ], [ %38, %44 ], [ %38, %42 ], [ %38, %40 ], [ %181, %180 ], [ %181, %186 ]
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %3) #3
  ret i64 %.0
}

declare zeroext i8 @IsListEmpty(ptr noundef) local_unnamed_addr #1

declare zeroext i16 @TcpGetRcvMss(ptr noundef) local_unnamed_addr #1

declare i64 @TcpInstallDevicePath(ptr noundef) local_unnamed_addr #1

declare void @TcpSetState(ptr noundef, i8 noundef zeroext) local_unnamed_addr #1

declare void @SockSetState(ptr noundef, i8 noundef zeroext) local_unnamed_addr #1

declare i64 @TcpInsertTcb(ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress 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, !10, i64 8}
!6 = !{!"_SOCKET", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !11, i64 40, !8, i64 56, !7, i64 60, !8, i64 64, !12, i64 66, !13, i64 72, !15, i64 96, !15, i64 112, !14, i64 128, !8, i64 136, !7, i64 140, !7, i64 144, !10, i64 152, !11, i64 160, !11, i64 176, !11, i64 192, !11, i64 208, !11, i64 224, !10, i64 240, !10, i64 248, !10, i64 256, !8, i64 264, !8, i64 288, !10, i64 368, !10, i64 376, !10, i64 384}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_LIST_ENTRY", !10, i64 0, !10, i64 8}
!12 = !{!"short", !8, i64 0}
!13 = !{!"", !14, i64 0, !14, i64 8, !7, i64 16}
!14 = !{!"long long", !8, i64 0}
!15 = !{!"_SOCK_BUFFER", !7, i64 0, !7, i64 4, !10, i64 8}
!16 = !{!17, !10, i64 8}
!17 = !{!"_TCP4_PROTO_DATA", !10, i64 0, !10, i64 8}
!18 = !{!19, !8, i64 0}
!19 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !8, i64 4, !8, i64 5, !20, i64 6, !20, i64 10, !8, i64 14, !8, i64 15, !8, i64 16, !8, i64 17, !7, i64 20, !7, i64 24}
!20 = !{!"", !8, i64 0}
!21 = !{!22, !8, i64 2}
!22 = !{!"", !8, i64 0, !8, i64 1, !23, i64 2, !10, i64 24}
!23 = !{!"", !8, i64 0, !20, i64 1, !20, i64 5, !12, i64 10, !20, i64 12, !12, i64 16, !8, i64 18}
!24 = !{!19, !8, i64 5}
!25 = !{!8, !8, i64 0}
!26 = !{!19, !7, i64 20}
!27 = !{!28, !10, i64 280}
!28 = !{!"_TCP_CB", !11, i64 0, !10, i64 16, !10, i64 24, !29, i64 32, !29, i64 40, !11, i64 48, !11, i64 64, !7, i64 80, !7, i64 84, !8, i64 88, !8, i64 89, !12, 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, !12, i64 128, !7, i64 132, !7, i64 136, !7, i64 140, !7, i64 144, !7, i64 148, !12, i64 152, !12, 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, !12, i64 236, !8, i64 238, !8, i64 239, !7, i64 240, !7, i64 244, !7, i64 248, !8, i64 252, !8, i64 253, !12, i64 254, !7, i64 256, !7, i64 260, !7, i64 264, !8, i64 268, !8, i64 269, !8, i64 270, !20, i64 271, !10, i64 280}
!29 = !{!"_TCP_PEER", !7, i64 0, !12, i64 4}
!30 = !{!28, !8, i64 88}
!31 = !{!28, !7, i64 80}
!32 = !{!28, !12, i64 128}
!33 = !{!28, !12, i64 152}
!34 = !{!28, !7, i64 212}
!35 = !{!28, !7, i64 220}
!36 = !{!28, !7, i64 224}
!37 = !{!28, !7, i64 228}
!38 = !{!28, !8, i64 238}
!39 = !{!28, !7, i64 244}
!40 = !{!28, !7, i64 248}
!41 = !{!28, !8, i64 252}
!42 = !{!28, !12, i64 254}
!43 = !{!28, !7, i64 256}
!44 = !{!28, !7, i64 260}
!45 = !{!28, !7, i64 264}
!46 = !{!22, !8, i64 1}
!47 = !{!28, !8, i64 270}
!48 = !{!22, !8, i64 0}
!49 = !{!28, !8, i64 269}
!50 = !{!28, !8, i64 268}
!51 = !{!22, !12, i64 12}
!52 = !{!28, !12, i64 36}
!53 = !{!22, !8, i64 20}
!54 = !{!22, !12, i64 18}
!55 = !{!28, !7, i64 40}
!56 = !{!22, !10, i64 24}
!57 = !{!58, !7, i64 0}
!58 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !8, i64 40, !8, i64 41, !8, i64 42, !8, i64 43, !8, i64 44}
!59 = !{!6, !7, i64 112}
!60 = !{!58, !7, i64 4}
!61 = !{!6, !7, i64 96}
!62 = !{!58, !7, i64 8}
!63 = !{!6, !7, i64 140}
!64 = !{!58, !7, i64 16}
!65 = !{!58, !7, i64 20}
!66 = !{!58, !7, i64 24}
!67 = !{!58, !7, i64 28}
!68 = !{!58, !7, i64 32}
!69 = !{!58, !7, i64 36}
!70 = !{!58, !7, i64 12}
!71 = !{!58, !8, i64 40}
!72 = !{!58, !8, i64 41}
!73 = !{!58, !8, i64 42}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,MergedLoadStoreMotionPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass