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

; 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_UDP6_CONFIG_DATA = type { i8, i8, i8, i8, i8, i32, i32, %struct.EFI_IPv6_ADDRESS, i16, %struct.EFI_IPv6_ADDRESS, i16 }
%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.MTFTP6_EXT_OPTION_INFO = type { i16, i8, i32, %struct.EFI_IPv6_ADDRESS, i16, i8, i32 }
%struct._LIST_ENTRY = type { ptr, ptr }
%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_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_MTFTP6_CONFIG_DATA = type { %struct.EFI_IPv6_ADDRESS, i16, %struct.EFI_IPv6_ADDRESS, i16, i16, i16 }
%struct.NET_BUF = type { i32, i64, %struct._LIST_ENTRY, %union.NET_IP_HEAD, ptr, ptr, [64 x i8], ptr, i32, i32, [1 x %struct.NET_BLOCK_OP] }
%union.NET_IP_HEAD = type { ptr }
%struct.NET_BLOCK_OP = type { ptr, ptr, ptr, ptr, i32 }
%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 }

@gBS = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [138 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [21 x i8], align 1

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

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

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

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

declare zeroext i8 @DebugAssertEnabled() #2

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

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

; Function Attrs: nounwind uwtable
define dso_local i64 @Mtftp6TransmitPacket(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct.EFI_UDP6_CONFIG_DATA, align 4
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i16, align 2
  %11 = alloca i16, align 2
  %12 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 52, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 2, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 2, ptr %11) #3
  %13 = call ptr @ZeroMem(ptr noundef %7, i64 noundef 52)
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %14, i32 0, i32 14
  %16 = load ptr, ptr %15, align 8, !tbaa !9
  %17 = getelementptr inbounds %struct._UDP_IO, ptr %16, i32 0, i32 10
  %18 = load ptr, ptr %17, align 8, !tbaa !18
  store ptr %18, ptr %6, align 8, !tbaa !5
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %19, i32 0, i32 25
  %21 = load i8, ptr %20, align 1, !tbaa !19
  %22 = zext i8 %21 to i32
  %23 = icmp ne i32 %22, 0
  br i1 %23, label %24, label %28

24:                                               ; preds = %2
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %25, i32 0, i32 22
  %27 = load i32, ptr %26, align 4, !tbaa !20
  br label %33

28:                                               ; preds = %2
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %29, i32 0, i32 22
  %31 = load i32, ptr %30, align 4, !tbaa !20
  %32 = mul i32 %31, 2
  br label %33

33:                                               ; preds = %28, %24
  %34 = phi i32 [ %27, %24 ], [ %32, %28 ]
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %35, i32 0, i32 21
  store i32 %34, ptr %36, align 8, !tbaa !21
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = call ptr @NetbufGetByte(ptr noundef %37, i32 noundef 0, ptr noundef null)
  store ptr %38, ptr %9, align 8, !tbaa !5
  br label %39

39:                                               ; preds = %33
  %40 = call zeroext i8 @DebugAssertEnabled()
  %41 = icmp ne i8 %40, 0
  br i1 %41, label %42, label %47

42:                                               ; preds = %39
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = icmp ne ptr %43, null
  br i1 %44, label %46, label %45

45:                                               ; preds = %42
  call void @DebugAssert(ptr noundef @.str.1, i64 noundef 658, ptr noundef @.str.3)
  br label %46

46:                                               ; preds = %45, %42
  br label %47

47:                                               ; preds = %46, %39
  br label %48

48:                                               ; preds = %47
  br label %49

49:                                               ; preds = %48
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = load i16, ptr %50, align 2, !tbaa !22
  store i16 %51, ptr %10, align 2, !tbaa !22
  %52 = load i16, ptr %10, align 2, !tbaa !22
  %53 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %52)
  store i16 %53, ptr %11, align 2, !tbaa !22
  %54 = load i16, ptr %11, align 2, !tbaa !22
  %55 = zext i16 %54 to i32
  %56 = icmp eq i32 %55, 1
  br i1 %56, label %65, label %57

57:                                               ; preds = %49
  %58 = load i16, ptr %11, align 2, !tbaa !22
  %59 = zext i16 %58 to i32
  %60 = icmp eq i32 %59, 7
  br i1 %60, label %65, label %61

61:                                               ; preds = %57
  %62 = load i16, ptr %11, align 2, !tbaa !22
  %63 = zext i16 %62 to i32
  %64 = icmp eq i32 %63, 2
  br i1 %64, label %65, label %178

65:                                               ; preds = %61, %57, %49
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct._EFI_UDP6_PROTOCOL, ptr %66, i32 0, i32 1
  %68 = load ptr, ptr %67, align 8, !tbaa !23
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = call i64 %68(ptr noundef %69, ptr noundef null)
  store i64 %70, ptr %8, align 8, !tbaa !25
  %71 = load i64, ptr %8, align 8, !tbaa !25
  %72 = icmp slt i64 %71, 0
  br i1 %72, label %73, label %75

73:                                               ; preds = %65
  %74 = load i64, ptr %8, align 8, !tbaa !25
  store i64 %74, ptr %3, align 8
  store i32 1, ptr %12, align 4
  br label %274

75:                                               ; preds = %65
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %76, i32 0, i32 14
  %78 = load ptr, ptr %77, align 8, !tbaa !9
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %79, i32 0, i32 11
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %81, i32 0, i32 12
  %83 = load i16, ptr %82, align 8, !tbaa !26
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %84, i32 0, i32 5
  %86 = load ptr, ptr %85, align 8, !tbaa !27
  %87 = getelementptr inbounds %struct.EFI_MTFTP6_CONFIG_DATA, ptr %86, i32 0, i32 0
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %88, i32 0, i32 5
  %90 = load ptr, ptr %89, align 8, !tbaa !27
  %91 = getelementptr inbounds %struct.EFI_MTFTP6_CONFIG_DATA, ptr %90, i32 0, i32 1
  %92 = load i16, ptr %91, align 2, !tbaa !28
  %93 = call i64 @Mtftp6ConfigUdpIo(ptr noundef %78, ptr noundef %80, i16 noundef zeroext %83, ptr noundef %87, i16 noundef zeroext %92)
  store i64 %93, ptr %8, align 8, !tbaa !25
  %94 = load i64, ptr %8, align 8, !tbaa !25
  %95 = icmp slt i64 %94, 0
  br i1 %95, label %96, label %98

96:                                               ; preds = %75
  %97 = load i64, ptr %8, align 8, !tbaa !25
  store i64 %97, ptr %3, align 8
  store i32 1, ptr %12, align 4
  br label %274

98:                                               ; preds = %75
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct._EFI_UDP6_PROTOCOL, ptr %99, i32 0, i32 0
  %101 = load ptr, ptr %100, align 8, !tbaa !30
  %102 = load ptr, ptr %6, align 8, !tbaa !5
  %103 = call i64 %101(ptr noundef %102, ptr noundef %7, ptr noundef null, ptr noundef null, ptr noundef null)
  store i64 %103, ptr %8, align 8, !tbaa !25
  %104 = load i64, ptr %8, align 8, !tbaa !25
  %105 = icmp slt i64 %104, 0
  br i1 %105, label %106, label %108

106:                                              ; preds = %98
  %107 = load i64, ptr %8, align 8, !tbaa !25
  store i64 %107, ptr %3, align 8
  store i32 1, ptr %12, align 4
  br label %274

108:                                              ; preds = %98
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.NET_BUF, ptr %109, i32 0, i32 1
  %111 = load i64, ptr %110, align 8, !tbaa !31
  %112 = add nsw i64 %111, 1
  store i64 %112, ptr %110, align 8, !tbaa !31
  %113 = load ptr, ptr %4, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %113, i32 0, i32 24
  store i8 0, ptr %114, align 8, !tbaa !33
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %115, i32 0, i32 14
  %117 = load ptr, ptr %116, align 8, !tbaa !9
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %119, i32 0, i32 24
  %121 = call i64 @UdpIoSendDatagram(ptr noundef %117, ptr noundef %118, ptr noundef null, ptr noundef null, ptr noundef @Mtftp6OnPacketSent, ptr noundef %120)
  store i64 %121, ptr %8, align 8, !tbaa !25
  %122 = load i64, ptr %8, align 8, !tbaa !25
  %123 = icmp slt i64 %122, 0
  br i1 %123, label %124, label %130

124:                                              ; preds = %108
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.NET_BUF, ptr %125, i32 0, i32 1
  %127 = load i64, ptr %126, align 8, !tbaa !31
  %128 = add nsw i64 %127, -1
  store i64 %128, ptr %126, align 8, !tbaa !31
  %129 = load i64, ptr %8, align 8, !tbaa !25
  store i64 %129, ptr %3, align 8
  store i32 1, ptr %12, align 4
  br label %274

130:                                              ; preds = %108
  %131 = load ptr, ptr @gBS, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %131, i32 0, i32 2
  %133 = load ptr, ptr %132, align 8, !tbaa !34
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %134, i32 0, i32 23
  %136 = load i64, ptr %135, align 8, !tbaa !37
  call void %133(i64 noundef %136)
  br label %137

137:                                              ; preds = %143, %130
  %138 = load ptr, ptr %4, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %138, i32 0, i32 24
  %140 = load i8, ptr %139, align 8, !tbaa !33
  %141 = icmp ne i8 %140, 0
  %142 = xor i1 %141, true
  br i1 %142, label %143, label %149

143:                                              ; preds = %137
  %144 = load ptr, ptr %6, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct._EFI_UDP6_PROTOCOL, ptr %144, i32 0, i32 6
  %146 = load ptr, ptr %145, align 8, !tbaa !38
  %147 = load ptr, ptr %6, align 8, !tbaa !5
  %148 = call i64 %146(ptr noundef %147)
  br label %137, !llvm.loop !39

149:                                              ; preds = %137
  %150 = load ptr, ptr @gBS, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %150, i32 0, i32 1
  %152 = load ptr, ptr %151, align 8, !tbaa !41
  %153 = call i64 %152(i64 noundef 8)
  %154 = load ptr, ptr %4, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %154, i32 0, i32 23
  store i64 %153, ptr %155, align 8, !tbaa !37
  %156 = load ptr, ptr %6, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct._EFI_UDP6_PROTOCOL, ptr %156, i32 0, i32 1
  %158 = load ptr, ptr %157, align 8, !tbaa !23
  %159 = load ptr, ptr %6, align 8, !tbaa !5
  %160 = call i64 %158(ptr noundef %159, ptr noundef null)
  store i64 %160, ptr %8, align 8, !tbaa !25
  %161 = load i64, ptr %8, align 8, !tbaa !25
  %162 = icmp slt i64 %161, 0
  br i1 %162, label %163, label %165

163:                                              ; preds = %149
  %164 = load i64, ptr %8, align 8, !tbaa !25
  store i64 %164, ptr %3, align 8
  store i32 1, ptr %12, align 4
  br label %274

165:                                              ; preds = %149
  %166 = load ptr, ptr %4, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %166, i32 0, i32 14
  %168 = load ptr, ptr %167, align 8, !tbaa !9
  %169 = load ptr, ptr %4, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %169, i32 0, i32 11
  %171 = load ptr, ptr %4, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %171, i32 0, i32 13
  %173 = load i16, ptr %172, align 2, !tbaa !42
  %174 = getelementptr inbounds %struct.EFI_UDP6_CONFIG_DATA, ptr %7, i32 0, i32 7
  %175 = getelementptr inbounds %struct.EFI_UDP6_CONFIG_DATA, ptr %7, i32 0, i32 8
  %176 = load i16, ptr %175, align 4, !tbaa !43
  %177 = call i64 @Mtftp6ConfigUdpIo(ptr noundef %168, ptr noundef %170, i16 noundef zeroext %173, ptr noundef %174, i16 noundef zeroext %176)
  store i64 %177, ptr %8, align 8, !tbaa !25
  br label %272

178:                                              ; preds = %61
  %179 = load ptr, ptr %6, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct._EFI_UDP6_PROTOCOL, ptr %179, i32 0, i32 0
  %181 = load ptr, ptr %180, align 8, !tbaa !30
  %182 = load ptr, ptr %6, align 8, !tbaa !5
  %183 = call i64 %181(ptr noundef %182, ptr noundef %7, ptr noundef null, ptr noundef null, ptr noundef null)
  store i64 %183, ptr %8, align 8, !tbaa !25
  %184 = load i64, ptr %8, align 8, !tbaa !25
  %185 = icmp slt i64 %184, 0
  br i1 %185, label %186, label %188

186:                                              ; preds = %178
  %187 = load i64, ptr %8, align 8, !tbaa !25
  store i64 %187, ptr %3, align 8
  store i32 1, ptr %12, align 4
  br label %274

188:                                              ; preds = %178
  %189 = getelementptr inbounds %struct.EFI_UDP6_CONFIG_DATA, ptr %7, i32 0, i32 10
  %190 = load i16, ptr %189, align 2, !tbaa !45
  %191 = zext i16 %190 to i32
  %192 = load ptr, ptr %4, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %192, i32 0, i32 13
  %194 = load i16, ptr %193, align 2, !tbaa !42
  %195 = zext i16 %194 to i32
  %196 = icmp ne i32 %191, %195
  br i1 %196, label %197, label %225

197:                                              ; preds = %188
  %198 = load ptr, ptr %6, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct._EFI_UDP6_PROTOCOL, ptr %198, i32 0, i32 1
  %200 = load ptr, ptr %199, align 8, !tbaa !23
  %201 = load ptr, ptr %6, align 8, !tbaa !5
  %202 = call i64 %200(ptr noundef %201, ptr noundef null)
  store i64 %202, ptr %8, align 8, !tbaa !25
  %203 = load i64, ptr %8, align 8, !tbaa !25
  %204 = icmp slt i64 %203, 0
  br i1 %204, label %205, label %207

205:                                              ; preds = %197
  %206 = load i64, ptr %8, align 8, !tbaa !25
  store i64 %206, ptr %3, align 8
  store i32 1, ptr %12, align 4
  br label %274

207:                                              ; preds = %197
  %208 = load ptr, ptr %4, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %208, i32 0, i32 14
  %210 = load ptr, ptr %209, align 8, !tbaa !9
  %211 = load ptr, ptr %4, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %211, i32 0, i32 11
  %213 = load ptr, ptr %4, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %213, i32 0, i32 13
  %215 = load i16, ptr %214, align 2, !tbaa !42
  %216 = getelementptr inbounds %struct.EFI_UDP6_CONFIG_DATA, ptr %7, i32 0, i32 7
  %217 = getelementptr inbounds %struct.EFI_UDP6_CONFIG_DATA, ptr %7, i32 0, i32 8
  %218 = load i16, ptr %217, align 4, !tbaa !43
  %219 = call i64 @Mtftp6ConfigUdpIo(ptr noundef %210, ptr noundef %212, i16 noundef zeroext %215, ptr noundef %216, i16 noundef zeroext %218)
  store i64 %219, ptr %8, align 8, !tbaa !25
  %220 = load i64, ptr %8, align 8, !tbaa !25
  %221 = icmp slt i64 %220, 0
  br i1 %221, label %222, label %224

222:                                              ; preds = %207
  %223 = load i64, ptr %8, align 8, !tbaa !25
  store i64 %223, ptr %3, align 8
  store i32 1, ptr %12, align 4
  br label %274

224:                                              ; preds = %207
  br label %225

225:                                              ; preds = %224, %188
  %226 = load ptr, ptr %5, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.NET_BUF, ptr %226, i32 0, i32 1
  %228 = load i64, ptr %227, align 8, !tbaa !31
  %229 = add nsw i64 %228, 1
  store i64 %229, ptr %227, align 8, !tbaa !31
  %230 = load ptr, ptr %4, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %230, i32 0, i32 24
  store i8 0, ptr %231, align 8, !tbaa !33
  %232 = load ptr, ptr %4, align 8, !tbaa !5
  %233 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %232, i32 0, i32 14
  %234 = load ptr, ptr %233, align 8, !tbaa !9
  %235 = load ptr, ptr %5, align 8, !tbaa !5
  %236 = load ptr, ptr %4, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %236, i32 0, i32 24
  %238 = call i64 @UdpIoSendDatagram(ptr noundef %234, ptr noundef %235, ptr noundef null, ptr noundef null, ptr noundef @Mtftp6OnPacketSent, ptr noundef %237)
  store i64 %238, ptr %8, align 8, !tbaa !25
  %239 = load i64, ptr %8, align 8, !tbaa !25
  %240 = icmp slt i64 %239, 0
  br i1 %240, label %241, label %246

241:                                              ; preds = %225
  %242 = load ptr, ptr %5, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.NET_BUF, ptr %242, i32 0, i32 1
  %244 = load i64, ptr %243, align 8, !tbaa !31
  %245 = add nsw i64 %244, -1
  store i64 %245, ptr %243, align 8, !tbaa !31
  br label %246

246:                                              ; preds = %241, %225
  %247 = load ptr, ptr @gBS, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %247, i32 0, i32 2
  %249 = load ptr, ptr %248, align 8, !tbaa !34
  %250 = load ptr, ptr %4, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %250, i32 0, i32 23
  %252 = load i64, ptr %251, align 8, !tbaa !37
  call void %249(i64 noundef %252)
  br label %253

253:                                              ; preds = %259, %246
  %254 = load ptr, ptr %4, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %254, i32 0, i32 24
  %256 = load i8, ptr %255, align 8, !tbaa !33
  %257 = icmp ne i8 %256, 0
  %258 = xor i1 %257, true
  br i1 %258, label %259, label %265

259:                                              ; preds = %253
  %260 = load ptr, ptr %6, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct._EFI_UDP6_PROTOCOL, ptr %260, i32 0, i32 6
  %262 = load ptr, ptr %261, align 8, !tbaa !38
  %263 = load ptr, ptr %6, align 8, !tbaa !5
  %264 = call i64 %262(ptr noundef %263)
  br label %253, !llvm.loop !46

265:                                              ; preds = %253
  %266 = load ptr, ptr @gBS, align 8, !tbaa !5
  %267 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %266, i32 0, i32 1
  %268 = load ptr, ptr %267, align 8, !tbaa !41
  %269 = call i64 %268(i64 noundef 8)
  %270 = load ptr, ptr %4, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct._MTFTP6_INSTANCE, ptr %270, i32 0, i32 23
  store i64 %269, ptr %271, align 8, !tbaa !37
  br label %272

272:                                              ; preds = %265, %165
  %273 = load i64, ptr %8, align 8, !tbaa !25
  store i64 %273, ptr %3, align 8
  store i32 1, ptr %12, align 4
  br label %274

274:                                              ; preds = %272, %222, %205, %186, %163, %124, %106, %96, %73
  call void @llvm.lifetime.end.p0(i64 2, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 2, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 52, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %275 = load i64, ptr %3, align 8
  ret i64 %275
}

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

declare ptr @NetbufGetByte(ptr noundef, i32 noundef, ptr noundef) #2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 200}
!10 = !{!"_MTFTP6_INSTANCE", !11, i64 0, !6, i64 8, !12, i64 16, !13, i64 32, !6, i64 96, !6, i64 104, !6, i64 112, !14, i64 120, !15, i64 152, !15, i64 154, !12, i64 160, !16, i64 176, !15, i64 192, !15, i64 194, !6, i64 200, !16, i64 208, !15, i64 224, !6, i64 232, !6, i64 240, !11, i64 248, !11, i64 252, !11, i64 256, !11, i64 260, !17, i64 264, !7, i64 272, !7, i64 273, !7, i64 274}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!13 = !{!"_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}
!14 = !{!"", !15, i64 0, !7, i64 2, !11, i64 4, !16, i64 8, !15, i64 24, !7, i64 26, !11, i64 28}
!15 = !{!"short", !7, i64 0}
!16 = !{!"", !7, i64 0}
!17 = !{!"long long", !7, i64 0}
!18 = !{!7, !7, i64 0}
!19 = !{!10, !7, i64 273}
!20 = !{!10, !11, i64 260}
!21 = !{!10, !11, i64 256}
!22 = !{!15, !15, i64 0}
!23 = !{!24, !6, i64 8}
!24 = !{!"_EFI_UDP6_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!25 = !{!17, !17, i64 0}
!26 = !{!10, !15, i64 192}
!27 = !{!10, !6, i64 104}
!28 = !{!29, !15, i64 16}
!29 = !{!"", !16, i64 0, !15, i64 16, !16, i64 18, !15, i64 34, !15, i64 36, !15, i64 38}
!30 = !{!24, !6, i64 0}
!31 = !{!32, !17, i64 8}
!32 = !{!"", !11, i64 0, !17, i64 8, !12, i64 16, !7, i64 32, !6, i64 40, !6, i64 48, !7, i64 56, !6, i64 120, !11, i64 128, !11, i64 132, !7, i64 136}
!33 = !{!10, !7, i64 272}
!34 = !{!35, !6, i64 32}
!35 = !{!"", !36, 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}
!36 = !{!"", !17, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!37 = !{!10, !17, i64 264}
!38 = !{!24, !6, i64 48}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = !{!35, !6, i64 24}
!42 = !{!10, !15, i64 194}
!43 = !{!44, !15, i64 32}
!44 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !11, i64 8, !11, i64 12, !16, i64 16, !15, i64 32, !16, i64 34, !15, i64 50}
!45 = !{!44, !15, i64 50}
!46 = distinct !{!46, !40}


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

%struct.EFI_UDP6_CONFIG_DATA = type { i8, i8, i8, i8, i8, i32, i32, %struct.EFI_IPv6_ADDRESS, i16, %struct.EFI_IPv6_ADDRESS, i16 }
%struct.EFI_IPv6_ADDRESS = type { [16 x i8] }

@gBS = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [138 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [21 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

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

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

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

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #2

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

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

; Function Attrs: nounwind uwtable
define dso_local i64 @Mtftp6TransmitPacket(ptr noundef %0, ptr noundef %1) local_unnamed_addr #1 {
  %3 = alloca %struct.EFI_UDP6_CONFIG_DATA, align 4
  call void @llvm.lifetime.start.p0(i64 52, ptr nonnull %3) #3
  %4 = call ptr @ZeroMem(ptr noundef nonnull %3, i64 noundef 52) #3
  %5 = getelementptr inbounds i8, ptr %0, i64 200
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 744
  %8 = load ptr, ptr %7, align 8, !tbaa !17
  %9 = getelementptr inbounds i8, ptr %0, i64 273
  %10 = load i8, ptr %9, align 1, !tbaa !18
  %.not = icmp eq i8 %10, 0
  %11 = getelementptr inbounds i8, ptr %0, i64 260
  %12 = load i32, ptr %11, align 4, !tbaa !19
  %13 = zext i1 %.not to i32
  %14 = shl i32 %12, %13
  %15 = getelementptr inbounds i8, ptr %0, i64 256
  store i32 %14, ptr %15, align 8, !tbaa !20
  %16 = call ptr @NetbufGetByte(ptr noundef %1, i32 noundef 0, ptr noundef null) #3
  %17 = call zeroext i8 @DebugAssertEnabled() #3
  %18 = icmp eq i8 %17, 0
  %19 = icmp ne ptr %16, null
  %or.cond7 = select i1 %18, i1 true, i1 %19
  br i1 %or.cond7, label %21, label %20

20:                                               ; preds = %2
  call void @DebugAssert(ptr noundef nonnull @.str.1, i64 noundef 658, ptr noundef nonnull @.str.3) #3
  br label %21

21:                                               ; preds = %20, %2
  %22 = load i16, ptr %16, align 2, !tbaa !21
  %23 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %22) #3
  switch i16 %23, label %82 [
    i16 7, label %24
    i16 2, label %24
    i16 1, label %24
  ]

24:                                               ; preds = %21, %21, %21
  %25 = getelementptr inbounds i8, ptr %8, i64 8
  %26 = load ptr, ptr %25, align 8, !tbaa !22
  %27 = call i64 %26(ptr noundef %8, ptr noundef null) #3
  %28 = icmp slt i64 %27, 0
  br i1 %28, label %132, label %29

29:                                               ; preds = %24
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds i8, ptr %0, i64 176
  %32 = getelementptr inbounds i8, ptr %0, i64 192
  %33 = load i16, ptr %32, align 8, !tbaa !24
  %34 = getelementptr inbounds i8, ptr %0, i64 104
  %35 = load ptr, ptr %34, align 8, !tbaa !25
  %36 = getelementptr inbounds i8, ptr %35, i64 16
  %37 = load i16, ptr %36, align 2, !tbaa !26
  %38 = call i64 @Mtftp6ConfigUdpIo(ptr noundef %30, ptr noundef nonnull %31, i16 noundef zeroext %33, ptr noundef %35, i16 noundef zeroext %37)
  %39 = icmp slt i64 %38, 0
  br i1 %39, label %132, label %40

40:                                               ; preds = %29
  %41 = load ptr, ptr %8, align 8, !tbaa !28
  %42 = call i64 %41(ptr noundef nonnull %8, ptr noundef nonnull %3, ptr noundef null, ptr noundef null, ptr noundef null) #3
  %43 = icmp slt i64 %42, 0
  br i1 %43, label %132, label %44

44:                                               ; preds = %40
  %45 = getelementptr inbounds i8, ptr %1, i64 8
  %46 = load i64, ptr %45, align 8, !tbaa !29
  %47 = add nsw i64 %46, 1
  store i64 %47, ptr %45, align 8, !tbaa !29
  %48 = getelementptr inbounds i8, ptr %0, i64 272
  store i8 0, ptr %48, align 8, !tbaa !31
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = call i64 @UdpIoSendDatagram(ptr noundef %49, ptr noundef %1, ptr noundef null, ptr noundef null, ptr noundef nonnull @Mtftp6OnPacketSent, ptr noundef nonnull %48) #3
  %51 = icmp slt i64 %50, 0
  br i1 %51, label %52, label %55

52:                                               ; preds = %44
  %53 = load i64, ptr %45, align 8, !tbaa !29
  %54 = add nsw i64 %53, -1
  store i64 %54, ptr %45, align 8, !tbaa !29
  br label %132

55:                                               ; preds = %44
  %56 = load ptr, ptr @gBS, align 8, !tbaa !32
  %57 = getelementptr inbounds i8, ptr %56, i64 32
  %58 = load ptr, ptr %57, align 8, !tbaa !33
  %59 = getelementptr inbounds i8, ptr %0, i64 264
  %60 = load i64, ptr %59, align 8, !tbaa !36
  call void %58(i64 noundef %60) #3
  %61 = load i8, ptr %48, align 8, !tbaa !31
  %.not9293 = icmp eq i8 %61, 0
  br i1 %.not9293, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %55
  %62 = getelementptr inbounds i8, ptr %8, i64 48
  br label %63

63:                                               ; preds = %.lr.ph, %63
  %64 = load ptr, ptr %62, align 8, !tbaa !37
  %65 = call i64 %64(ptr noundef nonnull %8) #3
  %66 = load i8, ptr %48, align 8, !tbaa !31
  %.not92 = icmp eq i8 %66, 0
  br i1 %.not92, label %63, label %._crit_edge, !llvm.loop !38

._crit_edge:                                      ; preds = %63, %55
  %67 = load ptr, ptr @gBS, align 8, !tbaa !32
  %68 = getelementptr inbounds i8, ptr %67, i64 24
  %69 = load ptr, ptr %68, align 8, !tbaa !40
  %70 = call i64 %69(i64 noundef 8) #3
  store i64 %70, ptr %59, align 8, !tbaa !36
  %71 = load ptr, ptr %25, align 8, !tbaa !22
  %72 = call i64 %71(ptr noundef nonnull %8, ptr noundef null) #3
  %73 = icmp slt i64 %72, 0
  br i1 %73, label %132, label %74

74:                                               ; preds = %._crit_edge
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = getelementptr inbounds i8, ptr %0, i64 194
  %77 = load i16, ptr %76, align 2, !tbaa !41
  %78 = getelementptr inbounds i8, ptr %3, i64 16
  %79 = getelementptr inbounds i8, ptr %3, i64 32
  %80 = load i16, ptr %79, align 4, !tbaa !42
  %81 = call i64 @Mtftp6ConfigUdpIo(ptr noundef %75, ptr noundef nonnull %31, i16 noundef zeroext %77, ptr noundef nonnull %78, i16 noundef zeroext %80)
  br label %132

82:                                               ; preds = %21
  %83 = load ptr, ptr %8, align 8, !tbaa !28
  %84 = call i64 %83(ptr noundef nonnull %8, ptr noundef nonnull %3, ptr noundef null, ptr noundef null, ptr noundef null) #3
  %85 = icmp slt i64 %84, 0
  br i1 %85, label %132, label %86

86:                                               ; preds = %82
  %87 = getelementptr inbounds i8, ptr %3, i64 50
  %88 = load i16, ptr %87, align 2, !tbaa !44
  %89 = getelementptr inbounds i8, ptr %0, i64 194
  %90 = load i16, ptr %89, align 2, !tbaa !41
  %.not90 = icmp eq i16 %88, %90
  br i1 %.not90, label %105, label %91

91:                                               ; preds = %86
  %92 = getelementptr inbounds i8, ptr %8, i64 8
  %93 = load ptr, ptr %92, align 8, !tbaa !22
  %94 = call i64 %93(ptr noundef nonnull %8, ptr noundef null) #3
  %95 = icmp slt i64 %94, 0
  br i1 %95, label %132, label %96

96:                                               ; preds = %91
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = getelementptr inbounds i8, ptr %0, i64 176
  %99 = load i16, ptr %89, align 2, !tbaa !41
  %100 = getelementptr inbounds i8, ptr %3, i64 16
  %101 = getelementptr inbounds i8, ptr %3, i64 32
  %102 = load i16, ptr %101, align 4, !tbaa !42
  %103 = call i64 @Mtftp6ConfigUdpIo(ptr noundef %97, ptr noundef nonnull %98, i16 noundef zeroext %99, ptr noundef nonnull %100, i16 noundef zeroext %102)
  %104 = icmp slt i64 %103, 0
  br i1 %104, label %132, label %105

105:                                              ; preds = %96, %86
  %106 = getelementptr inbounds i8, ptr %1, i64 8
  %107 = load i64, ptr %106, align 8, !tbaa !29
  %108 = add nsw i64 %107, 1
  store i64 %108, ptr %106, align 8, !tbaa !29
  %109 = getelementptr inbounds i8, ptr %0, i64 272
  store i8 0, ptr %109, align 8, !tbaa !31
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = call i64 @UdpIoSendDatagram(ptr noundef %110, ptr noundef %1, ptr noundef null, ptr noundef null, ptr noundef nonnull @Mtftp6OnPacketSent, ptr noundef nonnull %109) #3
  %112 = icmp slt i64 %111, 0
  br i1 %112, label %113, label %116

113:                                              ; preds = %105
  %114 = load i64, ptr %106, align 8, !tbaa !29
  %115 = add nsw i64 %114, -1
  store i64 %115, ptr %106, align 8, !tbaa !29
  br label %116

116:                                              ; preds = %113, %105
  %117 = load ptr, ptr @gBS, align 8, !tbaa !32
  %118 = getelementptr inbounds i8, ptr %117, i64 32
  %119 = load ptr, ptr %118, align 8, !tbaa !33
  %120 = getelementptr inbounds i8, ptr %0, i64 264
  %121 = load i64, ptr %120, align 8, !tbaa !36
  call void %119(i64 noundef %121) #3
  %122 = load i8, ptr %109, align 8, !tbaa !31
  %.not9194 = icmp eq i8 %122, 0
  br i1 %.not9194, label %.lr.ph96, label %._crit_edge97

.lr.ph96:                                         ; preds = %116
  %123 = getelementptr inbounds i8, ptr %8, i64 48
  br label %124

124:                                              ; preds = %.lr.ph96, %124
  %125 = load ptr, ptr %123, align 8, !tbaa !37
  %126 = call i64 %125(ptr noundef nonnull %8) #3
  %127 = load i8, ptr %109, align 8, !tbaa !31
  %.not91 = icmp eq i8 %127, 0
  br i1 %.not91, label %124, label %._crit_edge97, !llvm.loop !45

._crit_edge97:                                    ; preds = %124, %116
  %128 = load ptr, ptr @gBS, align 8, !tbaa !32
  %129 = getelementptr inbounds i8, ptr %128, i64 24
  %130 = load ptr, ptr %129, align 8, !tbaa !40
  %131 = call i64 %130(i64 noundef 8) #3
  store i64 %131, ptr %120, align 8, !tbaa !36
  br label %132

132:                                              ; preds = %74, %._crit_edge97, %96, %91, %82, %._crit_edge, %40, %29, %24, %52
  %.0 = phi i64 [ %50, %52 ], [ %27, %24 ], [ %38, %29 ], [ %42, %40 ], [ %72, %._crit_edge ], [ %84, %82 ], [ %94, %91 ], [ %103, %96 ], [ %81, %74 ], [ %111, %._crit_edge97 ]
  call void @llvm.lifetime.end.p0(i64 52, ptr nonnull %3) #3
  ret i64 %.0
}

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

declare ptr @NetbufGetByte(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 200}
!6 = !{!"_MTFTP6_INSTANCE", !7, i64 0, !10, i64 8, !11, i64 16, !12, i64 32, !10, i64 96, !10, i64 104, !10, i64 112, !13, i64 120, !14, i64 152, !14, i64 154, !11, i64 160, !15, i64 176, !14, i64 192, !14, i64 194, !10, i64 200, !15, i64 208, !14, i64 224, !10, i64 232, !10, i64 240, !7, i64 248, !7, i64 252, !7, i64 256, !7, i64 260, !16, i64 264, !8, i64 272, !8, i64 273, !8, i64 274}
!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 = !{!"_EFI_MTFTP6_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56}
!13 = !{!"", !14, i64 0, !8, i64 2, !7, i64 4, !15, i64 8, !14, i64 24, !8, i64 26, !7, i64 28}
!14 = !{!"short", !8, i64 0}
!15 = !{!"", !8, i64 0}
!16 = !{!"long long", !8, i64 0}
!17 = !{!8, !8, i64 0}
!18 = !{!6, !8, i64 273}
!19 = !{!6, !7, i64 260}
!20 = !{!6, !7, i64 256}
!21 = !{!14, !14, i64 0}
!22 = !{!23, !10, i64 8}
!23 = !{!"_EFI_UDP6_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48}
!24 = !{!6, !14, i64 192}
!25 = !{!6, !10, i64 104}
!26 = !{!27, !14, i64 16}
!27 = !{!"", !15, i64 0, !14, i64 16, !15, i64 18, !14, i64 34, !14, i64 36, !14, i64 38}
!28 = !{!23, !10, i64 0}
!29 = !{!30, !16, i64 8}
!30 = !{!"", !7, i64 0, !16, i64 8, !11, i64 16, !8, i64 32, !10, i64 40, !10, i64 48, !8, i64 56, !10, i64 120, !7, i64 128, !7, i64 132, !8, i64 136}
!31 = !{!6, !8, i64 272}
!32 = !{!10, !10, i64 0}
!33 = !{!34, !10, i64 32}
!34 = !{!"", !35, i64 0, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !10, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360, !10, i64 368}
!35 = !{!"", !16, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!36 = !{!6, !16, i64 264}
!37 = !{!23, !10, i64 48}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = !{!34, !10, i64 24}
!41 = !{!6, !14, i64 194}
!42 = !{!43, !14, i64 32}
!43 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !8, i64 4, !7, i64 8, !7, i64 12, !15, i64 16, !14, i64 32, !15, i64 34, !14, i64 50}
!44 = !{!43, !14, i64 50}
!45 = distinct !{!45, !39}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass