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

; 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_DEVICE_PATH_PROTOCOL = type { i8, i8, [2 x i8] }

@.str.5 = external hidden unnamed_addr constant [6 x i32], align 4

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

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

declare i64 @StrLen(ptr noundef) #1

; 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
define dso_local i64 @GetDevicePath(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca [2 x i16], align 2
  %10 = alloca i64, align 8
  %11 = alloca i8, align 1
  %12 = alloca ptr, align 8
  %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 4, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = icmp eq ptr %14, null
  br i1 %15, label %19, label %16

16:                                               ; preds = %2
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = icmp eq ptr %17, null
  br i1 %18, label %19, label %20

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

20:                                               ; preds = %16
  br label %21

21:                                               ; preds = %34, %20
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = load i16, ptr %22, align 2, !tbaa !9
  %24 = zext i16 %23 to i32
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %26, label %31

26:                                               ; preds = %21
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = call i64 @StrLen(ptr noundef @.str.5)
  %29 = call i64 @StrnCmp(ptr noundef %27, ptr noundef @.str.5, i64 noundef %28)
  %30 = icmp ne i64 %29, 0
  br label %31

31:                                               ; preds = %26, %21
  %32 = phi i1 [ false, %21 ], [ %30, %26 ]
  br i1 %32, label %33, label %37

33:                                               ; preds = %31
  br label %34

34:                                               ; preds = %33
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = getelementptr inbounds i16, ptr %35, i32 1
  store ptr %36, ptr %4, align 8, !tbaa !5
  br label %21, !llvm.loop !11

37:                                               ; preds = %31
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = load i16, ptr %38, align 2, !tbaa !9
  %40 = zext i16 %39 to i32
  %41 = icmp eq i32 %40, 0
  br i1 %41, label %42, label %43

42:                                               ; preds = %37
  store i64 -9223372036854775806, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %162

43:                                               ; preds = %37
  %44 = call i64 @StrLen(ptr noundef @.str.5)
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = getelementptr inbounds i16, ptr %45, i64 %44
  store ptr %46, ptr %4, align 8, !tbaa !5
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = load i16, ptr %47, align 2, !tbaa !9
  %49 = zext i16 %48 to i32
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %52

51:                                               ; preds = %43
  store i64 -9223372036854775806, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %162

52:                                               ; preds = %43
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %53, ptr %7, align 8, !tbaa !5
  store i64 0, ptr %6, align 8, !tbaa !13
  br label %54

54:                                               ; preds = %67, %52
  %55 = load ptr, ptr %4, align 8, !tbaa !5
  %56 = load i16, ptr %55, align 2, !tbaa !9
  %57 = zext i16 %56 to i32
  %58 = icmp ne i32 %57, 0
  br i1 %58, label %59, label %64

59:                                               ; preds = %54
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = load i16, ptr %60, align 2, !tbaa !9
  %62 = zext i16 %61 to i32
  %63 = icmp ne i32 %62, 38
  br label %64

64:                                               ; preds = %59, %54
  %65 = phi i1 [ false, %54 ], [ %63, %59 ]
  br i1 %65, label %66, label %72

66:                                               ; preds = %64
  br label %67

67:                                               ; preds = %66
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds i16, ptr %68, i32 1
  store ptr %69, ptr %4, align 8, !tbaa !5
  %70 = load i64, ptr %6, align 8, !tbaa !13
  %71 = add i64 %70, 1
  store i64 %71, ptr %6, align 8, !tbaa !13
  br label %54, !llvm.loop !15

72:                                               ; preds = %64
  %73 = load i64, ptr %6, align 8, !tbaa !13
  %74 = add i64 %73, 1
  %75 = udiv i64 %74, 2
  %76 = icmp ult i64 %75, 4
  br i1 %76, label %77, label %78

77:                                               ; preds = %72
  store i64 -9223372036854775794, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %162

78:                                               ; preds = %72
  %79 = load i64, ptr %6, align 8, !tbaa !13
  %80 = add i64 %79, 1
  %81 = udiv i64 %80, 2
  %82 = call ptr @AllocateZeroPool(i64 noundef %81)
  store ptr %82, ptr %8, align 8, !tbaa !5
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  %84 = icmp eq ptr %83, null
  br i1 %84, label %85, label %86

85:                                               ; preds = %78
  store i64 -9223372036854775799, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %162

86:                                               ; preds = %78
  %87 = getelementptr inbounds [2 x i16], ptr %9, i64 0, i64 0
  %88 = call ptr @ZeroMem(ptr noundef %87, i64 noundef 4)
  store i64 0, ptr %10, align 8, !tbaa !13
  br label %89

89:                                               ; preds = %128, %86
  %90 = load i64, ptr %10, align 8, !tbaa !13
  %91 = load i64, ptr %6, align 8, !tbaa !13
  %92 = icmp ult i64 %90, %91
  br i1 %92, label %93, label %131

93:                                               ; preds = %89
  %94 = load ptr, ptr %7, align 8, !tbaa !5
  %95 = load i64, ptr %10, align 8, !tbaa !13
  %96 = getelementptr inbounds i16, ptr %94, i64 %95
  %97 = load i16, ptr %96, align 2, !tbaa !9
  %98 = getelementptr inbounds [2 x i16], ptr %9, i64 0, i64 0
  store i16 %97, ptr %98, align 2, !tbaa !9
  %99 = getelementptr inbounds [2 x i16], ptr %9, i64 0, i64 0
  %100 = call i64 @StrHexToUint64(ptr noundef %99)
  %101 = trunc i64 %100 to i8
  store i8 %101, ptr %11, align 1, !tbaa !16
  %102 = load i64, ptr %10, align 8, !tbaa !13
  %103 = and i64 %102, 1
  %104 = icmp eq i64 %103, 0
  br i1 %104, label %105, label %111

105:                                              ; preds = %93
  %106 = load i8, ptr %11, align 1, !tbaa !16
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  %108 = load i64, ptr %10, align 8, !tbaa !13
  %109 = udiv i64 %108, 2
  %110 = getelementptr inbounds i8, ptr %107, i64 %109
  store i8 %106, ptr %110, align 1, !tbaa !16
  br label %127

111:                                              ; preds = %93
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  %113 = load i64, ptr %10, align 8, !tbaa !13
  %114 = udiv i64 %113, 2
  %115 = getelementptr inbounds i8, ptr %112, i64 %114
  %116 = load i8, ptr %115, align 1, !tbaa !16
  %117 = zext i8 %116 to i32
  %118 = shl i32 %117, 4
  %119 = load i8, ptr %11, align 1, !tbaa !16
  %120 = zext i8 %119 to i32
  %121 = add nsw i32 %118, %120
  %122 = trunc i32 %121 to i8
  %123 = load ptr, ptr %8, align 8, !tbaa !5
  %124 = load i64, ptr %10, align 8, !tbaa !13
  %125 = udiv i64 %124, 2
  %126 = getelementptr inbounds i8, ptr %123, i64 %125
  store i8 %122, ptr %126, align 1, !tbaa !16
  br label %127

127:                                              ; preds = %111, %105
  br label %128

128:                                              ; preds = %127
  %129 = load i64, ptr %10, align 8, !tbaa !13
  %130 = add i64 %129, 1
  store i64 %130, ptr %10, align 8, !tbaa !13
  br label %89, !llvm.loop !17

131:                                              ; preds = %89
  %132 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %132, ptr %12, align 8, !tbaa !5
  br label %133

133:                                              ; preds = %156, %131
  %134 = load ptr, ptr %12, align 8, !tbaa !5
  %135 = call zeroext i8 @IsDevicePathEnd(ptr noundef %134)
  %136 = icmp ne i8 %135, 0
  %137 = xor i1 %136, true
  br i1 %137, label %138, label %159

138:                                              ; preds = %133
  %139 = load ptr, ptr %12, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.EFI_DEVICE_PATH_PROTOCOL, ptr %139, i32 0, i32 0
  %141 = load i8, ptr %140, align 1, !tbaa !18
  %142 = zext i8 %141 to i32
  %143 = icmp eq i32 %142, 0
  br i1 %143, label %154, label %144

144:                                              ; preds = %138
  %145 = load ptr, ptr %12, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.EFI_DEVICE_PATH_PROTOCOL, ptr %145, i32 0, i32 1
  %147 = load i8, ptr %146, align 1, !tbaa !20
  %148 = zext i8 %147 to i32
  %149 = icmp eq i32 %148, 0
  br i1 %149, label %154, label %150

150:                                              ; preds = %144
  %151 = load ptr, ptr %12, align 8, !tbaa !5
  %152 = call i64 @DevicePathNodeLength(ptr noundef %151)
  %153 = icmp ult i64 %152, 4
  br i1 %153, label %154, label %156

154:                                              ; preds = %150, %144, %138
  %155 = load ptr, ptr %8, align 8, !tbaa !5
  call void @FreePool(ptr noundef %155)
  store i64 -9223372036854775794, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %162

156:                                              ; preds = %150
  %157 = load ptr, ptr %12, align 8, !tbaa !5
  %158 = call ptr @NextDevicePathNode(ptr noundef %157)
  store ptr %158, ptr %12, align 8, !tbaa !5
  br label %133, !llvm.loop !21

159:                                              ; preds = %133
  %160 = load ptr, ptr %8, align 8, !tbaa !5
  %161 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %160, ptr %161, align 8, !tbaa !5
  store i64 0, ptr %3, align 8
  store i32 1, ptr %13, align 4
  br label %162

162:                                              ; preds = %159, %154, %85, %77, %51, %42, %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, 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
  %163 = load i64, ptr %3, align 8
  ret i64 %163
}

declare ptr @AllocateZeroPool(i64 noundef) #1

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

declare i64 @StrHexToUint64(ptr noundef) #1

declare zeroext i8 @IsDevicePathEnd(ptr noundef) #1

declare i64 @DevicePathNodeLength(ptr noundef) #1

declare void @FreePool(ptr noundef) #1

declare ptr @NextDevicePathNode(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 = !{!10, !10, i64 0}
!10 = !{!"short", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"long long", !7, i64 0}
!15 = distinct !{!15, !12}
!16 = !{!7, !7, i64 0}
!17 = distinct !{!17, !12}
!18 = !{!19, !7, i64 0}
!19 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2}
!20 = !{!19, !7, i64 1}
!21 = distinct !{!21, !12}


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

@.str.5 = external hidden unnamed_addr constant [6 x i32], align 4

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

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

declare i64 @StrLen(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775806, 1) i64 @GetDevicePath(ptr noundef %0, ptr noundef writeonly %1) local_unnamed_addr #2 {
  %3 = alloca [2 x i16], align 2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #3
  %4 = icmp eq ptr %0, null
  %5 = icmp eq ptr %1, null
  %or.cond = or i1 %4, %5
  br i1 %or.cond, label %.critedge.thread, label %.preheader56

.preheader56:                                     ; preds = %2
  %6 = load i16, ptr %0, align 2, !tbaa !5
  %.not58 = icmp eq i16 %6, 0
  br i1 %.not58, label %.critedge.thread, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader56, %9
  %.04459 = phi ptr [ %10, %9 ], [ %0, %.preheader56 ]
  %7 = tail call i64 @StrLen(ptr noundef nonnull @.str.5) #3
  %8 = tail call i64 @StrnCmp(ptr noundef nonnull %.04459, ptr noundef nonnull @.str.5, i64 noundef %7) #3
  %.not50 = icmp eq i64 %8, 0
  br i1 %.not50, label %.critedge, label %9

9:                                                ; preds = %.lr.ph
  %10 = getelementptr inbounds i8, ptr %.04459, i64 2
  %11 = load i16, ptr %10, align 2, !tbaa !5
  %.not = icmp eq i16 %11, 0
  br i1 %.not, label %.critedge.thread, label %.lr.ph, !llvm.loop !9

.critedge:                                        ; preds = %.lr.ph
  %.pr = load i16, ptr %.04459, align 2, !tbaa !5
  %12 = icmp eq i16 %.pr, 0
  br i1 %12, label %.critedge.thread, label %13

13:                                               ; preds = %.critedge
  %14 = tail call i64 @StrLen(ptr noundef nonnull @.str.5) #3
  %15 = getelementptr inbounds i16, ptr %.04459, i64 %14
  %16 = load i16, ptr %15, align 2, !tbaa !5
  %17 = icmp eq i16 %16, 0
  br i1 %17, label %.critedge.thread, label %.preheader55

.preheader55:                                     ; preds = %13, %19
  %18 = phi i16 [ %.pr54, %19 ], [ %16, %13 ]
  %.045 = phi i64 [ %21, %19 ], [ 0, %13 ]
  %.1 = phi ptr [ %20, %19 ], [ %15, %13 ]
  switch i16 %18, label %19 [
    i16 0, label %.critedge3
    i16 38, label %.critedge3
  ]

19:                                               ; preds = %.preheader55
  %20 = getelementptr inbounds i8, ptr %.1, i64 2
  %21 = add i64 %.045, 1
  %.pr54 = load i16, ptr %20, align 2, !tbaa !5
  br label %.preheader55, !llvm.loop !11

.critedge3:                                       ; preds = %.preheader55, %.preheader55
  %22 = add i64 %.045, 1
  %23 = icmp ult i64 %22, 8
  br i1 %23, label %.critedge.thread, label %24

24:                                               ; preds = %.critedge3
  %25 = lshr i64 %22, 1
  %26 = tail call ptr @AllocateZeroPool(i64 noundef %25) #3
  %27 = icmp eq ptr %26, null
  br i1 %27, label %.critedge.thread, label %.lr.ph61.preheader

.lr.ph61.preheader:                               ; preds = %24
  %28 = call ptr @ZeroMem(ptr noundef nonnull %3, i64 noundef 4) #3
  br label %.lr.ph61

.preheader:                                       ; preds = %46
  %29 = call zeroext i8 @IsDevicePathEnd(ptr noundef nonnull %26) #3
  %.not5362 = icmp eq i8 %29, 0
  br i1 %.not5362, label %.lr.ph64, label %._crit_edge

.lr.ph61:                                         ; preds = %.lr.ph61.preheader, %46
  %.04360 = phi i64 [ %47, %46 ], [ 0, %.lr.ph61.preheader ]
  %30 = getelementptr inbounds i16, ptr %15, i64 %.04360
  %31 = load i16, ptr %30, align 2, !tbaa !5
  store i16 %31, ptr %3, align 2, !tbaa !5
  %32 = call i64 @StrHexToUint64(ptr noundef nonnull %3) #3
  %33 = and i64 %.04360, 1
  %34 = icmp eq i64 %33, 0
  br i1 %34, label %35, label %39

35:                                               ; preds = %.lr.ph61
  %36 = trunc i64 %32 to i8
  %37 = lshr exact i64 %.04360, 1
  %38 = getelementptr inbounds i8, ptr %26, i64 %37
  store i8 %36, ptr %38, align 1, !tbaa !12
  br label %46

39:                                               ; preds = %.lr.ph61
  %40 = lshr i64 %.04360, 1
  %41 = getelementptr inbounds i8, ptr %26, i64 %40
  %42 = load i8, ptr %41, align 1, !tbaa !12
  %43 = shl i8 %42, 4
  %44 = trunc i64 %32 to i8
  %45 = add i8 %43, %44
  store i8 %45, ptr %41, align 1, !tbaa !12
  br label %46

46:                                               ; preds = %35, %39
  %47 = add nuw i64 %.04360, 1
  %exitcond.not = icmp eq i64 %47, %.045
  br i1 %exitcond.not, label %.preheader, label %.lr.ph61, !llvm.loop !13

.lr.ph64:                                         ; preds = %.preheader, %58
  %.063 = phi ptr [ %59, %58 ], [ %26, %.preheader ]
  %48 = load i8, ptr %.063, align 1, !tbaa !14
  %49 = icmp eq i8 %48, 0
  br i1 %49, label %57, label %50

50:                                               ; preds = %.lr.ph64
  %51 = getelementptr inbounds i8, ptr %.063, i64 1
  %52 = load i8, ptr %51, align 1, !tbaa !16
  %53 = icmp eq i8 %52, 0
  br i1 %53, label %57, label %54

54:                                               ; preds = %50
  %55 = call i64 @DevicePathNodeLength(ptr noundef nonnull %.063) #3
  %56 = icmp ult i64 %55, 4
  br i1 %56, label %57, label %58

57:                                               ; preds = %54, %50, %.lr.ph64
  call void @FreePool(ptr noundef nonnull %26) #3
  br label %.critedge.thread

58:                                               ; preds = %54
  %59 = call ptr @NextDevicePathNode(ptr noundef nonnull %.063) #3
  %60 = call zeroext i8 @IsDevicePathEnd(ptr noundef %59) #3
  %.not53 = icmp eq i8 %60, 0
  br i1 %.not53, label %.lr.ph64, label %._crit_edge, !llvm.loop !17

._crit_edge:                                      ; preds = %58, %.preheader
  store ptr %26, ptr %1, align 8, !tbaa !18
  br label %.critedge.thread

.critedge.thread:                                 ; preds = %9, %.preheader56, %24, %.critedge3, %13, %.critedge, %2, %._crit_edge, %57
  %.042 = phi i64 [ -9223372036854775794, %57 ], [ 0, %._crit_edge ], [ -9223372036854775806, %2 ], [ -9223372036854775806, %.critedge ], [ -9223372036854775806, %13 ], [ -9223372036854775794, %.critedge3 ], [ -9223372036854775799, %24 ], [ -9223372036854775806, %.preheader56 ], [ -9223372036854775806, %9 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #3
  ret i64 %.042
}

declare ptr @AllocateZeroPool(i64 noundef) local_unnamed_addr #1

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

declare i64 @StrHexToUint64(ptr noundef) local_unnamed_addr #1

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

declare i64 @DevicePathNodeLength(ptr noundef) local_unnamed_addr #1

declare void @FreePool(ptr noundef) local_unnamed_addr #1

declare ptr @NextDevicePathNode(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, !6, i64 0}
!6 = !{!"short", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = !{!7, !7, i64 0}
!13 = distinct !{!13, !10}
!14 = !{!15, !7, i64 0}
!15 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2}
!16 = !{!15, !7, i64 1}
!17 = distinct !{!17, !10}
!18 = !{!19, !19, i64 0}
!19 = !{!"any pointer", !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass