	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pciehp_handle_button_press     ## -- Begin function pciehp_handle_button_press
	.p2align	4, 0x90
_pciehp_handle_button_press:            ## @pciehp_handle_button_press
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	(%rbx), %eax
	leal	-130(%rax), %ecx
	cmpl	$2, %ecx
	jb	LBB0_6
## %bb.1:
	cmpl	$128, %eax
	je	LBB0_2
## %bb.3:
	cmpl	$129, %eax
	jne	LBB0_10
## %bb.4:
	leaq	L_.str.1(%rip), %r15
	movl	$130, %eax
	jmp	LBB0_5
LBB0_6:
	movq	%rbx, %rdi
	callq	_slot_name
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_ctrl_info
	leaq	8(%rbx), %rdi
	callq	_cancel_delayed_work
	xorl	%eax, %eax
	cmpl	$131, (%rbx)
	sete	%al
	jne	LBB0_7
## %bb.8:
	movq	_PCI_EXP_SLTCTL_PWR_IND_ON@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
LBB0_2:
	leaq	L_.str(%rip), %r15
	movl	$131, %eax
LBB0_5:
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_slot_name
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_ctrl_info
	movq	_PCI_EXP_SLTCTL_PWR_IND_BLINK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PCI_EXP_SLTCTL_ATTN_IND_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_pciehp_set_indicators
	addq	$8, %rbx
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax,4), %esi
	movq	%rbx, %rdi
	callq	_schedule_delayed_work
	jmp	LBB0_11
LBB0_10:
	movq	%rbx, %rdi
	callq	_slot_name
	movl	(%rbx), %ecx
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_ctrl_err
	jmp	LBB0_11
LBB0_7:
	movq	_PCI_EXP_SLTCTL_PWR_IND_OFF@GOTPCREL(%rip), %rcx
LBB0_9:
	xorl	$129, %eax
	movl	%eax, (%rbx)
	movl	(%rcx), %esi
	movq	_PCI_EXP_SLTCTL_ATTN_IND_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_pciehp_set_indicators
	movq	%rbx, %rdi
	callq	_slot_name
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_ctrl_info
LBB0_11:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Slot(%s): Powering off due to button press\n"

L_.str.1:                               ## @.str.1
	.asciz	"Slot(%s) Powering on due to button press\n"

	.comm	_PCI_EXP_SLTCTL_PWR_IND_BLINK,4,2 ## @PCI_EXP_SLTCTL_PWR_IND_BLINK
	.comm	_PCI_EXP_SLTCTL_ATTN_IND_OFF,4,2 ## @PCI_EXP_SLTCTL_ATTN_IND_OFF
	.comm	_HZ,4,2                         ## @HZ
L_.str.2:                               ## @.str.2
	.asciz	"Slot(%s): Button cancel\n"

	.comm	_PCI_EXP_SLTCTL_PWR_IND_ON,4,2  ## @PCI_EXP_SLTCTL_PWR_IND_ON
	.comm	_PCI_EXP_SLTCTL_PWR_IND_OFF,4,2 ## @PCI_EXP_SLTCTL_PWR_IND_OFF
L_.str.3:                               ## @.str.3
	.asciz	"Slot(%s): Action canceled due to button press\n"

L_.str.4:                               ## @.str.4
	.asciz	"Slot(%s): Ignoring invalid state %#x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pciehp_handle_button_press     ; -- Begin function pciehp_handle_button_press
	.p2align	2
_pciehp_handle_button_press:            ; @pciehp_handle_button_press
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x20]
	sub	w9, w8, #130
	cmp	w9, #2
	b.lo	LBB0_4
; %bb.1:
	cmp	w8, #128
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #129
	b.ne	LBB0_7
; %bb.3:
Lloh0:
	adrp	x21, l_.str.1@PAGE
Lloh1:
	add	x21, x21, l_.str.1@PAGEOFF
	mov	w8, #130
	b	LBB0_6
LBB0_4:
	mov	x0, x20
	bl	_slot_name
	mov	x2, x0
Lloh2:
	adrp	x1, l_.str.2@PAGE
Lloh3:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_ctrl_info
	add	x0, x20, #8
	bl	_cancel_delayed_work
	ldr	w8, [x20]
	cmp	w8, #131
	mov	w8, #128
	cinc	w8, w8, ne
Lloh4:
	adrp	x9, _PCI_EXP_SLTCTL_PWR_IND_ON@GOTPAGE
Lloh5:
	ldr	x9, [x9, _PCI_EXP_SLTCTL_PWR_IND_ON@GOTPAGEOFF]
Lloh6:
	adrp	x10, _PCI_EXP_SLTCTL_PWR_IND_OFF@GOTPAGE
Lloh7:
	ldr	x10, [x10, _PCI_EXP_SLTCTL_PWR_IND_OFF@GOTPAGEOFF]
	str	w8, [x20]
	csel	x8, x9, x10, eq
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _PCI_EXP_SLTCTL_ATTN_IND_OFF@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PCI_EXP_SLTCTL_ATTN_IND_OFF@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_pciehp_set_indicators
	mov	x0, x20
	bl	_slot_name
	mov	x2, x0
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_ctrl_info
	b	LBB0_8
LBB0_5:
Lloh13:
	adrp	x21, l_.str@PAGE
Lloh14:
	add	x21, x21, l_.str@PAGEOFF
	mov	w8, #131
LBB0_6:
	mov	x22, x20
	str	w8, [x22], #8
	mov	x0, x20
	bl	_slot_name
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_ctrl_info
Lloh15:
	adrp	x8, _PCI_EXP_SLTCTL_PWR_IND_BLINK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PCI_EXP_SLTCTL_PWR_IND_BLINK@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _PCI_EXP_SLTCTL_ATTN_IND_OFF@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PCI_EXP_SLTCTL_ATTN_IND_OFF@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_pciehp_set_indicators
Lloh21:
	adrp	x8, _HZ@GOTPAGE
Lloh22:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	add	w1, w8, w8, lsl #2
	mov	x0, x22
	bl	_schedule_delayed_work
	b	LBB0_8
LBB0_7:
	mov	x0, x20
	bl	_slot_name
	mov	x2, x0
	ldr	w3, [x20]
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_ctrl_err
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mutex_unlock
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Slot(%s): Powering off due to button press\n"

l_.str.1:                               ; @.str.1
	.asciz	"Slot(%s) Powering on due to button press\n"

	.comm	_PCI_EXP_SLTCTL_PWR_IND_BLINK,4,2 ; @PCI_EXP_SLTCTL_PWR_IND_BLINK
	.comm	_PCI_EXP_SLTCTL_ATTN_IND_OFF,4,2 ; @PCI_EXP_SLTCTL_ATTN_IND_OFF
	.comm	_HZ,4,2                         ; @HZ
l_.str.2:                               ; @.str.2
	.asciz	"Slot(%s): Button cancel\n"

	.comm	_PCI_EXP_SLTCTL_PWR_IND_ON,4,2  ; @PCI_EXP_SLTCTL_PWR_IND_ON
	.comm	_PCI_EXP_SLTCTL_PWR_IND_OFF,4,2 ; @PCI_EXP_SLTCTL_PWR_IND_OFF
l_.str.3:                               ; @.str.3
	.asciz	"Slot(%s): Action canceled due to button press\n"

l_.str.4:                               ; @.str.4
	.asciz	"Slot(%s): Ignoring invalid state %#x\n"

.subsections_via_symbols
