	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hv_pci_remove
_hv_pci_remove:                         ## @hv_pci_remove
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_hv_get_drvdata
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	_hv_pcibus_installed@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_pci_lock_rescan_remove
	movl	36(%rbx), %edi
	callq	_pci_stop_root_bus
	movq	%rbx, %rdi
	callq	_hv_pci_remove_slots
	movl	36(%rbx), %edi
	callq	_pci_remove_root_bus
	xorl	%eax, %eax
	callq	_pci_unlock_rescan_remove
	movq	_hv_pcibus_removed@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
LBB0_2:
	movq	%r14, %rdi
	callq	_hv_pci_bus_exit
	movl	(%r14), %edi
	callq	_vmbus_close
	movl	32(%rbx), %edi
	callq	_iounmap
	movq	%rbx, %rdi
	callq	_hv_free_config_window
	leaq	28(%rbx), %rdi
	callq	_pci_free_resource_list
	movq	%rbx, %rdi
	callq	_hv_pci_free_bridge_windows
	movl	24(%rbx), %edi
	callq	_irq_domain_remove
	movl	12(%rbx), %edi
	callq	_irq_domain_free_fwnode
	movq	%rbx, %rdi
	callq	_put_hvpcibus
	movq	%rbx, %rdi
	addq	$20, %rdi
	callq	_wait_for_completion
	movl	16(%rbx), %edi
	callq	_destroy_workqueue
	movl	8(%rbx), %edi
	callq	_hv_put_dom_num
	movq	%rbx, %rdi
	callq	_free_page
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_hv_pcibus_installed,8,3        ## @hv_pcibus_installed
	.comm	_hv_pcibus_removed,8,3          ## @hv_pcibus_removed
	.no_dead_strip	_hv_pci_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hv_pci_remove
_hv_pci_remove:                         ; @hv_pci_remove
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_hv_get_drvdata
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _hv_pcibus_installed@GOTPAGE
Lloh1:
	ldr	x9, [x9, _hv_pcibus_installed@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	bl	_pci_lock_rescan_remove
	ldr	w0, [x19, #36]
	bl	_pci_stop_root_bus
	mov	x0, x19
	bl	_hv_pci_remove_slots
	ldr	w0, [x19, #36]
	bl	_pci_remove_root_bus
	bl	_pci_unlock_rescan_remove
Lloh3:
	adrp	x8, _hv_pcibus_removed@GOTPAGE
Lloh4:
	ldr	x8, [x8, _hv_pcibus_removed@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [x19]
LBB0_2:
	mov	x0, x20
	bl	_hv_pci_bus_exit
	ldr	w0, [x20]
	bl	_vmbus_close
	ldr	w0, [x19, #32]
	bl	_iounmap
	mov	x0, x19
	bl	_hv_free_config_window
	add	x0, x19, #28
	bl	_pci_free_resource_list
	mov	x0, x19
	bl	_hv_pci_free_bridge_windows
	ldr	w0, [x19, #24]
	bl	_irq_domain_remove
	ldr	w0, [x19, #12]
	bl	_irq_domain_free_fwnode
	mov	x0, x19
	bl	_put_hvpcibus
	add	x0, x19, #20
	bl	_wait_for_completion
	ldr	w0, [x19, #16]
	bl	_destroy_workqueue
	ldr	w0, [x19, #8]
	bl	_hv_put_dom_num
	mov	x0, x19
	bl	_free_page
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_hv_pcibus_installed,8,3        ; @hv_pcibus_installed
	.comm	_hv_pcibus_removed,8,3          ; @hv_pcibus_removed
	.no_dead_strip	_hv_pci_remove
.subsections_via_symbols
