; LLVM IR from thalium/icebox :: third_party/virtualbox/src/VBox/Devices/EFI/Firmware/NetworkPkg/Mtftp6Dxe (Mtftp6RrqHandleOack)

; 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.GUID = type { i32, i16, i16, [8 x i8] }
%struct.MTFTP6_EXT_OPTION_INFO = type { i16, i8, i32, %struct.EFI_IPv6_ADDRESS, i16, i8, i32 }
%struct.EFI_IPv6_ADDRESS = type { [16 x i8] }
%struct._MTFTP6_INSTANCE = type { i32, ptr, %struct._LIST_ENTRY, %struct._EFI_MTFTP6_PROTOCOL, ptr, ptr, ptr, %struct.MTFTP6_EXT_OPTION_INFO, i16, i16, %struct._LIST_ENTRY, %struct.EFI_IPv6_ADDRESS, i16, i16, ptr, %struct.EFI_IPv6_ADDRESS, i16, ptr, ptr, i32, i32, i32, i32, i64, i8, i8, i8 }
%struct._EFI_MTFTP6_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._LIST_ENTRY = type { ptr, ptr }
%struct._MTFTP6_SERVICE = type { i32, %struct._EFI_SERVICE_BINDING_PROTOCOL, ptr, ptr, i16, %struct._LIST_ENTRY, ptr, ptr }
%struct._EFI_SERVICE_BINDING_PROTOCOL = type { ptr, ptr }
%struct.EFI_BOOT_SERVICES = type { %struct.EFI_TABLE_HEADER, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_TABLE_HEADER = type { i64, i32, i32, i32, i32 }
%struct._UDP_IO = type { i32, %struct._LIST_ENTRY, i64, i8, ptr, ptr, ptr, %struct.EFI_SIMPLE_NETWORK_MODE, %struct._LIST_ENTRY, ptr, %union.anon, %union.anon.0 }
%struct.EFI_SIMPLE_NETWORK_MODE = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [16 x %struct.EFI_MAC_ADDRESS], %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, i8, i8, i8, i8, i8 }
%struct.EFI_MAC_ADDRESS = type { [32 x i8] }
%union.anon = type { ptr }
%union.anon.0 = type { %struct.EFI_UDP6_CONFIG_DATA }
%struct.EFI_UDP6_CONFIG_DATA = type { i8, i8, i8, i8, i8, i32, i32, %struct.EFI_IPv6_ADDRESS, i16, %struct.EFI_IPv6_ADDRESS, i16 }

@.str = external hidden unnamed_addr constant [134 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [26 x i8], align 1
@gBS = external global ptr, align 8
@gEfiUdp6ProtocolGuid = external global %struct.GUID, align 4
@.str.9 = external hidden unnamed_addr constant [52 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i64 @Mtftp6RrqSendAck(ptr noundef, i16 noundef zeroext) #0

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

declare zeroext i8 @DebugAssertEnabled() #2

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

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

declare void @NetbufFree(ptr noundef) #2

declare i64 @Mtftp6SendError(ptr noundef, i16 noundef zeroext, ptr noundef) #2

declare ptr @CopyMem(ptr noundef, ptr noundef, i64 noundef) #2

declare i64 @Mtftp6GetNextBlockNum(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @Mtftp6RrqOackValid(ptr noundef, ptr noundef, ptr noundef) #0

declare zeroext i8 @NetIp6IsUnspecifiedAddr(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i64 @Mtftp6RrqConfigMcastUdpIo(ptr noundef, ptr noundef) #0

declare ptr @ZeroMem(ptr noundef, i64 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i64 @Mtftp6RrqHandleOack(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3, ptr noundef %4) #0 {
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %struct.MTFTP6_EXT_OPTION_INFO, align 4
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i32 %2, ptr %9, align 4, !tbaa !9
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %19 = load ptr, ptr %11, align 8, !tbaa !5
  store i8 0, ptr %19, align 1, !tbaa !11
  store ptr null, ptr %12, align 8, !tbaa !5
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %20, i32 0, i32 10
  %22 = call i64 @Mtftp6GetNextBlockNum(ptr noundef %21)
  store i64 %22, ptr %16, align 8, !tbaa !12
  br label %23

23:                                               ; preds = %5
  %24 = call zeroext i8 @DebugAssertEnabled()
  %25 = icmp ne i8 %24, 0
  br i1 %25, label %26, label %31

26:                                               ; preds = %23
  %27 = load i64, ptr %16, align 8, !tbaa !12
  %28 = icmp ne i64 %27, -1
  br i1 %28, label %30, label %29

29:                                               ; preds = %26
  call void @DebugAssert(ptr noundef @.str, i64 noundef 467, ptr noundef @.str.5)
  br label %30

30:                                               ; preds = %29, %26
  br label %31

31:                                               ; preds = %30, %23
  br label %32

32:                                               ; preds = %31
  br label %33

33:                                               ; preds = %32
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %34, i32 0, i32 25
  %36 = load i8, ptr %35, align 1, !tbaa !14
  %37 = zext i8 %36 to i32
  %38 = icmp ne i32 %37, 0
  br i1 %38, label %39, label %43

39:                                               ; preds = %33
  %40 = load i64, ptr %16, align 8, !tbaa !12
  %41 = icmp ne i64 %40, 1
  br i1 %41, label %42, label %43

42:                                               ; preds = %39
  store i64 0, ptr %6, align 8
  store i32 1, ptr %18, align 4
  br label %253

43:                                               ; preds = %39, %33
  %44 = call ptr @ZeroMem(ptr noundef %14, i64 noundef 32)
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = load i32, ptr %9, align 4, !tbaa !9
  %47 = call i64 @Mtftp6ParseStart(ptr noundef %45, i32 noundef %46, ptr noundef %13, ptr noundef %12)
  store i64 %47, ptr %15, align 8, !tbaa !12
  %48 = load i64, ptr %15, align 8, !tbaa !12
  %49 = icmp slt i64 %48, 0
  br i1 %49, label %50, label %52

50:                                               ; preds = %43
  %51 = load i64, ptr %15, align 8, !tbaa !12
  store i64 %51, ptr %6, align 8
  store i32 1, ptr %18, align 4
  br label %253

52:                                               ; preds = %43
  br label %53

53:                                               ; preds = %52
  %54 = call zeroext i8 @DebugAssertEnabled()
  %55 = icmp ne i8 %54, 0
  br i1 %55, label %56, label %61

56:                                               ; preds = %53
  %57 = load ptr, ptr %12, align 8, !tbaa !5
  %58 = icmp ne ptr %57, null
  br i1 %58, label %60, label %59

59:                                               ; preds = %56
  call void @DebugAssert(ptr noundef @.str, i64 noundef 483, ptr noundef @.str.6)
  br label %60

60:                                               ; preds = %59, %56
  br label %61

61:                                               ; preds = %60, %53
  br label %62

62:                                               ; preds = %61
  br label %63

63:                                               ; preds = %62
  %64 = load ptr, ptr %12, align 8, !tbaa !5
  %65 = load i32, ptr %13, align 4, !tbaa !9
  %66 = call i64 @Mtftp6ParseExtensionOption(ptr noundef %64, i32 noundef %65, i8 noundef zeroext 0, ptr noundef %14)
  store i64 %66, ptr %15, align 8, !tbaa !12
  %67 = load i64, ptr %15, align 8, !tbaa !12
  %68 = icmp slt i64 %67, 0
  br i1 %68, label %75, label %69

69:                                               ; preds = %63
  %70 = load ptr, ptr %7, align 8, !tbaa !5
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %71, i32 0, i32 7
  %73 = call zeroext i8 @Mtftp6RrqOackValid(ptr noundef %70, ptr noundef %14, ptr noundef %72)
  %74 = icmp ne i8 %73, 0
  br i1 %74, label %85, label %75

75:                                               ; preds = %69, %63
  %76 = load i64, ptr %15, align 8, !tbaa !12
  %77 = icmp ne i64 %76, -9223372036854775799
  br i1 %77, label %78, label %84

78:                                               ; preds = %75
  %79 = load ptr, ptr %10, align 8, !tbaa !5
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  call void @NetbufFree(ptr noundef %80)
  %81 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr null, ptr %81, align 8, !tbaa !5
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = call i64 @Mtftp6SendError(ptr noundef %82, i16 noundef zeroext 6, ptr noundef @.str.7)
  br label %84

84:                                               ; preds = %78, %75
  store i64 -9223372036854775785, ptr %6, align 8
  store i32 1, ptr %18, align 4
  br label %253

85:                                               ; preds = %69
  %86 = getelementptr inbounds %struct.MTFTP6_EXT_OPTION_INFO, ptr %14, i32 0, i32 6
  %87 = load i32, ptr %86, align 4, !tbaa !21
  %88 = and i32 %87, 8
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %90, label %220

90:                                               ; preds = %85
  %91 = getelementptr inbounds %struct.MTFTP6_EXT_OPTION_INFO, ptr %14, i32 0, i32 5
  %92 = load i8, ptr %91, align 2, !tbaa !22
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %93, i32 0, i32 25
  store i8 %92, ptr %94, align 1, !tbaa !14
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %95, i32 0, i32 15
  %97 = call zeroext i8 @NetIp6IsUnspecifiedAddr(ptr noundef %96)
  %98 = icmp ne i8 %97, 0
  br i1 %98, label %99, label %219

99:                                               ; preds = %90
  %100 = getelementptr inbounds %struct.MTFTP6_EXT_OPTION_INFO, ptr %14, i32 0, i32 3
  %101 = call zeroext i8 @NetIp6IsUnspecifiedAddr(ptr noundef %100)
  %102 = zext i8 %101 to i32
  %103 = icmp ne i32 %102, 0
  br i1 %103, label %109, label %104

104:                                              ; preds = %99
  %105 = getelementptr inbounds %struct.MTFTP6_EXT_OPTION_INFO, ptr %14, i32 0, i32 4
  %106 = load i16, ptr %105, align 4, !tbaa !23
  %107 = zext i16 %106 to i32
  %108 = icmp eq i32 %107, 0
  br i1 %108, label %109, label %115

109:                                              ; preds = %104, %99
  %110 = load ptr, ptr %10, align 8, !tbaa !5
  %111 = load ptr, ptr %110, align 8, !tbaa !5
  call void @NetbufFree(ptr noundef %111)
  %112 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr null, ptr %112, align 8, !tbaa !5
  %113 = load ptr, ptr %7, align 8, !tbaa !5
  %114 = call i64 @Mtftp6SendError(ptr noundef %113, i16 noundef zeroext 6, ptr noundef @.str.8)
  store i64 -9223372036854775785, ptr %6, align 8
  store i32 1, ptr %18, align 4
  br label %253

115:                                              ; preds = %104
  %116 = load ptr, ptr %7, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %116, i32 0, i32 15
  %118 = getelementptr inbounds %struct.MTFTP6_EXT_OPTION_INFO, ptr %14, i32 0, i32 3
  %119 = call ptr @CopyMem(ptr noundef %117, ptr noundef %118, i64 noundef 16)
  %120 = getelementptr inbounds %struct.MTFTP6_EXT_OPTION_INFO, ptr %14, i32 0, i32 4
  %121 = load i16, ptr %120, align 4, !tbaa !23
  %122 = load ptr, ptr %7, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %122, i32 0, i32 16
  store i16 %121, ptr %123, align 8, !tbaa !24
  %124 = load ptr, ptr %7, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %124, i32 0, i32 17
  %126 = load ptr, ptr %125, align 8, !tbaa !25
  %127 = icmp eq ptr %126, null
  br i1 %127, label %128, label %176

128:                                              ; preds = %115
  %129 = load ptr, ptr %7, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %129, i32 0, i32 4
  %131 = load ptr, ptr %130, align 8, !tbaa !26
  %132 = getelementptr inbounds %struct._MTFTP6_SERVICE, ptr %131, i32 0, i32 2
  %133 = load ptr, ptr %132, align 8, !tbaa !27
  %134 = load ptr, ptr %7, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %134, i32 0, i32 4
  %136 = load ptr, ptr %135, align 8, !tbaa !26
  %137 = getelementptr inbounds %struct._MTFTP6_SERVICE, ptr %136, i32 0, i32 3
  %138 = load ptr, ptr %137, align 8, !tbaa !30
  %139 = load ptr, ptr %7, align 8, !tbaa !5
  %140 = call ptr @UdpIoCreateIo(ptr noundef %133, ptr noundef %138, ptr noundef @Mtftp6RrqConfigMcastUdpIo, i8 noundef zeroext 6, ptr noundef %139)
  %141 = load ptr, ptr %7, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %141, i32 0, i32 17
  store ptr %140, ptr %142, align 8, !tbaa !25
  %143 = load ptr, ptr %7, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %143, i32 0, i32 17
  %145 = load ptr, ptr %144, align 8, !tbaa !25
  %146 = icmp ne ptr %145, null
  br i1 %146, label %147, label %175

147:                                              ; preds = %128
  %148 = load ptr, ptr @gBS, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %148, i32 0, i32 33
  %150 = load ptr, ptr %149, align 8, !tbaa !31
  %151 = load ptr, ptr %7, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %151, i32 0, i32 17
  %153 = load ptr, ptr %152, align 8, !tbaa !25
  %154 = getelementptr inbounds %struct._UDP_IO, ptr %153, i32 0, i32 6
  %155 = load ptr, ptr %154, align 8, !tbaa !34
  %156 = load ptr, ptr %7, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %156, i32 0, i32 4
  %158 = load ptr, ptr %157, align 8, !tbaa !26
  %159 = getelementptr inbounds %struct._MTFTP6_SERVICE, ptr %158, i32 0, i32 3
  %160 = load ptr, ptr %159, align 8, !tbaa !30
  %161 = load ptr, ptr %7, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %161, i32 0, i32 1
  %163 = load ptr, ptr %162, align 8, !tbaa !37
  %164 = call i64 %150(ptr noundef %155, ptr noundef @gEfiUdp6ProtocolGuid, ptr noundef %17, ptr noundef %160, ptr noundef %163, i32 noundef 8)
  store i64 %164, ptr %15, align 8, !tbaa !12
  %165 = load i64, ptr %15, align 8, !tbaa !12
  %166 = icmp slt i64 %165, 0
  br i1 %166, label %167, label %174

167:                                              ; preds = %147
  %168 = load ptr, ptr %7, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %168, i32 0, i32 17
  %170 = load ptr, ptr %169, align 8, !tbaa !25
  %171 = call i64 @UdpIoFreeIo(ptr noundef %170)
  %172 = load ptr, ptr %7, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %172, i32 0, i32 17
  store ptr null, ptr %173, align 8, !tbaa !25
  store i64 -9223372036854775801, ptr %6, align 8
  store i32 1, ptr %18, align 4
  br label %253

174:                                              ; preds = %147
  br label %175

175:                                              ; preds = %174, %128
  br label %176

176:                                              ; preds = %175, %115
  %177 = load ptr, ptr %7, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %177, i32 0, i32 17
  %179 = load ptr, ptr %178, align 8, !tbaa !25
  %180 = icmp eq ptr %179, null
  br i1 %180, label %181, label %182

181:                                              ; preds = %176
  store i64 -9223372036854775801, ptr %6, align 8
  store i32 1, ptr %18, align 4
  br label %253

182:                                              ; preds = %176
  %183 = load ptr, ptr %7, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %183, i32 0, i32 17
  %185 = load ptr, ptr %184, align 8, !tbaa !25
  %186 = load ptr, ptr %7, align 8, !tbaa !5
  %187 = call i64 @UdpIoRecvDatagram(ptr noundef %185, ptr noundef @Mtftp6RrqInput, ptr noundef %186, i32 noundef 0)
  store i64 %187, ptr %15, align 8, !tbaa !12
  %188 = load i64, ptr %15, align 8, !tbaa !12
  %189 = icmp slt i64 %188, 0
  br i1 %189, label %190, label %197

190:                                              ; preds = %182
  %191 = load ptr, ptr %10, align 8, !tbaa !5
  %192 = load ptr, ptr %191, align 8, !tbaa !5
  call void @NetbufFree(ptr noundef %192)
  %193 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr null, ptr %193, align 8, !tbaa !5
  %194 = load ptr, ptr %7, align 8, !tbaa !5
  %195 = call i64 @Mtftp6SendError(ptr noundef %194, i16 noundef zeroext 2, ptr noundef @.str.9)
  %196 = load i64, ptr %15, align 8, !tbaa !12
  store i64 %196, ptr %6, align 8
  store i32 1, ptr %18, align 4
  br label %253

197:                                              ; preds = %182
  %198 = getelementptr inbounds %struct.MTFTP6_EXT_OPTION_INFO, ptr %14, i32 0, i32 0
  %199 = load i16, ptr %198, align 4, !tbaa !38
  %200 = zext i16 %199 to i32
  %201 = icmp ne i32 %200, 0
  br i1 %201, label %202, label %207

202:                                              ; preds = %197
  %203 = getelementptr inbounds %struct.MTFTP6_EXT_OPTION_INFO, ptr %14, i32 0, i32 0
  %204 = load i16, ptr %203, align 4, !tbaa !38
  %205 = load ptr, ptr %7, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %205, i32 0, i32 8
  store i16 %204, ptr %206, align 8, !tbaa !39
  br label %207

207:                                              ; preds = %202, %197
  %208 = getelementptr inbounds %struct.MTFTP6_EXT_OPTION_INFO, ptr %14, i32 0, i32 1
  %209 = load i8, ptr %208, align 2, !tbaa !40
  %210 = zext i8 %209 to i32
  %211 = icmp ne i32 %210, 0
  br i1 %211, label %212, label %218

212:                                              ; preds = %207
  %213 = getelementptr inbounds %struct.MTFTP6_EXT_OPTION_INFO, ptr %14, i32 0, i32 1
  %214 = load i8, ptr %213, align 2, !tbaa !40
  %215 = zext i8 %214 to i32
  %216 = load ptr, ptr %7, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %216, i32 0, i32 22
  store i32 %215, ptr %217, align 4, !tbaa !41
  br label %218

218:                                              ; preds = %212, %207
  br label %219

219:                                              ; preds = %218, %90
  br label %244

220:                                              ; preds = %85
  %221 = load ptr, ptr %7, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %221, i32 0, i32 25
  store i8 1, ptr %222, align 1, !tbaa !14
  %223 = getelementptr inbounds %struct.MTFTP6_EXT_OPTION_INFO, ptr %14, i32 0, i32 0
  %224 = load i16, ptr %223, align 4, !tbaa !38
  %225 = zext i16 %224 to i32
  %226 = icmp ne i32 %225, 0
  br i1 %226, label %227, label %232

227:                                              ; preds = %220
  %228 = getelementptr inbounds %struct.MTFTP6_EXT_OPTION_INFO, ptr %14, i32 0, i32 0
  %229 = load i16, ptr %228, align 4, !tbaa !38
  %230 = load ptr, ptr %7, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %230, i32 0, i32 8
  store i16 %229, ptr %231, align 8, !tbaa !39
  br label %232

232:                                              ; preds = %227, %220
  %233 = getelementptr inbounds %struct.MTFTP6_EXT_OPTION_INFO, ptr %14, i32 0, i32 1
  %234 = load i8, ptr %233, align 2, !tbaa !40
  %235 = zext i8 %234 to i32
  %236 = icmp ne i32 %235, 0
  br i1 %236, label %237, label %243

237:                                              ; preds = %232
  %238 = getelementptr inbounds %struct.MTFTP6_EXT_OPTION_INFO, ptr %14, i32 0, i32 1
  %239 = load i8, ptr %238, align 2, !tbaa !40
  %240 = zext i8 %239 to i32
  %241 = load ptr, ptr %7, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %241, i32 0, i32 22
  store i32 %240, ptr %242, align 4, !tbaa !41
  br label %243

243:                                              ; preds = %237, %232
  br label %244

244:                                              ; preds = %243, %219
  %245 = load ptr, ptr %10, align 8, !tbaa !5
  %246 = load ptr, ptr %245, align 8, !tbaa !5
  call void @NetbufFree(ptr noundef %246)
  %247 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr null, ptr %247, align 8, !tbaa !5
  %248 = load ptr, ptr %7, align 8, !tbaa !5
  %249 = load i64, ptr %16, align 8, !tbaa !12
  %250 = sub nsw i64 %249, 1
  %251 = trunc i64 %250 to i16
  %252 = call i64 @Mtftp6RrqSendAck(ptr noundef %248, i16 noundef zeroext %251)
  store i64 %252, ptr %6, align 8
  store i32 1, ptr %18, align 4
  br label %253

253:                                              ; preds = %244, %190, %181, %167, %109, %84, %50, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  %254 = load i64, ptr %6, align 8
  ret i64 %254
}

declare i64 @Mtftp6ParseStart(ptr noundef, i32 noundef, ptr noundef, ptr noundef) #2

declare i64 @Mtftp6ParseExtensionOption(ptr noundef, i32 noundef, i8 noundef zeroext, ptr noundef) #2

declare ptr @UdpIoCreateIo(ptr noundef, ptr noundef, ptr noundef, i8 noundef zeroext, ptr noundef) #2

declare i64 @UdpIoFreeIo(ptr noundef) #2

declare i64 @UdpIoRecvDatagram(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @Mtftp6RrqInput(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #0

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = !{!15, !7, i64 273}
!15 = !{!"_MTFTP6_INSTANCE", !10, i64 0, !6, i64 8, !16, i64 16, !17, i64 32, !6, i64 96, !6, i64 104, !6, i64 112, !18, i64 120, !19, i64 152, !19, i64 154, !16, i64 160, !20, i64 176, !19, i64 192, !19, i64 194, !6, i64 200, !20, i64 208, !19, i64 224, !6, i64 232, !6, i64 240, !10, i64 248, !10, i64 252, !10, i64 256, !10, i64 260, !13, i64 264, !7, i64 272, !7, i64 273, !7, i64 274}
!16 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!17 = !{!"_EFI_MTFTP6_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!18 = !{!"", !19, i64 0, !7, i64 2, !10, i64 4, !20, i64 8, !19, i64 24, !7, i64 26, !10, i64 28}
!19 = !{!"short", !7, i64 0}
!20 = !{!"", !7, i64 0}
!21 = !{!18, !10, i64 28}
!22 = !{!18, !7, i64 26}
!23 = !{!18, !19, i64 24}
!24 = !{!15, !19, i64 224}
!25 = !{!15, !6, i64 232}
!26 = !{!15, !6, i64 96}
!27 = !{!28, !6, i64 24}
!28 = !{!"_MTFTP6_SERVICE", !10, i64 0, !29, i64 8, !6, i64 24, !6, i64 32, !19, i64 40, !16, i64 48, !6, i64 64, !6, i64 72}
!29 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!30 = !{!28, !6, i64 32}
!31 = !{!32, !6, i64 280}
!32 = !{!"", !33, i64 0, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368}
!33 = !{!"", !13, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!34 = !{!35, !6, i64 56}
!35 = !{!"_UDP_IO", !10, i64 0, !16, i64 8, !13, i64 24, !7, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !36, i64 64, !16, i64 720, !6, i64 736, !7, i64 744, !7, i64 752}
!36 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !7, i64 40, !20, i64 552, !20, i64 584, !20, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!37 = !{!15, !6, i64 8}
!38 = !{!18, !19, i64 0}
!39 = !{!15, !19, i64 152}
!40 = !{!18, !7, i64 2}
!41 = !{!15, !10, i64 260}


; 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.GUID = type { i32, i16, i16, [8 x i8] }
%struct.MTFTP6_EXT_OPTION_INFO = type { i16, i8, i32, %struct.EFI_IPv6_ADDRESS, i16, i8, i32 }
%struct.EFI_IPv6_ADDRESS = type { [16 x i8] }

@.str = external hidden unnamed_addr constant [134 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [26 x i8], align 1
@gBS = external local_unnamed_addr global ptr, align 8
@gEfiUdp6ProtocolGuid = external global %struct.GUID, align 4
@.str.9 = external hidden unnamed_addr constant [52 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i64 @Mtftp6RrqSendAck(ptr noundef, i16 noundef zeroext) local_unnamed_addr #0

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

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #2

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

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

declare void @NetbufFree(ptr noundef) local_unnamed_addr #2

declare i64 @Mtftp6SendError(ptr noundef, i16 noundef zeroext, ptr noundef) local_unnamed_addr #2

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

declare i64 @Mtftp6GetNextBlockNum(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @Mtftp6RrqOackValid(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare zeroext i8 @NetIp6IsUnspecifiedAddr(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i64 @Mtftp6RrqConfigMcastUdpIo(ptr noundef, ptr noundef) #0

declare ptr @ZeroMem(ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local i64 @Mtftp6RrqHandleOack(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr nocapture noundef %3, ptr nocapture noundef writeonly %4) local_unnamed_addr #0 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %struct.MTFTP6_EXT_OPTION_INFO, align 4
  %9 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #3
  store i8 0, ptr %4, align 1, !tbaa !5
  store ptr null, ptr %6, align 8, !tbaa !8
  %10 = getelementptr inbounds i8, ptr %0, i64 160
  %11 = tail call i64 @Mtftp6GetNextBlockNum(ptr noundef nonnull %10) #3
  %12 = tail call zeroext i8 @DebugAssertEnabled() #3
  %13 = icmp eq i8 %12, 0
  %14 = icmp ne i64 %11, -1
  %or.cond7 = select i1 %13, i1 true, i1 %14
  br i1 %or.cond7, label %16, label %15

15:                                               ; preds = %5
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 467, ptr noundef nonnull @.str.5) #3
  br label %16

16:                                               ; preds = %15, %5
  %17 = getelementptr inbounds i8, ptr %0, i64 273
  %18 = load i8, ptr %17, align 1, !tbaa !10
  %19 = icmp ne i8 %18, 0
  %20 = icmp ne i64 %11, 1
  %or.cond = select i1 %19, i1 %20, i1 false
  br i1 %or.cond, label %.thread76, label %21

21:                                               ; preds = %16
  %22 = call ptr @ZeroMem(ptr noundef nonnull %8, i64 noundef 32) #3
  %23 = call i64 @Mtftp6ParseStart(ptr noundef %1, i32 noundef %2, ptr noundef nonnull %7, ptr noundef nonnull %6) #3
  %24 = icmp slt i64 %23, 0
  br i1 %24, label %.thread76, label %25

25:                                               ; preds = %21
  %26 = call zeroext i8 @DebugAssertEnabled() #3
  %27 = icmp eq i8 %26, 0
  %28 = load ptr, ptr %6, align 8
  %29 = icmp ne ptr %28, null
  %or.cond9 = select i1 %27, i1 true, i1 %29
  br i1 %or.cond9, label %31, label %30

30:                                               ; preds = %25
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 483, ptr noundef nonnull @.str.6) #3
  %.pre = load ptr, ptr %6, align 8, !tbaa !8
  br label %31

31:                                               ; preds = %30, %25
  %32 = phi ptr [ %.pre, %30 ], [ %28, %25 ]
  %33 = load i32, ptr %7, align 4, !tbaa !19
  %34 = call i64 @Mtftp6ParseExtensionOption(ptr noundef %32, i32 noundef %33, i8 noundef zeroext 0, ptr noundef nonnull %8) #3
  %35 = icmp slt i64 %34, 0
  br i1 %35, label %39, label %36

36:                                               ; preds = %31
  %37 = getelementptr inbounds i8, ptr %0, i64 120
  %38 = call zeroext i8 @Mtftp6RrqOackValid(ptr noundef nonnull %0, ptr noundef nonnull %8, ptr noundef nonnull %37)
  %.not = icmp eq i8 %38, 0
  br i1 %.not, label %.thread, label %42

39:                                               ; preds = %31
  %.not74 = icmp eq i64 %34, -9223372036854775799
  br i1 %.not74, label %.thread76, label %.thread

.thread:                                          ; preds = %36, %39
  %40 = load ptr, ptr %3, align 8, !tbaa !8
  call void @NetbufFree(ptr noundef %40) #3
  store ptr null, ptr %3, align 8, !tbaa !8
  %41 = call i64 @Mtftp6SendError(ptr noundef nonnull %0, i16 noundef zeroext 6, ptr noundef nonnull @.str.7) #3
  br label %.thread76

42:                                               ; preds = %36
  %43 = getelementptr inbounds i8, ptr %8, i64 28
  %44 = load i32, ptr %43, align 4, !tbaa !20
  %45 = and i32 %44, 8
  %.not67 = icmp eq i32 %45, 0
  br i1 %.not67, label %107, label %46

46:                                               ; preds = %42
  %47 = getelementptr inbounds i8, ptr %8, i64 26
  %48 = load i8, ptr %47, align 2, !tbaa !21
  store i8 %48, ptr %17, align 1, !tbaa !10
  %49 = getelementptr inbounds i8, ptr %0, i64 208
  %50 = call zeroext i8 @NetIp6IsUnspecifiedAddr(ptr noundef nonnull %49) #3
  %.not70 = icmp eq i8 %50, 0
  br i1 %.not70, label %116, label %51

51:                                               ; preds = %46
  %52 = getelementptr inbounds i8, ptr %8, i64 8
  %53 = call zeroext i8 @NetIp6IsUnspecifiedAddr(ptr noundef nonnull %52) #3
  %54 = icmp ne i8 %53, 0
  %55 = getelementptr inbounds i8, ptr %8, i64 24
  %56 = load i16, ptr %55, align 4
  %57 = icmp eq i16 %56, 0
  %or.cond5 = select i1 %54, i1 true, i1 %57
  br i1 %or.cond5, label %58, label %61

58:                                               ; preds = %51
  %59 = load ptr, ptr %3, align 8, !tbaa !8
  call void @NetbufFree(ptr noundef %59) #3
  store ptr null, ptr %3, align 8, !tbaa !8
  %60 = call i64 @Mtftp6SendError(ptr noundef nonnull %0, i16 noundef zeroext 6, ptr noundef nonnull @.str.8) #3
  br label %.thread76

61:                                               ; preds = %51
  %62 = call ptr @CopyMem(ptr noundef nonnull %49, ptr noundef nonnull %52, i64 noundef 16) #3
  %63 = load i16, ptr %55, align 4, !tbaa !22
  %64 = getelementptr inbounds i8, ptr %0, i64 224
  store i16 %63, ptr %64, align 8, !tbaa !23
  %65 = getelementptr inbounds i8, ptr %0, i64 232
  %66 = load ptr, ptr %65, align 8, !tbaa !24
  %67 = icmp eq ptr %66, null
  br i1 %67, label %68, label %.thread77

68:                                               ; preds = %61
  %69 = getelementptr inbounds i8, ptr %0, i64 96
  %70 = load ptr, ptr %69, align 8, !tbaa !25
  %71 = getelementptr inbounds i8, ptr %70, i64 24
  %72 = load ptr, ptr %71, align 8, !tbaa !26
  %73 = getelementptr inbounds i8, ptr %70, i64 32
  %74 = load ptr, ptr %73, align 8, !tbaa !29
  %75 = call ptr @UdpIoCreateIo(ptr noundef %72, ptr noundef %74, ptr noundef nonnull @Mtftp6RrqConfigMcastUdpIo, i8 noundef zeroext 6, ptr noundef nonnull %0) #3
  store ptr %75, ptr %65, align 8, !tbaa !24
  %.not71 = icmp eq ptr %75, null
  br i1 %.not71, label %.thread76, label %76

76:                                               ; preds = %68
  %77 = load ptr, ptr @gBS, align 8, !tbaa !8
  %78 = getelementptr inbounds i8, ptr %77, i64 280
  %79 = load ptr, ptr %78, align 8, !tbaa !30
  %80 = getelementptr inbounds i8, ptr %75, i64 56
  %81 = load ptr, ptr %80, align 8, !tbaa !33
  %82 = load ptr, ptr %69, align 8, !tbaa !25
  %83 = getelementptr inbounds i8, ptr %82, i64 32
  %84 = load ptr, ptr %83, align 8, !tbaa !29
  %85 = getelementptr inbounds i8, ptr %0, i64 8
  %86 = load ptr, ptr %85, align 8, !tbaa !36
  %87 = call i64 %79(ptr noundef %81, ptr noundef nonnull @gEfiUdp6ProtocolGuid, ptr noundef nonnull %9, ptr noundef %84, ptr noundef %86, i32 noundef 8) #3
  %88 = icmp slt i64 %87, 0
  %89 = load ptr, ptr %65, align 8, !tbaa !24
  br i1 %88, label %90, label %92

90:                                               ; preds = %76
  %91 = call i64 @UdpIoFreeIo(ptr noundef %89) #3
  store ptr null, ptr %65, align 8, !tbaa !24
  br label %.thread76

92:                                               ; preds = %76
  %93 = icmp eq ptr %89, null
  br i1 %93, label %.thread76, label %.thread77

.thread77:                                        ; preds = %61, %92
  %94 = phi ptr [ %89, %92 ], [ %66, %61 ]
  %95 = call i64 @UdpIoRecvDatagram(ptr noundef nonnull %94, ptr noundef nonnull @Mtftp6RrqInput, ptr noundef nonnull %0, i32 noundef 0) #3
  %96 = icmp slt i64 %95, 0
  br i1 %96, label %97, label %100

97:                                               ; preds = %.thread77
  %98 = load ptr, ptr %3, align 8, !tbaa !8
  call void @NetbufFree(ptr noundef %98) #3
  store ptr null, ptr %3, align 8, !tbaa !8
  %99 = call i64 @Mtftp6SendError(ptr noundef nonnull %0, i16 noundef zeroext 2, ptr noundef nonnull @.str.9) #3
  br label %.thread76

100:                                              ; preds = %.thread77
  %101 = load i16, ptr %8, align 4, !tbaa !37
  %.not72 = icmp eq i16 %101, 0
  br i1 %.not72, label %104, label %102

102:                                              ; preds = %100
  %103 = getelementptr inbounds i8, ptr %0, i64 152
  store i16 %101, ptr %103, align 8, !tbaa !38
  br label %104

104:                                              ; preds = %102, %100
  %105 = getelementptr inbounds i8, ptr %8, i64 2
  %106 = load i8, ptr %105, align 2, !tbaa !39
  %.not73 = icmp eq i8 %106, 0
  br i1 %.not73, label %116, label %.sink.split

107:                                              ; preds = %42
  store i8 1, ptr %17, align 1, !tbaa !10
  %108 = load i16, ptr %8, align 4, !tbaa !37
  %.not68 = icmp eq i16 %108, 0
  br i1 %.not68, label %111, label %109

109:                                              ; preds = %107
  %110 = getelementptr inbounds i8, ptr %0, i64 152
  store i16 %108, ptr %110, align 8, !tbaa !38
  br label %111

111:                                              ; preds = %109, %107
  %112 = getelementptr inbounds i8, ptr %8, i64 2
  %113 = load i8, ptr %112, align 2, !tbaa !39
  %.not69 = icmp eq i8 %113, 0
  br i1 %.not69, label %116, label %.sink.split

.sink.split:                                      ; preds = %111, %104
  %.sink79 = phi i8 [ %106, %104 ], [ %113, %111 ]
  %114 = zext i8 %.sink79 to i32
  %115 = getelementptr inbounds i8, ptr %0, i64 260
  store i32 %114, ptr %115, align 4, !tbaa !40
  br label %116

116:                                              ; preds = %.sink.split, %111, %46, %104
  %117 = load ptr, ptr %3, align 8, !tbaa !8
  call void @NetbufFree(ptr noundef %117) #3
  store ptr null, ptr %3, align 8, !tbaa !8
  %118 = trunc i64 %11 to i16
  %119 = add i16 %118, -1
  %120 = call i64 @Mtftp6RrqSendAck(ptr noundef nonnull %0, i16 noundef zeroext %119)
  br label %.thread76

.thread76:                                        ; preds = %68, %92, %39, %.thread, %21, %16, %116, %97, %90, %58
  %.0 = phi i64 [ -9223372036854775785, %58 ], [ -9223372036854775801, %90 ], [ %95, %97 ], [ %120, %116 ], [ 0, %16 ], [ %23, %21 ], [ -9223372036854775785, %.thread ], [ -9223372036854775785, %39 ], [ -9223372036854775801, %92 ], [ -9223372036854775801, %68 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  ret i64 %.0
}

declare i64 @Mtftp6ParseStart(ptr noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i64 @Mtftp6ParseExtensionOption(ptr noundef, i32 noundef, i8 noundef zeroext, ptr noundef) local_unnamed_addr #2

declare ptr @UdpIoCreateIo(ptr noundef, ptr noundef, ptr noundef, i8 noundef zeroext, ptr noundef) local_unnamed_addr #2

declare i64 @UdpIoFreeIo(ptr noundef) local_unnamed_addr #2

declare i64 @UdpIoRecvDatagram(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @Mtftp6RrqInput(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #0

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !6, i64 0}
!10 = !{!11, !6, i64 273}
!11 = !{!"_MTFTP6_INSTANCE", !12, i64 0, !9, i64 8, !13, i64 16, !14, i64 32, !9, i64 96, !9, i64 104, !9, i64 112, !15, i64 120, !16, i64 152, !16, i64 154, !13, i64 160, !17, i64 176, !16, i64 192, !16, i64 194, !9, i64 200, !17, i64 208, !16, i64 224, !9, i64 232, !9, i64 240, !12, i64 248, !12, i64 252, !12, i64 256, !12, i64 260, !18, i64 264, !6, i64 272, !6, i64 273, !6, i64 274}
!12 = !{!"int", !6, i64 0}
!13 = !{!"_LIST_ENTRY", !9, i64 0, !9, i64 8}
!14 = !{!"_EFI_MTFTP6_PROTOCOL", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24, !9, i64 32, !9, i64 40, !9, i64 48, !9, i64 56}
!15 = !{!"", !16, i64 0, !6, i64 2, !12, i64 4, !17, i64 8, !16, i64 24, !6, i64 26, !12, i64 28}
!16 = !{!"short", !6, i64 0}
!17 = !{!"", !6, i64 0}
!18 = !{!"long long", !6, i64 0}
!19 = !{!12, !12, i64 0}
!20 = !{!15, !12, i64 28}
!21 = !{!15, !6, i64 26}
!22 = !{!15, !16, i64 24}
!23 = !{!11, !16, i64 224}
!24 = !{!11, !9, i64 232}
!25 = !{!11, !9, i64 96}
!26 = !{!27, !9, i64 24}
!27 = !{!"_MTFTP6_SERVICE", !12, i64 0, !28, i64 8, !9, i64 24, !9, i64 32, !16, i64 40, !13, i64 48, !9, i64 64, !9, i64 72}
!28 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !9, i64 0, !9, i64 8}
!29 = !{!27, !9, i64 32}
!30 = !{!31, !9, i64 280}
!31 = !{!"", !32, i64 0, !9, i64 24, !9, i64 32, !9, i64 40, !9, i64 48, !9, i64 56, !9, i64 64, !9, i64 72, !9, i64 80, !9, i64 88, !9, i64 96, !9, i64 104, !9, i64 112, !9, i64 120, !9, i64 128, !9, i64 136, !9, i64 144, !9, i64 152, !9, i64 160, !9, i64 168, !9, i64 176, !9, i64 184, !9, i64 192, !9, i64 200, !9, i64 208, !9, i64 216, !9, i64 224, !9, i64 232, !9, i64 240, !9, i64 248, !9, i64 256, !9, i64 264, !9, i64 272, !9, i64 280, !9, i64 288, !9, i64 296, !9, i64 304, !9, i64 312, !9, i64 320, !9, i64 328, !9, i64 336, !9, i64 344, !9, i64 352, !9, i64 360, !9, i64 368}
!32 = !{!"", !18, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20}
!33 = !{!34, !9, i64 56}
!34 = !{!"_UDP_IO", !12, i64 0, !13, i64 8, !18, i64 24, !6, i64 32, !9, i64 40, !9, i64 48, !9, i64 56, !35, i64 64, !13, i64 720, !9, i64 736, !6, i64 744, !6, i64 752}
!35 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !6, i64 40, !17, i64 552, !17, i64 584, !17, i64 616, !6, i64 648, !6, i64 649, !6, i64 650, !6, i64 651, !6, i64 652}
!36 = !{!11, !9, i64 8}
!37 = !{!15, !16, i64 0}
!38 = !{!11, !16, i64 152}
!39 = !{!15, !6, i64 2}
!40 = !{!11, !12, i64 260}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass