	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function if_cs_interrupt
_if_cs_interrupt:                       ## @if_cs_interrupt
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	(%rsi), %r15
	movq	_IF_CS_CARD_INT_CAUSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_if_cs_read16
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_lbs_deb_cs
	testl	%ebx, %ebx
	je	LBB0_1
## %bb.2:
	cmpl	$65535, %ebx                    ## imm = 0xFFFF
	jne	LBB0_4
## %bb.3:
	movq	(%r14), %rax
	movl	$1, (%rax)
	jmp	LBB0_14
LBB0_1:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_4:
	movq	_IF_CS_BIT_RX@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_7
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_lbs_deb_cs
	movq	%r15, %rdi
	callq	_if_cs_receive_data
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_lbs_process_rxed_packet
LBB0_7:
	movq	_IF_CS_BIT_TX@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_lbs_deb_cs
	movq	%r15, %rdi
	callq	_lbs_host_to_card_done
LBB0_9:
	movq	_IF_CS_BIT_RESP@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_11
## %bb.10:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_lbs_deb_cs
	leaq	24(%r15), %r12
	movq	%r12, %rdi
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	xorl	%r13d, %r13d
	cmpq	$0, 8(%r15)
	sete	%r13b
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	32(%r15), %rax
	leaq	(,%r13,4), %r12
	movl	(%rax,%r13,4), %edi
	callq	_BUG_ON
	movq	40(%r15), %rax
	movl	(%rax,%r13,4), %esi
	addq	32(%r15), %r12
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_if_cs_receive_cmdres
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_lbs_notify_command_response
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
LBB0_11:
	movq	_IF_CS_BIT_EVENT@GOTPCREL(%rip), %r13
	testl	%ebx, (%r13)
	je	LBB0_13
## %bb.12:
	movq	16(%r15), %rdi
	movq	_IF_CS_CARD_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_if_cs_read16
	movl	%eax, %r12d
	movq	16(%r15), %rdi
	movq	_IF_CS_HOST_INT_CAUSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	callq	_if_cs_write16
	movq	_IF_CS_CARD_STATUS_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r12d
	sarl	$8, %r12d
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_lbs_queue_event
LBB0_13:
	movq	_IF_CS_CARD_INT_CAUSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IF_CS_BIT_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_if_cs_write16
LBB0_14:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IF_CS_CARD_INT_CAUSE,4,2       ## @IF_CS_CARD_INT_CAUSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cause 0x%04x\n"

	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_IF_CS_BIT_RX,4,2               ## @IF_CS_BIT_RX
L_.str.1:                               ## @.str.1
	.asciz	"rx packet\n"

	.comm	_IF_CS_BIT_TX,4,2               ## @IF_CS_BIT_TX
L_.str.2:                               ## @.str.2
	.asciz	"tx done\n"

	.comm	_IF_CS_BIT_RESP,4,2             ## @IF_CS_BIT_RESP
L_.str.3:                               ## @.str.3
	.asciz	"cmd resp\n"

	.comm	_IF_CS_BIT_EVENT,4,2            ## @IF_CS_BIT_EVENT
	.comm	_IF_CS_CARD_STATUS,4,2          ## @IF_CS_CARD_STATUS
	.comm	_IF_CS_HOST_INT_CAUSE,4,2       ## @IF_CS_HOST_INT_CAUSE
	.comm	_IF_CS_CARD_STATUS_MASK,4,2     ## @IF_CS_CARD_STATUS_MASK
	.comm	_IF_CS_BIT_MASK,4,2             ## @IF_CS_BIT_MASK
	.no_dead_strip	_if_cs_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function if_cs_interrupt
_if_cs_interrupt:                       ; @if_cs_interrupt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	ldr	x20, [x1]
Lloh0:
	adrp	x24, _IF_CS_CARD_INT_CAUSE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _IF_CS_CARD_INT_CAUSE@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x19
	bl	_if_cs_read16
	mov	x21, x0
	str	x21, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_lbs_deb_cs
	cbz	w21, LBB0_3
; %bb.1:
	mov	w8, #65535
	cmp	w21, w8
	b.ne	LBB0_4
; %bb.2:
	ldr	x8, [x19]
	mov	w9, #1
	str	w9, [x8]
	b	LBB0_14
LBB0_3:
Lloh4:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
	b	LBB0_15
LBB0_4:
Lloh6:
	adrp	x8, _IF_CS_BIT_RX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IF_CS_BIT_RX@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_7
; %bb.5:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_lbs_deb_cs
	mov	x0, x20
	bl	_if_cs_receive_data
	cbz	x0, LBB0_7
; %bb.6:
	mov	x1, x0
	mov	x0, x20
	bl	_lbs_process_rxed_packet
LBB0_7:
Lloh11:
	adrp	x8, _IF_CS_BIT_TX@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IF_CS_BIT_TX@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_9
; %bb.8:
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_lbs_deb_cs
	mov	x0, x20
	bl	_lbs_host_to_card_done
LBB0_9:
Lloh16:
	adrp	x8, _IF_CS_BIT_RESP@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IF_CS_BIT_RESP@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_11
; %bb.10:
Lloh19:
	adrp	x0, l_.str.3@PAGE
Lloh20:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_lbs_deb_cs
	add	x22, x20, #24
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	x8, [x20, #8]
	cmp	x8, #0
	cset	w23, eq
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	ldr	x8, [x20, #32]
	lsl	x25, x23, #2
	ldr	w0, [x8, x25]
	bl	_BUG_ON
	ldp	x9, x8, [x20, #32]
	ldr	w1, [x8, x25]
	add	x2, x9, x25
	mov	x0, x20
	bl	_if_cs_receive_cmdres
	mov	x0, x22
	bl	_spin_lock_irqsave
	mov	x0, x20
	mov	x1, x23
	bl	_lbs_notify_command_response
	mov	x0, x22
	bl	_spin_unlock_irqrestore
LBB0_11:
Lloh21:
	adrp	x23, _IF_CS_BIT_EVENT@GOTPAGE
Lloh22:
	ldr	x23, [x23, _IF_CS_BIT_EVENT@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w21
	b.eq	LBB0_13
; %bb.12:
	ldr	x0, [x20, #16]
Lloh23:
	adrp	x8, _IF_CS_CARD_STATUS@GOTPAGE
Lloh24:
	ldr	x8, [x8, _IF_CS_CARD_STATUS@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	bl	_if_cs_read16
	mov	x22, x0
	ldr	x0, [x20, #16]
Lloh26:
	adrp	x8, _IF_CS_HOST_INT_CAUSE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _IF_CS_HOST_INT_CAUSE@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	ldr	w2, [x23]
	bl	_if_cs_write16
Lloh29:
	adrp	x8, _IF_CS_CARD_STATUS_MASK@GOTPAGE
Lloh30:
	ldr	x8, [x8, _IF_CS_CARD_STATUS_MASK@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	and	w8, w8, w22
	asr	w1, w8, #8
	mov	x0, x20
	bl	_lbs_queue_event
LBB0_13:
	ldr	w1, [x24]
Lloh32:
	adrp	x8, _IF_CS_BIT_MASK@GOTPAGE
Lloh33:
	ldr	x8, [x8, _IF_CS_BIT_MASK@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	and	w2, w8, w21
	mov	x0, x19
	bl	_if_cs_write16
LBB0_14:
Lloh35:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh36:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
LBB0_15:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_IF_CS_CARD_INT_CAUSE,4,2       ; @IF_CS_CARD_INT_CAUSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cause 0x%04x\n"

	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_IF_CS_BIT_RX,4,2               ; @IF_CS_BIT_RX
l_.str.1:                               ; @.str.1
	.asciz	"rx packet\n"

	.comm	_IF_CS_BIT_TX,4,2               ; @IF_CS_BIT_TX
l_.str.2:                               ; @.str.2
	.asciz	"tx done\n"

	.comm	_IF_CS_BIT_RESP,4,2             ; @IF_CS_BIT_RESP
l_.str.3:                               ; @.str.3
	.asciz	"cmd resp\n"

	.comm	_IF_CS_BIT_EVENT,4,2            ; @IF_CS_BIT_EVENT
	.comm	_IF_CS_CARD_STATUS,4,2          ; @IF_CS_CARD_STATUS
	.comm	_IF_CS_HOST_INT_CAUSE,4,2       ; @IF_CS_HOST_INT_CAUSE
	.comm	_IF_CS_CARD_STATUS_MASK,4,2     ; @IF_CS_CARD_STATUS_MASK
	.comm	_IF_CS_BIT_MASK,4,2             ; @IF_CS_BIT_MASK
	.no_dead_strip	_if_cs_interrupt
.subsections_via_symbols
