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

; 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._ISCSI_DRIVER_DATA = type { i32, ptr, ptr, %struct._ISCSI_PRIVATE_PROTOCOL, ptr, ptr, %struct._EFI_EXT_SCSI_PASS_THRU_PROTOCOL, %struct.EFI_EXT_SCSI_PASS_THRU_MODE, ptr, ptr, %struct._ISCSI_SESSION }
%struct._ISCSI_PRIVATE_PROTOCOL = type { i32 }
%struct._EFI_EXT_SCSI_PASS_THRU_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_EXT_SCSI_PASS_THRU_MODE = type { i32, i32, i32 }
%struct._ISCSI_SESSION = type { i32, %struct._ISCSI_SESSION_CONFIG_DATA, %struct._ISCSI_CHAP_AUTH_DATA, [224 x i8], i64, i8, [6 x i8], i16, i32, i32, i32, i32, i16, %struct._LIST_ENTRY, i32, %struct._LIST_ENTRY, i16, i32, i8, i8, i32, i32, i32, i32, i16, i8, i8, i8 }
%struct._ISCSI_SESSION_CONFIG_DATA = type { %struct.ISCSI_SESSION_CONFIG_NVDATA, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS }
%struct.ISCSI_SESSION_CONFIG_NVDATA = type <{ i8, i8, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, i8, [224 x i8], %struct.EFI_IPv4_ADDRESS, i16, [8 x i8], [6 x i8] }>
%struct.EFI_IPv4_ADDRESS = type { [4 x i8] }
%struct._ISCSI_CHAP_AUTH_DATA = type { %struct._ISCSI_CHAP_AUTH_CONFIG_NVDATA, i32, [1024 x i8], i32, [16 x i8], i32, [1024 x i8], i32 }
%struct._ISCSI_CHAP_AUTH_CONFIG_NVDATA = type { i8, [127 x i8], [17 x i8], [127 x i8], [17 x i8] }
%struct._LIST_ENTRY = type { ptr, ptr }
%struct.EFI_DEVICE_PATH_PROTOCOL = type { i8, i8, [2 x i8] }
%struct.ISCSI_DEVICE_PATH = type <{ %struct.EFI_DEVICE_PATH_PROTOCOL, i16, i16, i64, i16 }>

@.str = external hidden unnamed_addr constant [164 x i8], align 1
@.str.1 = 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

declare zeroext i8 @DebugAssertEnabled() #1

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

declare i64 @CompareMem(ptr noundef, 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
define dso_local i64 @IScsiExtScsiPassThruBuildDevicePath(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3) #2 {
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i64 %2, ptr %8, align 8, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %17 = load ptr, ptr %9, align 8, !tbaa !5
  %18 = icmp eq ptr %17, null
  br i1 %18, label %19, label %20

19:                                               ; preds = %4
  store i64 -9223372036854775806, ptr %5, align 8
  store i32 1, ptr %16, align 4
  br label %127

20:                                               ; preds = %4
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %21, i64 0
  %23 = load i8, ptr %22, align 1, !tbaa !11
  %24 = zext i8 %23 to i32
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %26, label %27

26:                                               ; preds = %20
  store i64 -9223372036854775794, ptr %5, align 8
  store i32 1, ptr %16, align 4
  br label %127

27:                                               ; preds = %20
  %28 = call zeroext i8 @DebugAssertEnabled()
  %29 = zext i8 %28 to i32
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %31, label %41

31:                                               ; preds = %27
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = ptrtoint ptr %32 to i64
  %34 = sub i64 %33, ptrtoint (ptr getelementptr inbounds (%struct._ISCSI_DRIVER_DATA, ptr null, i32 0, i32 6) to i64)
  %35 = inttoptr i64 %34 to ptr
  %36 = getelementptr inbounds %struct._ISCSI_DRIVER_DATA, ptr %35, i32 0, i32 0
  %37 = load i32, ptr %36, align 8, !tbaa !12
  %38 = icmp ne i32 %37, 1094996809
  br i1 %38, label %39, label %41

39:                                               ; preds = %31
  call void @DebugAssert(ptr noundef @.str, i64 noundef 207, ptr noundef @.str.1)
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  br label %46

41:                                               ; preds = %31, %27
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = ptrtoint ptr %42 to i64
  %44 = sub i64 %43, ptrtoint (ptr getelementptr inbounds (%struct._ISCSI_DRIVER_DATA, ptr null, i32 0, i32 6) to i64)
  %45 = inttoptr i64 %44 to ptr
  br label %46

46:                                               ; preds = %41, %39
  %47 = phi ptr [ %40, %39 ], [ %45, %41 ]
  store ptr %47, ptr %10, align 8, !tbaa !5
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct._ISCSI_DRIVER_DATA, ptr %48, i32 0, i32 10
  store ptr %49, ptr %11, align 8, !tbaa !5
  %50 = load ptr, ptr %11, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %50, i32 0, i32 1
  %52 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_DATA, ptr %51, i32 0, i32 0
  store ptr %52, ptr %12, align 8, !tbaa !5
  %53 = load ptr, ptr %11, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %53, i32 0, i32 2
  %55 = getelementptr inbounds %struct._ISCSI_CHAP_AUTH_DATA, ptr %54, i32 0, i32 0
  store ptr %55, ptr %13, align 8, !tbaa !5
  %56 = load ptr, ptr %12, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.ISCSI_SESSION_CONFIG_NVDATA, ptr %56, i32 0, i32 9
  %58 = getelementptr inbounds [8 x i8], ptr %57, i64 0, i64 0
  %59 = call i64 @CompareMem(ptr noundef %8, ptr noundef %58, i64 noundef 8)
  %60 = icmp ne i64 %59, 0
  br i1 %60, label %61, label %62

61:                                               ; preds = %46
  store i64 -9223372036854775794, ptr %5, align 8
  store i32 1, ptr %16, align 4
  br label %127

62:                                               ; preds = %46
  %63 = load ptr, ptr %12, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.ISCSI_SESSION_CONFIG_NVDATA, ptr %63, i32 0, i32 6
  %65 = getelementptr inbounds [224 x i8], ptr %64, i64 0, i64 0
  %66 = call i64 @AsciiStrLen(ptr noundef %65)
  %67 = add i64 18, %66
  %68 = add i64 %67, 1
  store i64 %68, ptr %15, align 8, !tbaa !9
  %69 = load i64, ptr %15, align 8, !tbaa !9
  %70 = call ptr @AllocatePool(i64 noundef %69)
  store ptr %70, ptr %14, align 8, !tbaa !5
  %71 = load ptr, ptr %14, align 8, !tbaa !5
  %72 = icmp eq ptr %71, null
  br i1 %72, label %73, label %74

73:                                               ; preds = %62
  store i64 -9223372036854775799, ptr %5, align 8
  store i32 1, ptr %16, align 4
  br label %127

74:                                               ; preds = %62
  %75 = load ptr, ptr %14, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.EFI_DEVICE_PATH_PROTOCOL, ptr %75, i32 0, i32 0
  store i8 3, ptr %76, align 1, !tbaa !11
  %77 = load ptr, ptr %14, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.EFI_DEVICE_PATH_PROTOCOL, ptr %77, i32 0, i32 1
  store i8 19, ptr %78, align 1, !tbaa !11
  %79 = load ptr, ptr %14, align 8, !tbaa !5
  %80 = load i64, ptr %15, align 8, !tbaa !9
  %81 = trunc i64 %80 to i16
  %82 = zext i16 %81 to i64
  %83 = call zeroext i16 @SetDevicePathNodeLength(ptr noundef %79, i64 noundef %82)
  %84 = load ptr, ptr %14, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.ISCSI_DEVICE_PATH, ptr %84, i32 0, i32 1
  store i16 0, ptr %85, align 1, !tbaa !11
  %86 = load ptr, ptr %14, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.ISCSI_DEVICE_PATH, ptr %86, i32 0, i32 2
  store i16 0, ptr %87, align 1, !tbaa !11
  %88 = load ptr, ptr %13, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct._ISCSI_CHAP_AUTH_CONFIG_NVDATA, ptr %88, i32 0, i32 0
  %90 = load i8, ptr %89, align 1, !tbaa !26
  %91 = zext i8 %90 to i32
  switch i32 %91, label %106 [
    i32 0, label %92
    i32 1, label %99
  ]

92:                                               ; preds = %74
  %93 = load ptr, ptr %14, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.ISCSI_DEVICE_PATH, ptr %93, i32 0, i32 2
  %95 = load i16, ptr %94, align 1, !tbaa !11
  %96 = zext i16 %95 to i32
  %97 = or i32 %96, 2048
  %98 = trunc i32 %97 to i16
  store i16 %98, ptr %94, align 1, !tbaa !11
  br label %107

99:                                               ; preds = %74
  %100 = load ptr, ptr %14, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.ISCSI_DEVICE_PATH, ptr %100, i32 0, i32 2
  %102 = load i16, ptr %101, align 1, !tbaa !11
  %103 = zext i16 %102 to i32
  %104 = or i32 %103, 4096
  %105 = trunc i32 %104 to i16
  store i16 %105, ptr %101, align 1, !tbaa !11
  br label %107

106:                                              ; preds = %74
  br label %107

107:                                              ; preds = %106, %99, %92
  %108 = load ptr, ptr %14, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.ISCSI_DEVICE_PATH, ptr %108, i32 0, i32 3
  %110 = load ptr, ptr %12, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.ISCSI_SESSION_CONFIG_NVDATA, ptr %110, i32 0, i32 9
  %112 = getelementptr inbounds [8 x i8], ptr %111, i64 0, i64 0
  %113 = call ptr @CopyMem(ptr noundef %109, ptr noundef %112, i64 noundef 8)
  %114 = load ptr, ptr %11, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %114, i32 0, i32 16
  %116 = load i16, ptr %115, align 8, !tbaa !27
  %117 = load ptr, ptr %14, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.ISCSI_DEVICE_PATH, ptr %117, i32 0, i32 4
  store i16 %116, ptr %118, align 1, !tbaa !11
  %119 = load ptr, ptr %14, align 8, !tbaa !5
  %120 = getelementptr inbounds i8, ptr %119, i64 18
  %121 = load ptr, ptr %12, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.ISCSI_SESSION_CONFIG_NVDATA, ptr %121, i32 0, i32 6
  %123 = getelementptr inbounds [224 x i8], ptr %122, i64 0, i64 0
  %124 = call ptr @AsciiStrCpy(ptr noundef %120, ptr noundef %123)
  %125 = load ptr, ptr %14, align 8, !tbaa !5
  %126 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %125, ptr %126, align 8, !tbaa !5
  store i64 0, ptr %5, align 8
  store i32 1, ptr %16, align 4
  br label %127

127:                                              ; preds = %107, %73, %61, %26, %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  %128 = load i64, ptr %5, align 8
  ret i64 %128
}

declare i64 @AsciiStrLen(ptr noundef) #1

declare ptr @AllocatePool(i64 noundef) #1

declare zeroext i16 @SetDevicePathNodeLength(ptr noundef, i64 noundef) #1

declare ptr @AsciiStrCpy(ptr 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 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !14, i64 0}
!13 = !{!"_ISCSI_DRIVER_DATA", !14, i64 0, !6, i64 8, !6, i64 16, !15, i64 24, !6, i64 32, !6, i64 40, !16, i64 48, !17, i64 112, !6, i64 128, !6, i64 136, !18, i64 144}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ISCSI_PRIVATE_PROTOCOL", !14, i64 0}
!16 = !{!"_EFI_EXT_SCSI_PASS_THRU_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}
!17 = !{!"", !14, i64 0, !14, i64 4, !14, i64 8}
!18 = !{!"_ISCSI_SESSION", !14, i64 0, !19, i64 4, !23, i64 276, !7, i64 2648, !10, i64 2872, !7, i64 2880, !7, i64 2881, !22, i64 2888, !14, i64 2892, !14, i64 2896, !14, i64 2900, !14, i64 2904, !22, i64 2908, !25, i64 2912, !14, i64 2928, !25, i64 2936, !22, i64 2952, !14, i64 2956, !7, i64 2960, !7, i64 2961, !14, i64 2964, !14, i64 2968, !14, i64 2972, !14, i64 2976, !22, i64 2980, !7, i64 2982, !7, i64 2983, !7, i64 2984}
!19 = !{!"_ISCSI_SESSION_CONFIG_DATA", !20, i64 0, !21, i64 259, !21, i64 263, !21, i64 267}
!20 = !{!"", !7, i64 0, !7, i64 1, !21, i64 2, !21, i64 6, !21, i64 10, !7, i64 14, !7, i64 15, !21, i64 239, !22, i64 243, !7, i64 245, !7, i64 253}
!21 = !{!"", !7, i64 0}
!22 = !{!"short", !7, i64 0}
!23 = !{!"_ISCSI_CHAP_AUTH_DATA", !24, i64 0, !14, i64 292, !7, i64 296, !14, i64 1320, !7, i64 1324, !14, i64 1340, !7, i64 1344, !14, i64 2368}
!24 = !{!"_ISCSI_CHAP_AUTH_CONFIG_NVDATA", !7, i64 0, !7, i64 1, !7, i64 128, !7, i64 145, !7, i64 272}
!25 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!26 = !{!24, !7, i64 0}
!27 = !{!18, !22, i64 2952}


; 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 = external hidden unnamed_addr constant [164 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #0

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

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775806, 1) i64 @IScsiExtScsiPassThruBuildDevicePath(ptr noundef %0, ptr nocapture noundef readonly %1, i64 noundef %2, ptr noundef writeonly %3) local_unnamed_addr #1 {
  %5 = alloca i64, align 8
  store i64 %2, ptr %5, align 8, !tbaa !5
  %6 = icmp eq ptr %3, null
  br i1 %6, label %40, label %7

7:                                                ; preds = %4
  %8 = load i8, ptr %1, align 1, !tbaa !9
  %.not = icmp eq i8 %8, 0
  br i1 %.not, label %9, label %40

9:                                                ; preds = %7
  %10 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not31 = icmp eq i8 %10, 0
  %.pre = ptrtoint ptr %0 to i64
  %.pre34 = add i64 %.pre, -48
  %.pre36 = inttoptr i64 %.pre34 to ptr
  br i1 %.not31, label %._crit_edge, label %11

11:                                               ; preds = %9
  %12 = load i32, ptr %.pre36, align 8, !tbaa !10
  %.not32 = icmp eq i32 %12, 1094996809
  br i1 %.not32, label %._crit_edge, label %13

13:                                               ; preds = %11
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 207, ptr noundef nonnull @.str.1) #2
  br label %._crit_edge

._crit_edge:                                      ; preds = %9, %11, %13
  %14 = phi ptr [ %0, %13 ], [ %.pre36, %11 ], [ %.pre36, %9 ]
  %15 = getelementptr inbounds i8, ptr %14, i64 420
  %16 = getelementptr inbounds i8, ptr %14, i64 393
  %17 = call i64 @CompareMem(ptr noundef nonnull %5, ptr noundef nonnull %16, i64 noundef 8) #2
  %.not33 = icmp eq i64 %17, 0
  br i1 %.not33, label %18, label %40

18:                                               ; preds = %._crit_edge
  %19 = getelementptr inbounds i8, ptr %14, i64 163
  %20 = call i64 @AsciiStrLen(ptr noundef nonnull %19) #2
  %21 = add i64 %20, 19
  %22 = call ptr @AllocatePool(i64 noundef %21) #2
  %23 = icmp eq ptr %22, null
  br i1 %23, label %40, label %24

24:                                               ; preds = %18
  store i8 3, ptr %22, align 1, !tbaa !9
  %25 = getelementptr inbounds i8, ptr %22, i64 1
  store i8 19, ptr %25, align 1, !tbaa !9
  %26 = and i64 %21, 65535
  %27 = call zeroext i16 @SetDevicePathNodeLength(ptr noundef nonnull %22, i64 noundef %26) #2
  %28 = getelementptr inbounds i8, ptr %22, i64 4
  store i16 0, ptr %28, align 1, !tbaa !9
  %29 = getelementptr inbounds i8, ptr %22, i64 6
  store i16 0, ptr %29, align 1, !tbaa !9
  %30 = load i8, ptr %15, align 1, !tbaa !25
  switch i8 %30, label %32 [
    i8 0, label %.sink.split
    i8 1, label %31
  ]

31:                                               ; preds = %24
  br label %.sink.split

.sink.split:                                      ; preds = %24, %31
  %.sink = phi i16 [ 4096, %31 ], [ 2048, %24 ]
  store i16 %.sink, ptr %29, align 1, !tbaa !9
  br label %32

32:                                               ; preds = %.sink.split, %24
  %33 = getelementptr inbounds i8, ptr %22, i64 8
  %34 = call ptr @CopyMem(ptr noundef nonnull %33, ptr noundef nonnull %16, i64 noundef 8) #2
  %35 = getelementptr inbounds i8, ptr %14, i64 3096
  %36 = load i16, ptr %35, align 8, !tbaa !26
  %37 = getelementptr inbounds i8, ptr %22, i64 16
  store i16 %36, ptr %37, align 1, !tbaa !9
  %38 = getelementptr inbounds i8, ptr %22, i64 18
  %39 = call ptr @AsciiStrCpy(ptr noundef nonnull %38, ptr noundef nonnull %19) #2
  store ptr %22, ptr %3, align 8, !tbaa !27
  br label %40

40:                                               ; preds = %18, %._crit_edge, %7, %4, %32
  %.0 = phi i64 [ 0, %32 ], [ -9223372036854775806, %4 ], [ -9223372036854775794, %7 ], [ -9223372036854775794, %._crit_edge ], [ -9223372036854775799, %18 ]
  ret i64 %.0
}

declare i64 @AsciiStrLen(ptr noundef) local_unnamed_addr #0

declare ptr @AllocatePool(i64 noundef) local_unnamed_addr #0

declare zeroext i16 @SetDevicePathNodeLength(ptr noundef, i64 noundef) local_unnamed_addr #0

declare ptr @AsciiStrCpy(ptr noundef, ptr noundef) local_unnamed_addr #0

attributes #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 = { 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 = { 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 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !12, i64 0}
!11 = !{!"_ISCSI_DRIVER_DATA", !12, i64 0, !13, i64 8, !13, i64 16, !14, i64 24, !13, i64 32, !13, i64 40, !15, i64 48, !16, i64 112, !13, i64 128, !13, i64 136, !17, i64 144}
!12 = !{!"int", !7, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"_ISCSI_PRIVATE_PROTOCOL", !12, i64 0}
!15 = !{!"_EFI_EXT_SCSI_PASS_THRU_PROTOCOL", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !13, i64 48, !13, i64 56}
!16 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8}
!17 = !{!"_ISCSI_SESSION", !12, i64 0, !18, i64 4, !22, i64 276, !7, i64 2648, !6, i64 2872, !7, i64 2880, !7, i64 2881, !21, i64 2888, !12, i64 2892, !12, i64 2896, !12, i64 2900, !12, i64 2904, !21, i64 2908, !24, i64 2912, !12, i64 2928, !24, i64 2936, !21, i64 2952, !12, i64 2956, !7, i64 2960, !7, i64 2961, !12, i64 2964, !12, i64 2968, !12, i64 2972, !12, i64 2976, !21, i64 2980, !7, i64 2982, !7, i64 2983, !7, i64 2984}
!18 = !{!"_ISCSI_SESSION_CONFIG_DATA", !19, i64 0, !20, i64 259, !20, i64 263, !20, i64 267}
!19 = !{!"", !7, i64 0, !7, i64 1, !20, i64 2, !20, i64 6, !20, i64 10, !7, i64 14, !7, i64 15, !20, i64 239, !21, i64 243, !7, i64 245, !7, i64 253}
!20 = !{!"", !7, i64 0}
!21 = !{!"short", !7, i64 0}
!22 = !{!"_ISCSI_CHAP_AUTH_DATA", !23, i64 0, !12, i64 292, !7, i64 296, !12, i64 1320, !7, i64 1324, !12, i64 1340, !7, i64 1344, !12, i64 2368}
!23 = !{!"_ISCSI_CHAP_AUTH_CONFIG_NVDATA", !7, i64 0, !7, i64 1, !7, i64 128, !7, i64 145, !7, i64 272}
!24 = !{!"_LIST_ENTRY", !13, i64 0, !13, i64 8}
!25 = !{!23, !7, i64 0}
!26 = !{!17, !21, i64 2952}
!27 = !{!13, !13, i64 0}


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