	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_sdio_rxfail
_brcmf_sdio_rxfail:                     ## @brcmf_sdio_rxfail
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r13
	movq	32(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	40(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testl	%esi, %esi
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rax, %rsi
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	testl	%edx, %edx
	leaq	L_.str.3(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_brcmf_err
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	movq	32(%r13), %rdi
	movl	(%rdi), %esi
	callq	_brcmf_sdiod_abort
LBB0_2:
	movq	32(%r13), %rdi
	movq	_SBSDIO_FUNC1_FRAMECTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SFC_RF_TERM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	callq	_brcmf_sdiod_writeb
	incq	16(%r13)
	movl	$65535, %r14d                   ## imm = 0xFFFF
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	leal	-1(%rbx), %eax
	addl	$65535, %ebx                    ## imm = 0xFFFF
	cmpl	$1, %ebx
	movl	%eax, %ebx
	jbe	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %r12d
	movq	32(%r13), %rdi
	movq	_SBSDIO_FUNC1_RFRAMEBCHI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %r14
	movq	%r14, %rdx
	callq	_brcmf_sdiod_readb
	movl	%eax, %r15d
	movq	32(%r13), %rdi
	movq	_SBSDIO_FUNC1_RFRAMEBCLO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdx
	callq	_brcmf_sdiod_readb
	addq	$2, 16(%r13)
	movl	%r15d, %ecx
	orl	%eax, %ecx
	je	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r12d, %ecx
	sarl	$8, %ecx
	movl	%r15d, %r14d
	shll	$8, %r14d
	addl	%eax, %r14d
	cmpl	%ecx, %r15d
	jle	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movzbl	%r12b, %ecx
	cmpl	%ecx, %eax
	jle	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	L_.str.4(%rip), %rdi
	movl	%r12d, %esi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_brcmf_err
	jmp	LBB0_7
LBB0_9:
	movq	_SDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	negl	%ebx
	leaq	L_.str.6(%rip), %rsi
	movl	%ebx, %edx
	callq	_brcmf_dbg
	jmp	LBB0_10
LBB0_8:
	leaq	L_.str.5(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_brcmf_err
LBB0_10:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, %eax
	je	LBB0_13
## %bb.11:
	incl	24(%r13)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rbx
	movq	_tosbmailbox@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SD_REG
	addq	%rax, %rbx
	movq	_SMB_NAK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rcx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_brcmf_sdiod_writel
	incq	16(%r13)
	cmpl	$0, -44(%rbp)
	jne	LBB0_13
## %bb.12:
	movl	$1, (%r13)
LBB0_13:
	movq	$0, 8(%r13)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%sterminate frame%s\n"

L_.str.1:                               ## @.str.1
	.asciz	"abort command, "

L_.str.2:                               ## @.str.2
	.space	1

L_.str.3:                               ## @.str.3
	.asciz	", send NAK"

	.comm	_SBSDIO_FUNC1_FRAMECTRL,4,2     ## @SBSDIO_FUNC1_FRAMECTRL
	.comm	_SFC_RF_TERM,4,2                ## @SFC_RF_TERM
	.comm	_SBSDIO_FUNC1_RFRAMEBCHI,4,2    ## @SBSDIO_FUNC1_RFRAMEBCHI
	.comm	_SBSDIO_FUNC1_RFRAMEBCLO,4,2    ## @SBSDIO_FUNC1_RFRAMEBCLO
L_.str.4:                               ## @.str.4
	.asciz	"count growing: last 0x%04x now 0x%04x\n"

L_.str.5:                               ## @.str.5
	.asciz	"count never zeroed: last 0x%04x\n"

	.comm	_SDIO,4,2                       ## @SDIO
L_.str.6:                               ## @.str.6
	.asciz	"flush took %d iterations\n"

	.comm	_tosbmailbox,4,2                ## @tosbmailbox
	.comm	_SMB_NAK,4,2                    ## @SMB_NAK
	.no_dead_strip	_brcmf_sdio_rxfail
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_sdio_rxfail
_brcmf_sdio_rxfail:                     ; @brcmf_sdio_rxfail
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldr	x9, [x0, #32]
	ldr	x8, [x0, #40]
	stp	x8, x9, [sp, #24]               ; 16-byte Folded Spill
Lloh0:
	adrp	x8, l_.str.1@PAGE
Lloh1:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh2:
	adrp	x9, l_.str.2@PAGE
Lloh3:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w1, #0
	csel	x8, x9, x8, eq
Lloh4:
	adrp	x10, l_.str.3@PAGE
Lloh5:
	add	x10, x10, l_.str.3@PAGEOFF
	cmp	w2, #0
	csel	x9, x9, x10, eq
	stp	x8, x9, [sp]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_brcmf_err
	cbz	w22, LBB0_2
; %bb.1:
	ldr	x0, [x19, #32]
	ldr	w1, [x0]
	bl	_brcmf_sdiod_abort
LBB0_2:
	ldr	x0, [x19, #32]
Lloh8:
	adrp	x8, _SBSDIO_FUNC1_FRAMECTRL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SBSDIO_FUNC1_FRAMECTRL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _SFC_RF_TERM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SFC_RF_TERM@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	add	x3, sp, #44
	bl	_brcmf_sdiod_writeb
	mov	w25, #0
	ldr	x8, [x19, #16]
	add	x8, x8, #1
	str	x8, [x19, #16]
Lloh14:
	adrp	x26, _SBSDIO_FUNC1_RFRAMEBCHI@GOTPAGE
Lloh15:
	ldr	x26, [x26, _SBSDIO_FUNC1_RFRAMEBCHI@GOTPAGEOFF]
	mov	w27, #65535
Lloh16:
	adrp	x28, _SBSDIO_FUNC1_RFRAMEBCLO@GOTPAGE
Lloh17:
	ldr	x28, [x28, _SBSDIO_FUNC1_RFRAMEBCLO@GOTPAGEOFF]
Lloh18:
	adrp	x22, l_.str.4@PAGE
Lloh19:
	add	x22, x22, l_.str.4@PAGEOFF
	mov	w20, #65535
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w8, w25, w27
	sub	w25, w25, #1
	mov	x20, x24
	cmp	w8, #1
	b.ls	LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19, #32]
	ldr	w1, [x26]
	add	x2, sp, #44
	bl	_brcmf_sdiod_readb
	mov	x23, x0
	ldr	x0, [x19, #32]
	ldr	w1, [x28]
	add	x2, sp, #44
	bl	_brcmf_sdiod_readb
	ldr	x8, [x19, #16]
	add	x8, x8, #2
	str	x8, [x19, #16]
	orr	w8, w23, w0
	cbz	w8, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	and	w8, w20, #0xff
	add	w24, w0, w23, lsl #8
	cmp	w23, w20, asr #8
	ccmp	w0, w8, #4, gt
	b.le	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	stp	x20, x24, [sp]
	mov	x0, x22
	bl	_brcmf_err
	b	LBB0_3
LBB0_7:
Lloh20:
	adrp	x8, _SDIO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SDIO@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	neg	w2, w25
Lloh23:
	adrp	x1, l_.str.6@PAGE
Lloh24:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_brcmf_dbg
	cbnz	w21, LBB0_9
	b	LBB0_11
LBB0_8:
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
	str	x24, [sp]
Lloh25:
	adrp	x0, l_.str.5@PAGE
Lloh26:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_brcmf_err
	cbz	w21, LBB0_11
LBB0_9:
	ldr	w8, [x19, #24]
	add	w8, w8, #1
	str	w8, [x19, #24]
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	ldr	x20, [x8]
Lloh27:
	adrp	x8, _tosbmailbox@GOTPAGE
Lloh28:
	ldr	x8, [x8, _tosbmailbox@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	bl	_SD_REG
	add	x1, x0, x20
Lloh30:
	adrp	x8, _SMB_NAK@GOTPAGE
Lloh31:
	ldr	x8, [x8, _SMB_NAK@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
	add	x3, sp, #44
	ldr	x0, [sp, #32]                   ; 8-byte Folded Reload
	bl	_brcmf_sdiod_writel
	ldr	x8, [x19, #16]
	add	x8, x8, #1
	str	x8, [x19, #16]
	ldr	w8, [sp, #44]
	cbnz	w8, LBB0_11
; %bb.10:
	mov	w8, #1
	str	w8, [x19]
LBB0_11:
	str	xzr, [x19, #8]
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%sterminate frame%s\n"

l_.str.1:                               ; @.str.1
	.asciz	"abort command, "

l_.str.2:                               ; @.str.2
	.space	1

l_.str.3:                               ; @.str.3
	.asciz	", send NAK"

	.comm	_SBSDIO_FUNC1_FRAMECTRL,4,2     ; @SBSDIO_FUNC1_FRAMECTRL
	.comm	_SFC_RF_TERM,4,2                ; @SFC_RF_TERM
	.comm	_SBSDIO_FUNC1_RFRAMEBCHI,4,2    ; @SBSDIO_FUNC1_RFRAMEBCHI
	.comm	_SBSDIO_FUNC1_RFRAMEBCLO,4,2    ; @SBSDIO_FUNC1_RFRAMEBCLO
l_.str.4:                               ; @.str.4
	.asciz	"count growing: last 0x%04x now 0x%04x\n"

l_.str.5:                               ; @.str.5
	.asciz	"count never zeroed: last 0x%04x\n"

	.comm	_SDIO,4,2                       ; @SDIO
l_.str.6:                               ; @.str.6
	.asciz	"flush took %d iterations\n"

	.comm	_tosbmailbox,4,2                ; @tosbmailbox
	.comm	_SMB_NAK,4,2                    ; @SMB_NAK
	.no_dead_strip	_brcmf_sdio_rxfail
.subsections_via_symbols
