	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pciehp_sysfs_disable_slot      ## -- Begin function pciehp_sysfs_disable_slot
	.p2align	4, 0x90
_pciehp_sysfs_disable_slot:             ## @pciehp_sysfs_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
	callq	_to_ctrl
	movq	%rax, %rbx
	leaq	8(%rax), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	(%rbx), %eax
	addl	$-128, %eax
	cmpl	$5, %eax
	ja	LBB0_7
## %bb.1:
	movl	$25, %ecx
	btl	%eax, %ecx
	jae	LBB0_2
## %bb.6:
	movq	%rbx, %rdi
	callq	_slot_name
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_5
LBB0_2:
	movl	$36, %ecx
	btl	%eax, %ecx
	jae	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_DISABLE_SLOT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_pciehp_request
	movl	16(%rbx), %r14d
	movq	%rbx, %rdi
	addq	$12, %rdi
	callq	_atomic_read
	xorl	%esi, %esi
	testl	%eax, %eax
	sete	%sil
	movl	%r14d, %edi
	callq	_wait_event
	movl	4(%rbx), %eax
	jmp	LBB0_9
LBB0_7:
	movq	%rbx, %rdi
	callq	_slot_name
	movl	(%rbx), %ecx
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_ctrl_err
	jmp	LBB0_8
LBB0_4:
	movq	%rbx, %rdi
	callq	_slot_name
	leaq	L_.str(%rip), %rsi
LBB0_5:
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_ctrl_info
LBB0_8:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DISABLE_SLOT,4,2               ## @DISABLE_SLOT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Slot(%s): Already in powering off state\n"

L_.str.1:                               ## @.str.1
	.asciz	"Slot(%s): Already disabled\n"

L_.str.2:                               ## @.str.2
	.asciz	"Slot(%s): Invalid state %#x\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pciehp_sysfs_disable_slot      ; -- Begin function pciehp_sysfs_disable_slot
	.p2align	2
_pciehp_sysfs_disable_slot:             ; @pciehp_sysfs_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
	bl	_to_ctrl
	mov	x19, x0
	add	x20, x0, #8
	mov	x0, x20
	bl	_mutex_lock
	ldr	w8, [x19]
	sub	w8, w8, #128
	cmp	w8, #5
	b.hi	LBB0_5
; %bb.1:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #25
	tst	w8, w9
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_slot_name
	mov	x2, x0
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_3:
	mov	w9, #36
	tst	w8, w9
	b.eq	LBB0_6
; %bb.4:
	mov	x0, x20
	bl	_mutex_unlock
Lloh2:
	adrp	x8, _DISABLE_SLOT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DISABLE_SLOT@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_pciehp_request
	ldr	w20, [x19, #16]
	add	x0, x19, #12
	bl	_atomic_read
	cmp	w0, #0
	cset	w1, eq
	mov	x0, x20
	bl	_wait_event
	ldr	w0, [x19, #4]
	b	LBB0_9
LBB0_5:
	mov	x0, x19
	bl	_slot_name
	mov	x2, x0
	ldr	w3, [x19]
Lloh5:
	adrp	x1, l_.str.2@PAGE
Lloh6:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_ctrl_err
	b	LBB0_8
LBB0_6:
	mov	x0, x19
	bl	_slot_name
	mov	x2, x0
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
LBB0_7:
	mov	x0, x19
	bl	_ctrl_info
LBB0_8:
	mov	x0, x20
	bl	_mutex_unlock
Lloh9:
	adrp	x8, _ENODEV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DISABLE_SLOT,4,2               ; @DISABLE_SLOT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Slot(%s): Already in powering off state\n"

l_.str.1:                               ; @.str.1
	.asciz	"Slot(%s): Already disabled\n"

l_.str.2:                               ; @.str.2
	.asciz	"Slot(%s): Invalid state %#x\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
.subsections_via_symbols
