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

; 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_DRIVER_BINDING_PROTOCOL = type { ptr, ptr, ptr, i32, ptr, ptr }
%struct.GUID = type { i32, i16, i16, [8 x i8] }
%struct._EFI_AUTHENTICATION_INFO_PROTOCOL = type { ptr, ptr }
%struct._EFI_ISCSI_INITIATOR_NAME_PROTOCOL = type { ptr, ptr }
%struct._EFI_COMPONENT_NAME_PROTOCOL = type { ptr, ptr, ptr }
%struct._EFI_COMPONENT_NAME2_PROTOCOL = type { ptr, ptr, ptr }
%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.ISCSI_PRIVATE_DATA = type { [223 x i16], %struct._LIST_ENTRY, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, %struct._LIST_ENTRY, [224 x i8], i64, ptr }
%struct._LIST_ENTRY = type { ptr, ptr }

@gIScsiIp4DriverBinding = external dso_local global %struct._EFI_DRIVER_BINDING_PROTOCOL, align 8
@gIScsiIp6DriverBinding = external dso_local global %struct._EFI_DRIVER_BINDING_PROTOCOL, align 8
@mPrivate = external dso_local global ptr, align 8
@gBS = external global ptr, align 8
@gEfiIScsiInitiatorNameProtocolGuid = external global %struct.GUID, align 4
@gEfiAuthenticationInfoProtocolGuid = external global %struct.GUID, align 4
@gIScsiAuthenticationInfo = external global %struct._EFI_AUTHENTICATION_INFO_PROTOCOL, align 8
@gEfiComponentNameProtocolGuid = external global %struct.GUID, align 4
@gEfiComponentName2ProtocolGuid = external global %struct.GUID, align 4
@gEfiDriverBindingProtocolGuid = external global %struct.GUID, align 4
@gIScsiInitiatorName = external global %struct._EFI_ISCSI_INITIATOR_NAME_PROTOCOL, align 8
@gIScsiComponentName = external global %struct._EFI_COMPONENT_NAME_PROTOCOL, align 8
@gIScsiComponentName2 = external global %struct._EFI_COMPONENT_NAME2_PROTOCOL, align 8

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

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

declare void @FreePool(ptr noundef) #1

declare ptr @AllocateZeroPool(i64 noundef) #1

declare i64 @IScsiConfigFormUnload(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i64 @IScsiDriverEntryPoint(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 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
  %10 = load ptr, ptr @gBS, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %10, i32 0, i32 38
  %12 = load ptr, ptr %11, align 8, !tbaa !9
  %13 = call i64 %12(ptr noundef @gEfiIScsiInitiatorNameProtocolGuid, ptr noundef null, ptr noundef %7)
  store i64 %13, ptr %6, align 8, !tbaa !14
  %14 = load i64, ptr %6, align 8, !tbaa !14
  %15 = icmp slt i64 %14, 0
  br i1 %15, label %17, label %16

16:                                               ; preds = %2
  store i64 -9223372036854775793, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %99

17:                                               ; preds = %2
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = call i64 @EfiLibInstallDriverBindingComponentName2(ptr noundef %18, ptr noundef %19, ptr noundef @gIScsiIp4DriverBinding, ptr noundef %20, ptr noundef @gIScsiComponentName, ptr noundef @gIScsiComponentName2)
  store i64 %21, ptr %6, align 8, !tbaa !14
  %22 = load i64, ptr %6, align 8, !tbaa !14
  %23 = icmp slt i64 %22, 0
  br i1 %23, label %24, label %26

24:                                               ; preds = %17
  %25 = load i64, ptr %6, align 8, !tbaa !14
  store i64 %25, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %99

26:                                               ; preds = %17
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  %29 = call i64 @EfiLibInstallDriverBindingComponentName2(ptr noundef %27, ptr noundef %28, ptr noundef @gIScsiIp6DriverBinding, ptr noundef null, ptr noundef @gIScsiComponentName, ptr noundef @gIScsiComponentName2)
  store i64 %29, ptr %6, align 8, !tbaa !14
  %30 = load i64, ptr %6, align 8, !tbaa !14
  %31 = icmp slt i64 %30, 0
  br i1 %31, label %32, label %33

32:                                               ; preds = %26
  br label %92

33:                                               ; preds = %26
  %34 = load ptr, ptr @gBS, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %34, i32 0, i32 14
  %36 = load ptr, ptr %35, align 8, !tbaa !15
  %37 = call i64 %36(ptr noundef %4, ptr noundef @gEfiIScsiInitiatorNameProtocolGuid, i32 noundef 0, ptr noundef @gIScsiInitiatorName)
  store i64 %37, ptr %6, align 8, !tbaa !14
  %38 = load i64, ptr %6, align 8, !tbaa !14
  %39 = icmp slt i64 %38, 0
  br i1 %39, label %40, label %41

40:                                               ; preds = %33
  br label %86

41:                                               ; preds = %33
  %42 = call ptr @AllocateZeroPool(i64 noundef 736)
  store ptr %42, ptr @mPrivate, align 8, !tbaa !5
  %43 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %44 = icmp eq ptr %43, null
  br i1 %44, label %45, label %46

45:                                               ; preds = %41
  store i64 -9223372036854775799, ptr %6, align 8, !tbaa !14
  br label %80

46:                                               ; preds = %41
  %47 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %47, i32 0, i32 1
  %49 = call ptr @InitializeListHead(ptr noundef %48)
  %50 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %50, i32 0, i32 14
  %52 = call ptr @InitializeListHead(ptr noundef %51)
  %53 = load ptr, ptr getelementptr inbounds (%struct._EFI_DRIVER_BINDING_PROTOCOL, ptr @gIScsiIp4DriverBinding, i32 0, i32 5), align 8, !tbaa !16
  %54 = call i64 @IScsiConfigFormInit(ptr noundef %53)
  store i64 %54, ptr %6, align 8, !tbaa !14
  %55 = load i64, ptr %6, align 8, !tbaa !14
  %56 = icmp slt i64 %55, 0
  br i1 %56, label %57, label %58

57:                                               ; preds = %46
  br label %78

58:                                               ; preds = %46
  %59 = load ptr, ptr @gBS, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %59, i32 0, i32 38
  %61 = load ptr, ptr %60, align 8, !tbaa !9
  %62 = call i64 %61(ptr noundef @gEfiAuthenticationInfoProtocolGuid, ptr noundef null, ptr noundef %8)
  store i64 %62, ptr %6, align 8, !tbaa !14
  %63 = load i64, ptr %6, align 8, !tbaa !14
  %64 = icmp eq i64 %63, -9223372036854775794
  br i1 %64, label %65, label %74

65:                                               ; preds = %58
  %66 = load ptr, ptr @gBS, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %66, i32 0, i32 14
  %68 = load ptr, ptr %67, align 8, !tbaa !15
  %69 = call i64 %68(ptr noundef %4, ptr noundef @gEfiAuthenticationInfoProtocolGuid, i32 noundef 0, ptr noundef @gIScsiAuthenticationInfo)
  store i64 %69, ptr %6, align 8, !tbaa !14
  %70 = load i64, ptr %6, align 8, !tbaa !14
  %71 = icmp slt i64 %70, 0
  br i1 %71, label %72, label %73

72:                                               ; preds = %65
  br label %75

73:                                               ; preds = %65
  br label %74

74:                                               ; preds = %73, %58
  store i64 0, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %99

75:                                               ; preds = %72
  %76 = load ptr, ptr getelementptr inbounds (%struct._EFI_DRIVER_BINDING_PROTOCOL, ptr @gIScsiIp4DriverBinding, i32 0, i32 5), align 8, !tbaa !16
  %77 = call i64 @IScsiConfigFormUnload(ptr noundef %76)
  br label %78

78:                                               ; preds = %75, %57
  %79 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  call void @FreePool(ptr noundef %79)
  br label %80

80:                                               ; preds = %78, %45
  %81 = load ptr, ptr @gBS, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %81, i32 0, i32 40
  %83 = load ptr, ptr %82, align 8, !tbaa !18
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = call i64 (ptr, ...) %83(ptr noundef %84, ptr noundef @gEfiIScsiInitiatorNameProtocolGuid, ptr noundef @gIScsiInitiatorName, ptr noundef null)
  br label %86

86:                                               ; preds = %80, %40
  %87 = load ptr, ptr @gBS, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %87, i32 0, i32 40
  %89 = load ptr, ptr %88, align 8, !tbaa !18
  %90 = load ptr, ptr getelementptr inbounds (%struct._EFI_DRIVER_BINDING_PROTOCOL, ptr @gIScsiIp6DriverBinding, i32 0, i32 5), align 8, !tbaa !16
  %91 = call i64 (ptr, ...) %89(ptr noundef %90, ptr noundef @gEfiDriverBindingProtocolGuid, ptr noundef @gIScsiIp6DriverBinding, ptr noundef @gEfiComponentName2ProtocolGuid, ptr noundef @gIScsiComponentName2, ptr noundef @gEfiComponentNameProtocolGuid, ptr noundef @gIScsiComponentName, ptr noundef null)
  br label %92

92:                                               ; preds = %86, %32
  %93 = load ptr, ptr @gBS, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %93, i32 0, i32 40
  %95 = load ptr, ptr %94, align 8, !tbaa !18
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = call i64 (ptr, ...) %95(ptr noundef %96, ptr noundef @gEfiDriverBindingProtocolGuid, ptr noundef @gIScsiIp4DriverBinding, ptr noundef @gEfiComponentName2ProtocolGuid, ptr noundef @gIScsiComponentName2, ptr noundef @gEfiComponentNameProtocolGuid, ptr noundef @gIScsiComponentName, ptr noundef null)
  %98 = load i64, ptr %6, align 8, !tbaa !14
  store i64 %98, ptr %3, align 8
  store i32 1, ptr %9, align 4
  br label %99

99:                                               ; preds = %92, %74, %24, %16
  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
  %100 = load i64, ptr %3, align 8
  ret i64 %100
}

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

declare ptr @InitializeListHead(ptr noundef) #1

declare i64 @IScsiConfigFormInit(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, !6, i64 320}
!10 = !{!"", !11, 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}
!11 = !{!"", !12, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20}
!12 = !{!"long long", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!12, !12, i64 0}
!15 = !{!10, !6, i64 128}
!16 = !{!17, !6, i64 40}
!17 = !{!"_EFI_DRIVER_BINDING_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !6, i64 32, !6, i64 40}
!18 = !{!10, !6, i64 336}


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

%struct._EFI_DRIVER_BINDING_PROTOCOL = type { ptr, ptr, ptr, i32, ptr, ptr }
%struct.GUID = type { i32, i16, i16, [8 x i8] }
%struct._EFI_AUTHENTICATION_INFO_PROTOCOL = type { ptr, ptr }
%struct._EFI_ISCSI_INITIATOR_NAME_PROTOCOL = type { ptr, ptr }
%struct._EFI_COMPONENT_NAME_PROTOCOL = type { ptr, ptr, ptr }
%struct._EFI_COMPONENT_NAME2_PROTOCOL = type { ptr, ptr, ptr }

@gIScsiIp4DriverBinding = external dso_local global %struct._EFI_DRIVER_BINDING_PROTOCOL, align 8
@gIScsiIp6DriverBinding = external dso_local global %struct._EFI_DRIVER_BINDING_PROTOCOL, align 8
@mPrivate = external dso_local local_unnamed_addr global ptr, align 8
@gBS = external local_unnamed_addr global ptr, align 8
@gEfiIScsiInitiatorNameProtocolGuid = external global %struct.GUID, align 4
@gEfiAuthenticationInfoProtocolGuid = external global %struct.GUID, align 4
@gIScsiAuthenticationInfo = external global %struct._EFI_AUTHENTICATION_INFO_PROTOCOL, align 8
@gEfiComponentNameProtocolGuid = external global %struct.GUID, align 4
@gEfiComponentName2ProtocolGuid = external global %struct.GUID, align 4
@gEfiDriverBindingProtocolGuid = external global %struct.GUID, align 4
@gIScsiInitiatorName = external global %struct._EFI_ISCSI_INITIATOR_NAME_PROTOCOL, align 8
@gIScsiComponentName = external global %struct._EFI_COMPONENT_NAME_PROTOCOL, align 8
@gIScsiComponentName2 = external global %struct._EFI_COMPONENT_NAME2_PROTOCOL, align 8

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

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

declare void @FreePool(ptr noundef) local_unnamed_addr #1

declare ptr @AllocateZeroPool(i64 noundef) local_unnamed_addr #1

declare i64 @IScsiConfigFormUnload(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775808, 1) i64 @IScsiDriverEntryPoint(ptr noundef %0, ptr noundef %1) local_unnamed_addr #2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  %6 = load ptr, ptr @gBS, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 320
  %8 = load ptr, ptr %7, align 8, !tbaa !9
  %9 = call i64 %8(ptr noundef nonnull @gEfiIScsiInitiatorNameProtocolGuid, ptr noundef null, ptr noundef nonnull %4) #3
  %10 = icmp slt i64 %9, 0
  br i1 %10, label %11, label %70

11:                                               ; preds = %2
  %12 = call i64 @EfiLibInstallDriverBindingComponentName2(ptr noundef %0, ptr noundef %1, ptr noundef nonnull @gIScsiIp4DriverBinding, ptr noundef %0, ptr noundef nonnull @gIScsiComponentName, ptr noundef nonnull @gIScsiComponentName2) #3
  %13 = icmp slt i64 %12, 0
  br i1 %13, label %70, label %14

14:                                               ; preds = %11
  %15 = call i64 @EfiLibInstallDriverBindingComponentName2(ptr noundef %0, ptr noundef %1, ptr noundef nonnull @gIScsiIp6DriverBinding, ptr noundef null, ptr noundef nonnull @gIScsiComponentName, ptr noundef nonnull @gIScsiComponentName2) #3
  %16 = icmp slt i64 %15, 0
  br i1 %16, label %64, label %17

17:                                               ; preds = %14
  %18 = load ptr, ptr @gBS, align 8, !tbaa !5
  %19 = getelementptr inbounds i8, ptr %18, i64 128
  %20 = load ptr, ptr %19, align 8, !tbaa !14
  %21 = call i64 %20(ptr noundef nonnull %3, ptr noundef nonnull @gEfiIScsiInitiatorNameProtocolGuid, i32 noundef 0, ptr noundef nonnull @gIScsiInitiatorName) #3
  %22 = icmp slt i64 %21, 0
  br i1 %22, label %58, label %23

23:                                               ; preds = %17
  %24 = call ptr @AllocateZeroPool(i64 noundef 736) #3
  store ptr %24, ptr @mPrivate, align 8, !tbaa !5
  %25 = icmp eq ptr %24, null
  br i1 %25, label %52, label %26

26:                                               ; preds = %23
  %27 = getelementptr inbounds i8, ptr %24, i64 448
  %28 = call ptr @InitializeListHead(ptr noundef nonnull %27) #3
  %29 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %29, i64 480
  %31 = call ptr @InitializeListHead(ptr noundef nonnull %30) #3
  %32 = load ptr, ptr getelementptr inbounds (i8, ptr @gIScsiIp4DriverBinding, i64 40), align 8, !tbaa !15
  %33 = call i64 @IScsiConfigFormInit(ptr noundef %32) #3
  %34 = icmp slt i64 %33, 0
  br i1 %34, label %50, label %35

35:                                               ; preds = %26
  %36 = load ptr, ptr @gBS, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %36, i64 320
  %38 = load ptr, ptr %37, align 8, !tbaa !9
  %39 = call i64 %38(ptr noundef nonnull @gEfiAuthenticationInfoProtocolGuid, ptr noundef null, ptr noundef nonnull %5) #3
  %40 = icmp eq i64 %39, -9223372036854775794
  br i1 %40, label %41, label %70

41:                                               ; preds = %35
  %42 = load ptr, ptr @gBS, align 8, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %42, i64 128
  %44 = load ptr, ptr %43, align 8, !tbaa !14
  %45 = call i64 %44(ptr noundef nonnull %3, ptr noundef nonnull @gEfiAuthenticationInfoProtocolGuid, i32 noundef 0, ptr noundef nonnull @gIScsiAuthenticationInfo) #3
  %46 = icmp slt i64 %45, 0
  br i1 %46, label %47, label %70

47:                                               ; preds = %41
  %48 = load ptr, ptr getelementptr inbounds (i8, ptr @gIScsiIp4DriverBinding, i64 40), align 8, !tbaa !15
  %49 = call i64 @IScsiConfigFormUnload(ptr noundef %48) #3
  br label %50

50:                                               ; preds = %26, %47
  %.0 = phi i64 [ %33, %26 ], [ %45, %47 ]
  %51 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  call void @FreePool(ptr noundef %51) #3
  br label %52

52:                                               ; preds = %23, %50
  %.1 = phi i64 [ %.0, %50 ], [ -9223372036854775799, %23 ]
  %53 = load ptr, ptr @gBS, align 8, !tbaa !5
  %54 = getelementptr inbounds i8, ptr %53, i64 336
  %55 = load ptr, ptr %54, align 8, !tbaa !17
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = call i64 (ptr, ...) %55(ptr noundef %56, ptr noundef nonnull @gEfiIScsiInitiatorNameProtocolGuid, ptr noundef nonnull @gIScsiInitiatorName, ptr noundef null) #3
  br label %58

58:                                               ; preds = %17, %52
  %.2 = phi i64 [ %21, %17 ], [ %.1, %52 ]
  %59 = load ptr, ptr @gBS, align 8, !tbaa !5
  %60 = getelementptr inbounds i8, ptr %59, i64 336
  %61 = load ptr, ptr %60, align 8, !tbaa !17
  %62 = load ptr, ptr getelementptr inbounds (i8, ptr @gIScsiIp6DriverBinding, i64 40), align 8, !tbaa !15
  %63 = call i64 (ptr, ...) %61(ptr noundef %62, ptr noundef nonnull @gEfiDriverBindingProtocolGuid, ptr noundef nonnull @gIScsiIp6DriverBinding, ptr noundef nonnull @gEfiComponentName2ProtocolGuid, ptr noundef nonnull @gIScsiComponentName2, ptr noundef nonnull @gEfiComponentNameProtocolGuid, ptr noundef nonnull @gIScsiComponentName, ptr noundef null) #3
  %.pre = load ptr, ptr %3, align 8, !tbaa !5
  br label %64

64:                                               ; preds = %14, %58
  %65 = phi ptr [ %0, %14 ], [ %.pre, %58 ]
  %.3 = phi i64 [ %15, %14 ], [ %.2, %58 ]
  %66 = load ptr, ptr @gBS, align 8, !tbaa !5
  %67 = getelementptr inbounds i8, ptr %66, i64 336
  %68 = load ptr, ptr %67, align 8, !tbaa !17
  %69 = call i64 (ptr, ...) %68(ptr noundef %65, ptr noundef nonnull @gEfiDriverBindingProtocolGuid, ptr noundef nonnull @gIScsiIp4DriverBinding, ptr noundef nonnull @gEfiComponentName2ProtocolGuid, ptr noundef nonnull @gIScsiComponentName2, ptr noundef nonnull @gEfiComponentNameProtocolGuid, ptr noundef nonnull @gIScsiComponentName, ptr noundef null) #3
  br label %70

70:                                               ; preds = %35, %41, %11, %2, %64
  %.011 = phi i64 [ %.3, %64 ], [ -9223372036854775793, %2 ], [ %12, %11 ], [ 0, %41 ], [ 0, %35 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  ret i64 %.011
}

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

declare ptr @InitializeListHead(ptr noundef) local_unnamed_addr #1

declare i64 @IScsiConfigFormInit(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 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 320}
!10 = !{!"", !11, 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}
!11 = !{!"", !12, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20}
!12 = !{!"long long", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!10, !6, i64 128}
!15 = !{!16, !6, i64 40}
!16 = !{!"_EFI_DRIVER_BINDING_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !6, i64 32, !6, i64 40}
!17 = !{!10, !6, i64 336}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass