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

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

%union.EFI_IP_ADDRESS = type { [4 x i32] }
%struct._IPSEC_SPD_ENTRY = type { ptr, ptr, %struct._LIST_ENTRY }
%struct._LIST_ENTRY = type { ptr, ptr }
%struct.IP4_HEAD = type { i8, i8, i16, i16, i16, i8, i8, i16, i32, i32 }
%struct._EFI_IP6_HEADER = type { i16, i16, i16, i8, i8, %struct.EFI_IPv6_ADDRESS, %struct.EFI_IPv6_ADDRESS }
%struct.EFI_IPv6_ADDRESS = type { [16 x i8] }
%struct._EFI_IPSEC_SPD_SELECTOR = type { i32, ptr, i32, ptr, i16, i16, i16, i16, i16 }
%struct._IPSEC_SPD_DATA = type { [100 x i16], i32, i32, ptr, %struct._LIST_ENTRY }

@.str = external hidden unnamed_addr constant [133 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [25 x i8], align 1

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i64 @IpSecLookupSpdEntry(ptr noundef %0, i8 noundef zeroext %1, ptr noundef %2, ptr noundef %3, i8 noundef zeroext %4, i8 noundef zeroext %5, ptr noundef %6) #2 {
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i8, align 1
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i8, align 1
  %14 = alloca i8, align 1
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca %union.EFI_IP_ADDRESS, align 4
  %20 = alloca %union.EFI_IP_ADDRESS, align 4
  %21 = alloca i8, align 1
  %22 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store i8 %1, ptr %10, align 1, !tbaa !9
  store ptr %2, ptr %11, align 8, !tbaa !5
  store ptr %3, ptr %12, align 8, !tbaa !5
  store i8 %4, ptr %13, align 1, !tbaa !9
  store i8 %5, ptr %14, align 1, !tbaa !9
  store ptr %6, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #3
  br label %23

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

26:                                               ; preds = %23
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = icmp ne ptr %27, null
  br i1 %28, label %30, label %29

29:                                               ; preds = %26
  call void @DebugAssert(ptr noundef @.str, i64 noundef 608, ptr noundef @.str.1)
  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 %9, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct._IPSEC_SPD_ENTRY, ptr %34, i32 0, i32 0
  %36 = load ptr, ptr %35, align 8, !tbaa !10
  store ptr %36, ptr %16, align 8, !tbaa !5
  %37 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %37, ptr %17, align 8, !tbaa !5
  %38 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %38, ptr %18, align 8, !tbaa !5
  %39 = call ptr @ZeroMem(ptr noundef %19, i64 noundef 16)
  %40 = call ptr @ZeroMem(ptr noundef %20, i64 noundef 16)
  %41 = load i8, ptr %10, align 1, !tbaa !9
  %42 = zext i8 %41 to i32
  %43 = icmp eq i32 %42, 4
  br i1 %43, label %44, label %51

44:                                               ; preds = %33
  %45 = load ptr, ptr %17, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.IP4_HEAD, ptr %45, i32 0, i32 8
  %47 = call ptr @CopyMem(ptr noundef %19, ptr noundef %46, i64 noundef 4)
  %48 = load ptr, ptr %17, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.IP4_HEAD, ptr %48, i32 0, i32 9
  %50 = call ptr @CopyMem(ptr noundef %20, ptr noundef %49, i64 noundef 4)
  br label %58

51:                                               ; preds = %33
  %52 = load ptr, ptr %18, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct._EFI_IP6_HEADER, ptr %52, i32 0, i32 5
  %54 = call ptr @CopyMem(ptr noundef %19, ptr noundef %53, i64 noundef 16)
  %55 = load ptr, ptr %18, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct._EFI_IP6_HEADER, ptr %55, i32 0, i32 6
  %57 = call ptr @CopyMem(ptr noundef %20, ptr noundef %56, i64 noundef 16)
  br label %58

58:                                               ; preds = %51, %44
  %59 = load i8, ptr %14, align 1, !tbaa !9
  %60 = zext i8 %59 to i32
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %84

62:                                               ; preds = %58
  %63 = load i8, ptr %10, align 1, !tbaa !9
  %64 = load ptr, ptr %16, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct._EFI_IPSEC_SPD_SELECTOR, ptr %64, i32 0, i32 1
  %66 = load ptr, ptr %65, align 8, !tbaa !13
  %67 = load ptr, ptr %16, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct._EFI_IPSEC_SPD_SELECTOR, ptr %67, i32 0, i32 0
  %69 = load i32, ptr %68, align 8, !tbaa !17
  %70 = call zeroext i8 @IpSecMatchIpAddress(i8 noundef zeroext %63, ptr noundef %19, ptr noundef %66, i32 noundef %69)
  %71 = zext i8 %70 to i32
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %73, label %84

73:                                               ; preds = %62
  %74 = load i8, ptr %10, align 1, !tbaa !9
  %75 = load ptr, ptr %16, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct._EFI_IPSEC_SPD_SELECTOR, ptr %75, i32 0, i32 3
  %77 = load ptr, ptr %76, align 8, !tbaa !18
  %78 = load ptr, ptr %16, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct._EFI_IPSEC_SPD_SELECTOR, ptr %78, i32 0, i32 2
  %80 = load i32, ptr %79, align 8, !tbaa !19
  %81 = call zeroext i8 @IpSecMatchIpAddress(i8 noundef zeroext %74, ptr noundef %20, ptr noundef %77, i32 noundef %80)
  %82 = zext i8 %81 to i32
  %83 = icmp ne i32 %82, 0
  br label %84

84:                                               ; preds = %73, %62, %58
  %85 = phi i1 [ false, %62 ], [ false, %58 ], [ %83, %73 ]
  %86 = zext i1 %85 to i32
  %87 = trunc i32 %86 to i8
  store i8 %87, ptr %21, align 1, !tbaa !9
  %88 = load i8, ptr %21, align 1, !tbaa !9
  %89 = zext i8 %88 to i32
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %118, label %91

91:                                               ; preds = %84
  %92 = load i8, ptr %14, align 1, !tbaa !9
  %93 = icmp ne i8 %92, 0
  br i1 %93, label %116, label %94

94:                                               ; preds = %91
  %95 = load i8, ptr %10, align 1, !tbaa !9
  %96 = load ptr, ptr %16, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct._EFI_IPSEC_SPD_SELECTOR, ptr %96, i32 0, i32 1
  %98 = load ptr, ptr %97, align 8, !tbaa !13
  %99 = load ptr, ptr %16, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct._EFI_IPSEC_SPD_SELECTOR, ptr %99, i32 0, i32 0
  %101 = load i32, ptr %100, align 8, !tbaa !17
  %102 = call zeroext i8 @IpSecMatchIpAddress(i8 noundef zeroext %95, ptr noundef %20, ptr noundef %98, i32 noundef %101)
  %103 = zext i8 %102 to i32
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %105, label %116

105:                                              ; preds = %94
  %106 = load i8, ptr %10, align 1, !tbaa !9
  %107 = load ptr, ptr %16, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct._EFI_IPSEC_SPD_SELECTOR, ptr %107, i32 0, i32 3
  %109 = load ptr, ptr %108, align 8, !tbaa !18
  %110 = load ptr, ptr %16, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct._EFI_IPSEC_SPD_SELECTOR, ptr %110, i32 0, i32 2
  %112 = load i32, ptr %111, align 8, !tbaa !19
  %113 = call zeroext i8 @IpSecMatchIpAddress(i8 noundef zeroext %106, ptr noundef %19, ptr noundef %109, i32 noundef %112)
  %114 = zext i8 %113 to i32
  %115 = icmp ne i32 %114, 0
  br label %116

116:                                              ; preds = %105, %94, %91
  %117 = phi i1 [ false, %94 ], [ false, %91 ], [ %115, %105 ]
  br label %118

118:                                              ; preds = %116, %84
  %119 = phi i1 [ true, %84 ], [ %117, %116 ]
  %120 = zext i1 %119 to i32
  %121 = trunc i32 %120 to i8
  store i8 %121, ptr %21, align 1, !tbaa !9
  %122 = load i8, ptr %21, align 1, !tbaa !9
  %123 = zext i8 %122 to i32
  %124 = icmp ne i32 %123, 0
  br i1 %124, label %125, label %141

125:                                              ; preds = %118
  %126 = load i8, ptr %13, align 1, !tbaa !9
  %127 = load ptr, ptr %12, align 8, !tbaa !5
  %128 = load ptr, ptr %16, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct._EFI_IPSEC_SPD_SELECTOR, ptr %128, i32 0, i32 4
  %130 = load i16, ptr %129, align 8, !tbaa !20
  %131 = load ptr, ptr %16, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct._EFI_IPSEC_SPD_SELECTOR, ptr %131, i32 0, i32 5
  %133 = load i16, ptr %132, align 2, !tbaa !21
  %134 = load ptr, ptr %16, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct._EFI_IPSEC_SPD_SELECTOR, ptr %134, i32 0, i32 7
  %136 = load i16, ptr %135, align 2, !tbaa !22
  %137 = load i8, ptr %14, align 1, !tbaa !9
  %138 = call zeroext i8 @IpSecMatchNextLayerProtocol(i8 noundef zeroext %126, ptr noundef %127, i16 noundef zeroext %130, i16 noundef zeroext %133, i16 noundef zeroext %136, i8 noundef zeroext %137)
  %139 = zext i8 %138 to i32
  %140 = icmp ne i32 %139, 0
  br label %141

141:                                              ; preds = %125, %118
  %142 = phi i1 [ false, %118 ], [ %140, %125 ]
  %143 = zext i1 %142 to i32
  %144 = trunc i32 %143 to i8
  store i8 %144, ptr %21, align 1, !tbaa !9
  %145 = load i8, ptr %21, align 1, !tbaa !9
  %146 = icmp ne i8 %145, 0
  br i1 %146, label %147, label %154

147:                                              ; preds = %141
  %148 = load ptr, ptr %9, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct._IPSEC_SPD_ENTRY, ptr %148, i32 0, i32 1
  %150 = load ptr, ptr %149, align 8, !tbaa !23
  %151 = getelementptr inbounds %struct._IPSEC_SPD_DATA, ptr %150, i32 0, i32 2
  %152 = load i32, ptr %151, align 4, !tbaa !24
  %153 = load ptr, ptr %15, align 8, !tbaa !5
  store i32 %152, ptr %153, align 4, !tbaa !26
  store i64 0, ptr %8, align 8
  store i32 1, ptr %22, align 4
  br label %155

154:                                              ; preds = %141
  store i64 -9223372036854775794, ptr %8, align 8
  store i32 1, ptr %22, align 4
  br label %155

155:                                              ; preds = %154, %147
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  %156 = load i64, ptr %8, align 8
  ret i64 %156
}

declare zeroext i8 @DebugAssertEnabled() #1

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !6, i64 0}
!11 = !{!"_IPSEC_SPD_ENTRY", !6, i64 0, !6, i64 8, !12, i64 16}
!12 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!13 = !{!14, !6, i64 8}
!14 = !{!"_EFI_IPSEC_SPD_SELECTOR", !15, i64 0, !6, i64 8, !15, i64 16, !6, i64 24, !16, i64 32, !16, i64 34, !16, i64 36, !16, i64 38, !16, i64 40}
!15 = !{!"int", !7, i64 0}
!16 = !{!"short", !7, i64 0}
!17 = !{!14, !15, i64 0}
!18 = !{!14, !6, i64 24}
!19 = !{!14, !15, i64 16}
!20 = !{!14, !16, i64 32}
!21 = !{!14, !16, i64 34}
!22 = !{!14, !16, i64 38}
!23 = !{!11, !6, i64 8}
!24 = !{!25, !15, i64 204}
!25 = !{!"_IPSEC_SPD_DATA", !7, i64 0, !15, i64 200, !15, i64 204, !6, i64 208, !12, i64 216}
!26 = !{!15, !15, i64 0}


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

%union.EFI_IP_ADDRESS = type { [4 x i32] }

@.str = external hidden unnamed_addr constant [133 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [25 x i8], align 1

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

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @IpSecMatchIpAddress(i8 noundef zeroext, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775794, 1) i64 @IpSecLookupSpdEntry(ptr noundef readonly %0, i8 noundef zeroext %1, ptr noundef %2, ptr noundef %3, i8 noundef zeroext %4, i8 noundef zeroext %5, ptr nocapture noundef writeonly %6) local_unnamed_addr #2 {
  %8 = alloca %union.EFI_IP_ADDRESS, align 4
  %9 = alloca %union.EFI_IP_ADDRESS, align 4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #3
  %10 = tail call zeroext i8 @DebugAssertEnabled() #3
  %11 = icmp eq i8 %10, 0
  %12 = icmp ne ptr %0, null
  %or.cond = or i1 %12, %11
  br i1 %or.cond, label %14, label %13

13:                                               ; preds = %7
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 608, ptr noundef nonnull @.str.1) #3
  br label %14

14:                                               ; preds = %13, %7
  %15 = load ptr, ptr %0, align 8, !tbaa !5
  %16 = call ptr @ZeroMem(ptr noundef nonnull %8, i64 noundef 16) #3
  %17 = call ptr @ZeroMem(ptr noundef nonnull %9, i64 noundef 16) #3
  %18 = icmp eq i8 %1, 4
  %. = select i1 %18, i64 12, i64 8
  %.53 = select i1 %18, i64 4, i64 16
  %.54 = select i1 %18, i64 16, i64 24
  %19 = getelementptr inbounds i8, ptr %2, i64 %.
  %20 = call ptr @CopyMem(ptr noundef nonnull %8, ptr noundef nonnull %19, i64 noundef %.53) #3
  %21 = getelementptr inbounds i8, ptr %2, i64 %.54
  %22 = call ptr @CopyMem(ptr noundef nonnull %9, ptr noundef nonnull %21, i64 noundef %.53) #3
  %cond = icmp eq i8 %5, 0
  %23 = getelementptr inbounds i8, ptr %15, i64 8
  %24 = load ptr, ptr %23, align 8, !tbaa !11
  %25 = load i32, ptr %15, align 8, !tbaa !15
  br i1 %cond, label %34, label %26

26:                                               ; preds = %14
  %27 = call zeroext i8 @IpSecMatchIpAddress(i8 noundef zeroext %1, ptr noundef nonnull %8, ptr noundef %24, i32 noundef %25)
  %.not35 = icmp eq i8 %27, 0
  br i1 %.not35, label %.critedge48, label %28

28:                                               ; preds = %26
  %29 = getelementptr inbounds i8, ptr %15, i64 24
  %30 = load ptr, ptr %29, align 8, !tbaa !16
  %31 = getelementptr inbounds i8, ptr %15, i64 16
  %32 = load i32, ptr %31, align 8, !tbaa !17
  %33 = call zeroext i8 @IpSecMatchIpAddress(i8 noundef zeroext %1, ptr noundef nonnull %9, ptr noundef %30, i32 noundef %32)
  %.not37 = icmp eq i8 %33, 0
  br i1 %.not37, label %.critedge48, label %.critedge47

34:                                               ; preds = %14
  %35 = call zeroext i8 @IpSecMatchIpAddress(i8 noundef zeroext %1, ptr noundef nonnull %9, ptr noundef %24, i32 noundef %25)
  %.not39 = icmp eq i8 %35, 0
  br i1 %.not39, label %.critedge48, label %36

36:                                               ; preds = %34
  %37 = getelementptr inbounds i8, ptr %15, i64 24
  %38 = load ptr, ptr %37, align 8, !tbaa !16
  %39 = getelementptr inbounds i8, ptr %15, i64 16
  %40 = load i32, ptr %39, align 8, !tbaa !17
  %41 = call zeroext i8 @IpSecMatchIpAddress(i8 noundef zeroext %1, ptr noundef nonnull %8, ptr noundef %38, i32 noundef %40)
  %.not41 = icmp eq i8 %41, 0
  br i1 %.not41, label %.critedge48, label %.critedge47

.critedge47:                                      ; preds = %28, %36
  %42 = getelementptr inbounds i8, ptr %15, i64 32
  %43 = load i16, ptr %42, align 8, !tbaa !18
  %44 = getelementptr inbounds i8, ptr %15, i64 34
  %45 = load i16, ptr %44, align 2, !tbaa !19
  %46 = getelementptr inbounds i8, ptr %15, i64 38
  %47 = load i16, ptr %46, align 2, !tbaa !20
  %48 = call zeroext i8 @IpSecMatchNextLayerProtocol(i8 noundef zeroext %4, ptr noundef %3, i16 noundef zeroext %43, i16 noundef zeroext %45, i16 noundef zeroext %47, i8 noundef zeroext %5)
  %.not43 = icmp eq i8 %48, 0
  br i1 %.not43, label %.critedge48, label %49

49:                                               ; preds = %.critedge47
  %50 = getelementptr inbounds i8, ptr %0, i64 8
  %51 = load ptr, ptr %50, align 8, !tbaa !21
  %52 = getelementptr inbounds i8, ptr %51, i64 204
  %53 = load i32, ptr %52, align 4, !tbaa !22
  store i32 %53, ptr %6, align 4, !tbaa !24
  br label %.critedge48

.critedge48:                                      ; preds = %28, %26, %.critedge47, %34, %36, %49
  %.0 = phi i64 [ 0, %49 ], [ -9223372036854775794, %36 ], [ -9223372036854775794, %34 ], [ -9223372036854775794, %.critedge47 ], [ -9223372036854775794, %26 ], [ -9223372036854775794, %28 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #3
  ret i64 %.0
}

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #1

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_IPSEC_SPD_ENTRY", !7, i64 0, !7, i64 8, !10, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"_LIST_ENTRY", !7, i64 0, !7, i64 8}
!11 = !{!12, !7, i64 8}
!12 = !{!"_EFI_IPSEC_SPD_SELECTOR", !13, i64 0, !7, i64 8, !13, i64 16, !7, i64 24, !14, i64 32, !14, i64 34, !14, i64 36, !14, i64 38, !14, i64 40}
!13 = !{!"int", !8, i64 0}
!14 = !{!"short", !8, i64 0}
!15 = !{!12, !13, i64 0}
!16 = !{!12, !7, i64 24}
!17 = !{!12, !13, i64 16}
!18 = !{!12, !14, i64 32}
!19 = !{!12, !14, i64 34}
!20 = !{!12, !14, i64 38}
!21 = !{!6, !7, i64 8}
!22 = !{!23, !13, i64 204}
!23 = !{!"_IPSEC_SPD_DATA", !8, i64 0, !13, i64 200, !13, i64 204, !7, i64 208, !10, i64 216}
!24 = !{!13, !13, i64 0}


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