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

; 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._IP4_PROTOCOL = type { i32, %struct._EFI_IP4_PROTOCOL, ptr, i64, ptr, %struct._LIST_ENTRY, %struct.NET_MAP, %struct.NET_MAP, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct.EFI_LOCK, ptr, %struct._LIST_ENTRY, ptr, ptr, i32, ptr, i32, %struct.EFI_IP4_CONFIG_DATA }
%struct._EFI_IP4_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.NET_MAP = type { %struct._LIST_ENTRY, %struct._LIST_ENTRY, i64 }
%struct.EFI_LOCK = type { i64, i64, i32 }
%struct._LIST_ENTRY = type { ptr, ptr }
%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.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._IP4_INTERFACE = type { i32, %struct._LIST_ENTRY, i64, i32, i32, i32, i32, i8, ptr, ptr, ptr, ptr, ptr, %struct._LIST_ENTRY, %struct._LIST_ENTRY, ptr, %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, i32, %struct._LIST_ENTRY, i8 }
%struct.EFI_MAC_ADDRESS = type { [32 x i8] }

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

; Function Attrs: nounwind uwtable
define dso_local i64 @EfiIp4Configure(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i8, align 1
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = 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 8, 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 1, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = icmp eq ptr %14, null
  br i1 %15, label %16, label %17

16:                                               ; preds = %2
  store i64 -9223372036854775806, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %150

17:                                               ; preds = %2
  %18 = call zeroext i8 @DebugAssertEnabled()
  %19 = zext i8 %18 to i32
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %21, label %31

21:                                               ; preds = %17
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = ptrtoint ptr %22 to i64
  %24 = sub i64 %23, ptrtoint (ptr getelementptr inbounds (%struct._IP4_PROTOCOL, ptr null, i32 0, i32 1) to i64)
  %25 = inttoptr i64 %24 to ptr
  %26 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %25, i32 0, i32 0
  %27 = load i32, ptr %26, align 8, !tbaa !9
  %28 = icmp ne i32 %27, 1345605705
  br i1 %28, label %29, label %31

29:                                               ; preds = %21
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1235, ptr noundef @.str.1)
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  br label %36

31:                                               ; preds = %21, %17
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = ptrtoint ptr %32 to i64
  %34 = sub i64 %33, ptrtoint (ptr getelementptr inbounds (%struct._IP4_PROTOCOL, ptr null, i32 0, i32 1) to i64)
  %35 = inttoptr i64 %34 to ptr
  br label %36

36:                                               ; preds = %31, %29
  %37 = phi ptr [ %30, %29 ], [ %35, %31 ]
  store ptr %37, ptr %6, align 8, !tbaa !5
  %38 = load ptr, ptr @gBS, align 8, !tbaa !5
  %39 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %38, i32 0, i32 1
  %40 = load ptr, ptr %39, align 8, !tbaa !19
  %41 = call i64 %40(i64 noundef 8)
  store i64 %41, ptr %8, align 8, !tbaa !22
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = icmp ne ptr %42, null
  br i1 %43, label %44, label %121

44:                                               ; preds = %36
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %45, i32 0, i32 6
  %47 = call ptr @CopyMem(ptr noundef %11, ptr noundef %46, i64 noundef 4)
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %48, i32 0, i32 7
  %50 = call ptr @CopyMem(ptr noundef %12, ptr noundef %49, i64 noundef 4)
  %51 = load i32, ptr %11, align 4, !tbaa !23
  %52 = call i32 @SwapBytes32(i32 noundef %51)
  store i32 %52, ptr %11, align 4, !tbaa !23
  %53 = load i32, ptr %12, align 4, !tbaa !23
  %54 = call i32 @SwapBytes32(i32 noundef %53)
  store i32 %54, ptr %12, align 4, !tbaa !23
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %55, i32 0, i32 5
  %57 = load i8, ptr %56, align 1, !tbaa !24
  %58 = icmp ne i8 %57, 0
  br i1 %58, label %67, label %59

59:                                               ; preds = %44
  %60 = load i32, ptr %11, align 4, !tbaa !23
  %61 = load i32, ptr %12, align 4, !tbaa !23
  %62 = call zeroext i8 @Ip4StationAddressValid(i32 noundef %60, i32 noundef %61)
  store i8 %62, ptr %10, align 1, !tbaa !25
  %63 = load i8, ptr %10, align 1, !tbaa !25
  %64 = icmp ne i8 %63, 0
  br i1 %64, label %66, label %65

65:                                               ; preds = %59
  store i64 -9223372036854775806, ptr %9, align 8, !tbaa !22
  br label %144

66:                                               ; preds = %59
  br label %67

67:                                               ; preds = %66, %44
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %68, i32 0, i32 3
  %70 = load i64, ptr %69, align 8, !tbaa !26
  %71 = icmp eq i64 %70, 1
  br i1 %71, label %72, label %120

72:                                               ; preds = %67
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %73, i32 0, i32 18
  store ptr %74, ptr %7, align 8, !tbaa !5
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %75, i32 0, i32 5
  %77 = load i8, ptr %76, align 1, !tbaa !24
  %78 = zext i8 %77 to i32
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %79, i32 0, i32 5
  %81 = load i8, ptr %80, align 1, !tbaa !24
  %82 = zext i8 %81 to i32
  %83 = icmp ne i32 %78, %82
  br i1 %83, label %84, label %85

84:                                               ; preds = %72
  store i64 -9223372036854775788, ptr %9, align 8, !tbaa !22
  br label %144

85:                                               ; preds = %72
  %86 = load ptr, ptr %7, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %86, i32 0, i32 5
  %88 = load i8, ptr %87, align 1, !tbaa !24
  %89 = icmp ne i8 %88, 0
  br i1 %89, label %105, label %90

90:                                               ; preds = %85
  %91 = load ptr, ptr %7, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %91, i32 0, i32 6
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %93, i32 0, i32 6
  %95 = call i64 @CompareMem(ptr noundef %92, ptr noundef %94, i64 noundef 4)
  %96 = icmp eq i64 %95, 0
  br i1 %96, label %97, label %104

97:                                               ; preds = %90
  %98 = load ptr, ptr %7, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %98, i32 0, i32 7
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %100, i32 0, i32 7
  %102 = call i64 @CompareMem(ptr noundef %99, ptr noundef %101, i64 noundef 4)
  %103 = icmp eq i64 %102, 0
  br i1 %103, label %105, label %104

104:                                              ; preds = %97, %90
  store i64 -9223372036854775788, ptr %9, align 8, !tbaa !22
  br label %144

105:                                              ; preds = %97, %85
  %106 = load ptr, ptr %7, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %106, i32 0, i32 5
  %108 = load i8, ptr %107, align 1, !tbaa !24
  %109 = zext i8 %108 to i32
  %110 = icmp ne i32 %109, 0
  br i1 %110, label %111, label %119

111:                                              ; preds = %105
  %112 = load ptr, ptr %6, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %112, i32 0, i32 11
  %114 = load ptr, ptr %113, align 8, !tbaa !27
  %115 = getelementptr inbounds %struct._IP4_INTERFACE, ptr %114, i32 0, i32 7
  %116 = load i8, ptr %115, align 8, !tbaa !28
  %117 = icmp ne i8 %116, 0
  br i1 %117, label %119, label %118

118:                                              ; preds = %111
  store i64 -9223372036854775791, ptr %9, align 8, !tbaa !22
  br label %144

119:                                              ; preds = %111, %105
  br label %120

120:                                              ; preds = %119, %67
  br label %121

121:                                              ; preds = %120, %36
  %122 = load ptr, ptr %5, align 8, !tbaa !5
  %123 = icmp ne ptr %122, null
  br i1 %123, label %124, label %128

124:                                              ; preds = %121
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = call i64 @Ip4ConfigProtocol(ptr noundef %125, ptr noundef %126)
  store i64 %127, ptr %9, align 8, !tbaa !22
  br label %139

128:                                              ; preds = %121
  %129 = load ptr, ptr %6, align 8, !tbaa !5
  %130 = call i64 @Ip4CleanProtocol(ptr noundef %129)
  store i64 %130, ptr %9, align 8, !tbaa !22
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %131, i32 0, i32 3
  %133 = load i64, ptr %132, align 8, !tbaa !26
  %134 = icmp eq i64 %133, 1
  br i1 %134, label %135, label %138

135:                                              ; preds = %128
  %136 = load ptr, ptr %6, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %136, i32 0, i32 3
  store i64 0, ptr %137, align 8, !tbaa !26
  br label %138

138:                                              ; preds = %135, %128
  br label %139

139:                                              ; preds = %138, %124
  %140 = load ptr, ptr %6, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %140, i32 0, i32 4
  %142 = load ptr, ptr %141, align 8, !tbaa !30
  %143 = call i64 @Ip4ServiceConfigMnp(ptr noundef %142, i8 noundef zeroext 0)
  br label %144

144:                                              ; preds = %139, %118, %104, %84, %65
  %145 = load ptr, ptr @gBS, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %145, i32 0, i32 2
  %147 = load ptr, ptr %146, align 8, !tbaa !31
  %148 = load i64, ptr %8, align 8, !tbaa !22
  call void %147(i64 noundef %148)
  %149 = load i64, ptr %9, align 8, !tbaa !22
  store i64 %149, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %150

150:                                              ; preds = %144, %16
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 1, 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 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %151 = load i64, ptr %3, align 8
  ret i64 %151
}

; 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

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

declare i32 @SwapBytes32(i32 noundef) #2

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

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

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

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

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

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

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, !11, i64 0}
!10 = !{!"_IP4_PROTOCOL", !11, i64 0, !12, i64 8, !6, i64 72, !13, i64 80, !6, i64 88, !14, i64 96, !15, i64 112, !15, i64 152, !14, i64 192, !14, i64 208, !16, i64 224, !6, i64 248, !14, i64 256, !6, i64 272, !6, i64 280, !11, i64 288, !6, i64 296, !11, i64 304, !17, i64 308}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_EFI_IP4_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}
!13 = !{!"long long", !7, i64 0}
!14 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!15 = !{!"", !14, i64 0, !14, i64 16, !13, i64 32}
!16 = !{!"", !13, i64 0, !13, i64 8, !11, i64 16}
!17 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !18, i64 6, !18, i64 10, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 17, !11, i64 20, !11, i64 24}
!18 = !{!"", !7, i64 0}
!19 = !{!20, !6, i64 24}
!20 = !{!"", !21, 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}
!21 = !{!"", !13, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!22 = !{!13, !13, i64 0}
!23 = !{!11, !11, i64 0}
!24 = !{!17, !7, i64 5}
!25 = !{!7, !7, i64 0}
!26 = !{!10, !13, i64 80}
!27 = !{!10, !6, i64 248}
!28 = !{!29, !7, i64 48}
!29 = !{!"_IP4_INTERFACE", !11, i64 0, !14, i64 8, !13, i64 24, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !7, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !14, i64 96, !14, i64 112, !6, i64 128, !18, i64 136, !18, i64 168, !11, i64 200, !14, i64 208, !7, i64 224}
!30 = !{!10, !6, i64 88}
!31 = !{!20, !6, i64 32}


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

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

; Function Attrs: nounwind uwtable
define dso_local i64 @EfiIp4Configure(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  %5 = icmp eq ptr %0, null
  br i1 %5, label %67, label %6

6:                                                ; preds = %2
  %7 = tail call zeroext i8 @DebugAssertEnabled() #3
  %.not = icmp eq i8 %7, 0
  %.pre = ptrtoint ptr %0 to i64
  %.pre42 = add i64 %.pre, -8
  %.pre44 = inttoptr i64 %.pre42 to ptr
  br i1 %.not, label %._crit_edge, label %8

8:                                                ; preds = %6
  %9 = load i32, ptr %.pre44, align 8, !tbaa !5
  %.not33 = icmp eq i32 %9, 1345605705
  br i1 %.not33, label %._crit_edge, label %10

10:                                               ; preds = %8
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 1235, ptr noundef nonnull @.str.1) #3
  br label %._crit_edge

._crit_edge:                                      ; preds = %6, %8, %10
  %11 = phi ptr [ %0, %10 ], [ %.pre44, %8 ], [ %.pre44, %6 ]
  %12 = load ptr, ptr @gBS, align 8, !tbaa !18
  %13 = getelementptr inbounds i8, ptr %12, i64 24
  %14 = load ptr, ptr %13, align 8, !tbaa !19
  %15 = tail call i64 %14(i64 noundef 8) #3
  %.not34 = icmp eq ptr %1, null
  br i1 %.not34, label %.critedge, label %16

16:                                               ; preds = %._crit_edge
  %17 = getelementptr inbounds i8, ptr %1, i64 6
  %18 = call ptr @CopyMem(ptr noundef nonnull %3, ptr noundef nonnull %17, i64 noundef 4) #3
  %19 = getelementptr inbounds i8, ptr %1, i64 10
  %20 = call ptr @CopyMem(ptr noundef nonnull %4, ptr noundef nonnull %19, i64 noundef 4) #3
  %21 = load i32, ptr %3, align 4, !tbaa !22
  %22 = call i32 @SwapBytes32(i32 noundef %21) #3
  store i32 %22, ptr %3, align 4, !tbaa !22
  %23 = load i32, ptr %4, align 4, !tbaa !22
  %24 = call i32 @SwapBytes32(i32 noundef %23) #3
  store i32 %24, ptr %4, align 4, !tbaa !22
  %25 = getelementptr inbounds i8, ptr %1, i64 5
  %26 = load i8, ptr %25, align 1, !tbaa !23
  %.not35 = icmp eq i8 %26, 0
  br i1 %.not35, label %27, label %30

27:                                               ; preds = %16
  %28 = load i32, ptr %3, align 4, !tbaa !22
  %29 = call zeroext i8 @Ip4StationAddressValid(i32 noundef %28, i32 noundef %24)
  %.not36 = icmp eq i8 %29, 0
  br i1 %.not36, label %63, label %30

30:                                               ; preds = %27, %16
  %31 = getelementptr inbounds i8, ptr %11, i64 80
  %32 = load i64, ptr %31, align 8, !tbaa !24
  %33 = icmp eq i64 %32, 1
  br i1 %33, label %34, label %52

34:                                               ; preds = %30
  %35 = getelementptr inbounds i8, ptr %11, i64 313
  %36 = load i8, ptr %35, align 1, !tbaa !23
  %37 = load i8, ptr %25, align 1, !tbaa !23
  %.not37 = icmp eq i8 %36, %37
  br i1 %.not37, label %38, label %63

38:                                               ; preds = %34
  %.not38 = icmp eq i8 %36, 0
  br i1 %.not38, label %39, label %.thread

39:                                               ; preds = %38
  %40 = getelementptr inbounds i8, ptr %11, i64 314
  %41 = call i64 @CompareMem(ptr noundef nonnull %40, ptr noundef nonnull %17, i64 noundef 4) #3
  %42 = icmp eq i64 %41, 0
  br i1 %42, label %43, label %63

43:                                               ; preds = %39
  %44 = getelementptr inbounds i8, ptr %11, i64 318
  %45 = call i64 @CompareMem(ptr noundef nonnull %44, ptr noundef nonnull %19, i64 noundef 4) #3
  %46 = icmp eq i64 %45, 0
  br i1 %46, label %47, label %63

47:                                               ; preds = %43
  %.pr = load i8, ptr %35, align 1, !tbaa !23
  %.not39 = icmp eq i8 %.pr, 0
  br i1 %.not39, label %52, label %.thread

.thread:                                          ; preds = %38, %47
  %48 = getelementptr inbounds i8, ptr %11, i64 248
  %49 = load ptr, ptr %48, align 8, !tbaa !25
  %50 = getelementptr inbounds i8, ptr %49, i64 48
  %51 = load i8, ptr %50, align 8, !tbaa !26
  %.not40 = icmp eq i8 %51, 0
  br i1 %.not40, label %63, label %52

52:                                               ; preds = %47, %.thread, %30
  %53 = call i64 @Ip4ConfigProtocol(ptr noundef nonnull %11, ptr noundef nonnull %1)
  br label %59

.critedge:                                        ; preds = %._crit_edge
  %54 = tail call i64 @Ip4CleanProtocol(ptr noundef %11)
  %55 = getelementptr inbounds i8, ptr %11, i64 80
  %56 = load i64, ptr %55, align 8, !tbaa !24
  %57 = icmp eq i64 %56, 1
  br i1 %57, label %58, label %59

58:                                               ; preds = %.critedge
  store i64 0, ptr %55, align 8, !tbaa !24
  br label %59

59:                                               ; preds = %.critedge, %58, %52
  %.029 = phi i64 [ %53, %52 ], [ %54, %58 ], [ %54, %.critedge ]
  %60 = getelementptr inbounds i8, ptr %11, i64 88
  %61 = load ptr, ptr %60, align 8, !tbaa !28
  %62 = call i64 @Ip4ServiceConfigMnp(ptr noundef %61, i8 noundef zeroext 0)
  br label %63

63:                                               ; preds = %.thread, %39, %43, %34, %27, %59
  %.1 = phi i64 [ %.029, %59 ], [ -9223372036854775806, %27 ], [ -9223372036854775788, %34 ], [ -9223372036854775788, %43 ], [ -9223372036854775788, %39 ], [ -9223372036854775791, %.thread ]
  %64 = load ptr, ptr @gBS, align 8, !tbaa !18
  %65 = getelementptr inbounds i8, ptr %64, i64 32
  %66 = load ptr, ptr %65, align 8, !tbaa !29
  call void %66(i64 noundef %15) #3
  br label %67

67:                                               ; preds = %2, %63
  %.0 = phi i64 [ %.1, %63 ], [ -9223372036854775806, %2 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  ret i64 %.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

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

declare i32 @SwapBytes32(i32 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

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

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

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

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

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

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, !7, i64 0}
!6 = !{!"_IP4_PROTOCOL", !7, i64 0, !10, i64 8, !11, i64 72, !12, i64 80, !11, i64 88, !13, i64 96, !14, i64 112, !14, i64 152, !13, i64 192, !13, i64 208, !15, i64 224, !11, i64 248, !13, i64 256, !11, i64 272, !11, i64 280, !7, i64 288, !11, i64 296, !7, i64 304, !16, i64 308}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"_EFI_IP4_PROTOCOL", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"long long", !8, i64 0}
!13 = !{!"_LIST_ENTRY", !11, i64 0, !11, i64 8}
!14 = !{!"", !13, i64 0, !13, i64 16, !12, i64 32}
!15 = !{!"", !12, i64 0, !12, i64 8, !7, i64 16}
!16 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !8, i64 4, !8, i64 5, !17, i64 6, !17, i64 10, !8, i64 14, !8, i64 15, !8, i64 16, !8, i64 17, !7, i64 20, !7, i64 24}
!17 = !{!"", !8, i64 0}
!18 = !{!11, !11, i64 0}
!19 = !{!20, !11, i64 24}
!20 = !{!"", !21, i64 0, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !11, i64 176, !11, i64 184, !11, i64 192, !11, i64 200, !11, i64 208, !11, i64 216, !11, i64 224, !11, i64 232, !11, i64 240, !11, i64 248, !11, i64 256, !11, i64 264, !11, i64 272, !11, i64 280, !11, i64 288, !11, i64 296, !11, i64 304, !11, i64 312, !11, i64 320, !11, i64 328, !11, i64 336, !11, i64 344, !11, i64 352, !11, i64 360, !11, i64 368}
!21 = !{!"", !12, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!22 = !{!7, !7, i64 0}
!23 = !{!16, !8, i64 5}
!24 = !{!6, !12, i64 80}
!25 = !{!6, !11, i64 248}
!26 = !{!27, !8, i64 48}
!27 = !{!"_IP4_INTERFACE", !7, i64 0, !13, i64 8, !12, i64 24, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !8, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !13, i64 96, !13, i64 112, !11, i64 128, !17, i64 136, !17, i64 168, !7, i64 200, !13, i64 208, !8, i64 224}
!28 = !{!6, !11, i64 88}
!29 = !{!20, !11, i64 32}


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