	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pnv_php_disable_slot
_pnv_php_disable_slot:                  ## @pnv_php_disable_slot
	.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	_to_pnv_php_slot
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	_PNV_PHP_STATE_POPULATED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_pci_lock_rescan_remove
	movl	12(%rbx), %edi
	callq	_pci_hp_remove_devices
	xorl	%eax, %eax
	callq	_pci_unlock_rescan_remove
	movl	8(%rbx), %edi
	callq	_pnv_php_unregister
	movq	_OPAL_PCI_SLOT_POWER_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_pnv_php_set_slot_power_state
	movq	_PNV_PHP_STATE_REGISTERED@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rbx)
	jmp	LBB0_3
LBB0_2:
	xorl	%eax, %eax
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PNV_PHP_STATE_POPULATED,8,3    ## @PNV_PHP_STATE_POPULATED
	.comm	_OPAL_PCI_SLOT_POWER_OFF,4,2    ## @OPAL_PCI_SLOT_POWER_OFF
	.comm	_PNV_PHP_STATE_REGISTERED,8,3   ## @PNV_PHP_STATE_REGISTERED
	.no_dead_strip	_pnv_php_disable_slot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pnv_php_disable_slot
_pnv_php_disable_slot:                  ; @pnv_php_disable_slot
	.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	_to_pnv_php_slot
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _PNV_PHP_STATE_POPULATED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PNV_PHP_STATE_POPULATED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x19, x0
	bl	_pci_lock_rescan_remove
	ldr	w0, [x19, #12]
	bl	_pci_hp_remove_devices
	bl	_pci_unlock_rescan_remove
	ldr	w0, [x19, #8]
	bl	_pnv_php_unregister
Lloh3:
	adrp	x8, _OPAL_PCI_SLOT_POWER_OFF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OPAL_PCI_SLOT_POWER_OFF@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_pnv_php_set_slot_power_state
Lloh6:
	adrp	x8, _PNV_PHP_STATE_REGISTERED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PNV_PHP_STATE_REGISTERED@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	str	x8, [x19]
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PNV_PHP_STATE_POPULATED,8,3    ; @PNV_PHP_STATE_POPULATED
	.comm	_OPAL_PCI_SLOT_POWER_OFF,4,2    ; @OPAL_PCI_SLOT_POWER_OFF
	.comm	_PNV_PHP_STATE_REGISTERED,8,3   ; @PNV_PHP_STATE_REGISTERED
	.no_dead_strip	_pnv_php_disable_slot
.subsections_via_symbols
