	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_shpchp_handle_presence_change  ## -- Begin function shpchp_handle_presence_change
	.p2align	4, 0x90
_shpchp_handle_presence_change:         ## @shpchp_handle_presence_change
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_ctrl_dbg
	addl	(%r14), %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_shpchp_find_slot
	movq	%rax, %rbx
	movq	8(%rax), %rax
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	*(%rax)
	cmpq	$0, (%rbx)
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %r15
	cmoveq	%rax, %r15
	movq	_INT_PRESENCE_ON@GOTPCREL(%rip), %r12
	cmoveq	_INT_PRESENCE_OFF@GOTPCREL(%rip), %r12
	movq	%rbx, %rdi
	callq	_slot_name
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_ctrl_info
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_queue_interrupt_event
	movl	$1, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Presence/Notify input change\n"

L_.str.1:                               ## @.str.1
	.asciz	"Card present on Slot(%s)\n"

	.comm	_INT_PRESENCE_ON,4,2            ## @INT_PRESENCE_ON
L_.str.2:                               ## @.str.2
	.asciz	"Card not present on Slot(%s)\n"

	.comm	_INT_PRESENCE_OFF,4,2           ## @INT_PRESENCE_OFF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_shpchp_handle_presence_change  ; -- Begin function shpchp_handle_presence_change
	.p2align	2
_shpchp_handle_presence_change:         ; @shpchp_handle_presence_change
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ctrl_dbg
	ldr	w8, [x19]
	add	w1, w8, w20
	mov	x0, x19
	bl	_shpchp_find_slot
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	mov	x1, x0
	blr	x8
	ldr	x21, [x20]
	mov	x0, x20
	bl	_slot_name
	mov	x2, x0
Lloh2:
	adrp	x8, l_.str.1@PAGE
Lloh3:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh4:
	adrp	x9, l_.str.2@PAGE
Lloh5:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	x21, #0
	csel	x1, x9, x8, eq
Lloh6:
	adrp	x8, _INT_PRESENCE_OFF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _INT_PRESENCE_OFF@GOTPAGEOFF]
Lloh8:
	adrp	x9, _INT_PRESENCE_ON@GOTPAGE
Lloh9:
	ldr	x9, [x9, _INT_PRESENCE_ON@GOTPAGEOFF]
	csel	x21, x8, x9, eq
	mov	x0, x19
	bl	_ctrl_info
	ldr	w1, [x21]
	mov	x0, x20
	bl	_queue_interrupt_event
	mov	w0, #1
	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
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Presence/Notify input change\n"

l_.str.1:                               ; @.str.1
	.asciz	"Card present on Slot(%s)\n"

	.comm	_INT_PRESENCE_ON,4,2            ; @INT_PRESENCE_ON
l_.str.2:                               ; @.str.2
	.asciz	"Card not present on Slot(%s)\n"

	.comm	_INT_PRESENCE_OFF,4,2           ; @INT_PRESENCE_OFF
.subsections_via_symbols
