	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_sdio_read_control
_brcmf_sdio_read_control:               ## @brcmf_sdio_read_control
	.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
	movq	%rcx, %rbx
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	_SDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_brcmf_dbg
	movq	88(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_33
## %bb.1:
	callq	_vzalloc
	testq	%rax, %rax
	je	LBB0_33
## %bb.2:
	movq	%rax, %rcx
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	(%r13), %r15
	movq	80(%r13), %rbx
	movq	%rbx, %rax
	orq	%r15, %rax
	shrq	$32, %rax
	je	LBB0_3
## %bb.4:
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%r15
	jmp	LBB0_5
LBB0_3:
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%r15d
                                        ## kill: def $edx killed $edx def $rdx
LBB0_5:
	subq	%rdx, %r15
	testq	%rdx, %rdx
	cmoveq	%rdx, %r15
	movq	_BRCMF_FIRSTREAD@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rcx, %rdi
	movq	%r12, %rsi
	movq	%rax, %r12
	callq	_memcpy
	movq	(%r12), %rsi
	cmpq	%r14, %rsi
	jge	LBB0_28
## %bb.6:
	movq	%r14, %rax
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	subq	%rsi, %r14
	movq	8(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_15
## %bb.7:
	movq	16(%r13), %rcx
	testq	%rcx, %rcx
	je	LBB0_15
## %bb.8:
	cmpq	%rcx, %r14
	jle	LBB0_15
## %bb.9:
	movq	%r14, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_10
## %bb.11:
	movq	%r14, %rax
	cqto
	idivq	%rcx
	testq	%rdx, %rdx
	jg	LBB0_13
	jmp	LBB0_20
LBB0_15:
	movq	(%r13), %rcx
	movq	%r14, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_16
## %bb.17:
	movq	%r14, %rax
	xorl	%edx, %edx
	divq	%rcx
	testq	%rdx, %rdx
	jne	LBB0_19
	jmp	LBB0_20
LBB0_16:
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	testq	%rdx, %rdx
	je	LBB0_20
LBB0_19:
	addq	%r14, %rcx
	subq	%rdx, %rcx
	movq	%rcx, %r14
	jmp	LBB0_20
LBB0_10:
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	testq	%rdx, %rdx
	jle	LBB0_20
LBB0_13:
	subq	%rdx, %rcx
	cmpq	%rdi, %rcx
	jg	LBB0_20
## %bb.14:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	%rcx, %rax
	movq	72(%r13), %rdx
	movq	(%rdx), %rdx
	xorl	%edi, %edi
	cmpq	(%rdx), %rax
	cmovlq	%rcx, %rdi
	addq	%rdi, %r14
LBB0_20:
	addq	%r14, %rsi
	movq	72(%r13), %rdi
	movq	(%rdi), %rax
	movq	(%rax), %rcx
	cmpq	%rcx, %rsi
	jle	LBB0_23
## %bb.21:
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	movq	%rcx, %rdx
	xorl	%eax, %eax
	callq	_brcmf_err
	jmp	LBB0_22
LBB0_23:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%rsi, %rdx
	subq	-64(%rbp), %rdx                 ## 8-byte Folded Reload
	cmpq	%rcx, %rdx
	jle	LBB0_25
## %bb.24:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_brcmf_err
	incl	64(%r13)
LBB0_22:
	movq	%r13, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_brcmf_sdio_rxfail
	jmp	LBB0_33
LBB0_25:
	leaq	(%rbx,%r15,4), %rbx
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_brcmf_sdiod_recv_buf
	incl	60(%r13)
	testl	%eax, %eax
	js	LBB0_26
## %bb.27:
	movq	(%r12), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_memcpy
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_28:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_BRCMF_BYTES_ON
	testq	%rax, %rax
	je	LBB0_30
## %bb.29:
	xorl	%eax, %eax
	callq	_BRCMF_CTL_ON
	xorl	%ebx, %ebx
	testq	%rax, %rax
	setne	%bl
LBB0_30:
	leaq	L_.str.4(%rip), %rcx
	movl	%ebx, %edi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_brcmf_dbg_hex_dump
	leaq	32(%r13), %r15
	movq	%r15, %rdi
	callq	_spin_lock_bh
	cmpq	$0, 48(%r13)
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	je	LBB0_32
## %bb.31:
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_brcmf_err
	movq	%r15, %rdi
	callq	_spin_unlock_bh
	movq	%rbx, %rdi
	callq	_vfree
	jmp	LBB0_33
LBB0_32:
	leaq	(%rbx,%rcx,4), %rax
	movq	%rax, 48(%r13)
	movq	%rbx, 40(%r13)
	subq	%rcx, %r14
	movq	%r14, 24(%r13)
	movq	%r15, %rdi
	callq	_spin_unlock_bh
LBB0_33:
	movq	%r13, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_brcmf_sdio_dcmd_resp_wake      ## TAILCALL
LBB0_26:
	leaq	L_.str.3(%rip), %rdi
	movq	%r14, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_brcmf_err
	incl	56(%r13)
	movq	%r13, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_brcmf_sdio_rxfail
	jmp	LBB0_33
	.cfi_endproc
                                        ## -- End function
	.comm	_SDIO,4,2                       ## @SDIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Enter\n"

	.comm	_BRCMF_FIRSTREAD,8,3            ## @BRCMF_FIRSTREAD
L_.str.1:                               ## @.str.1
	.asciz	"%d-byte control read exceeds %d-byte buffer\n"

L_.str.2:                               ## @.str.2
	.asciz	"%d-byte ctl frame (%d-byte ctl data) exceeds %d-byte limit\n"

L_.str.3:                               ## @.str.3
	.asciz	"read %d control bytes failed: %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"RxCtrl:\n"

L_.str.5:                               ## @.str.5
	.asciz	"last control frame is being processed.\n"

	.no_dead_strip	_brcmf_sdio_read_control
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_sdio_read_control
_brcmf_sdio_read_control:               ; @brcmf_sdio_read_control
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x21, x3
	mov	x20, x2
	mov	x23, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _SDIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDIO@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_brcmf_dbg
	ldr	x0, [x19, #88]
	cbz	x0, LBB0_22
; %bb.1:
	bl	_vzalloc
	cbz	x0, LBB0_22
; %bb.2:
	mov	x22, x0
	ldr	x24, [x19, #80]
	ldr	x8, [x19]
	udiv	x9, x24, x8
	msub	x9, x9, x8, x24
	sub	x8, x8, x9
	cmp	x9, #0
	csel	x26, xzr, x8, eq
Lloh5:
	adrp	x25, _BRCMF_FIRSTREAD@GOTPAGE
Lloh6:
	ldr	x25, [x25, _BRCMF_FIRSTREAD@GOTPAGEOFF]
	ldr	x2, [x25]
	mov	x1, x23
	bl	_memcpy
	ldr	x8, [x25]
	cmp	x8, x20
	b.ge	LBB0_17
; %bb.3:
	sub	x23, x20, x8
	ldr	x9, [x19, #8]
	cbz	x9, LBB0_8
; %bb.4:
	ldr	x10, [x19, #16]
	cbz	x10, LBB0_8
; %bb.5:
	cmp	x23, x10
	b.le	LBB0_8
; %bb.6:
	sdiv	x11, x23, x10
	msub	x11, x11, x10, x23
	sub	x10, x10, x11
	cmp	x11, #1
	ccmp	x10, x9, #0, ge
	b.gt	LBB0_10
; %bb.7:
	ldr	x9, [x19, #72]
	ldr	x9, [x9]
	ldr	x9, [x9]
	add	x11, x10, x20
	cmp	x11, x9
	csel	x9, x10, xzr, lt
	add	x23, x9, x23
	b	LBB0_10
LBB0_8:
	ldr	x9, [x19]
	udiv	x10, x23, x9
	msub	x10, x10, x9, x23
	cbz	x10, LBB0_10
; %bb.9:
	add	x9, x9, x23
	sub	x23, x9, x10
LBB0_10:
	ldr	x0, [x19, #72]
	ldr	x9, [x0]
	ldr	x9, [x9]
	add	x8, x23, x8
	cmp	x8, x9
	b.le	LBB0_12
; %bb.11:
	stp	x23, x9, [sp]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_brcmf_err
	b	LBB0_14
LBB0_12:
	sub	x8, x20, x21
	cmp	x8, x9
	b.le	LBB0_15
; %bb.13:
	stp	x8, x9, [sp, #8]
	str	x20, [sp]
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_brcmf_err
	ldr	w8, [x19, #64]
	add	w8, w8, #1
	str	w8, [x19, #64]
LBB0_14:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_brcmf_sdio_rxfail
	b	LBB0_22
LBB0_15:
	add	x24, x24, x26, lsl #2
	mov	x1, x24
	mov	x2, x23
	bl	_brcmf_sdiod_recv_buf
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x19, #60]
	add	w8, w8, #1
	str	w8, [x19, #60]
	tbnz	w0, #31, LBB0_23
; %bb.16:
	ldr	x8, [x25]
	add	x0, x22, x8, lsl #2
	mov	x1, x24
	mov	x2, x23
	bl	_memcpy
LBB0_17:
	bl	_BRCMF_BYTES_ON
	cbz	x0, LBB0_19
; %bb.18:
	bl	_BRCMF_CTL_ON
	cmp	x0, #0
	cset	w0, ne
LBB0_19:
Lloh11:
	adrp	x3, l_.str.4@PAGE
Lloh12:
	add	x3, x3, l_.str.4@PAGEOFF
	mov	x1, x22
	mov	x2, x20
	bl	_brcmf_dbg_hex_dump
	add	x23, x19, #32
	mov	x0, x23
	bl	_spin_lock_bh
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_21
; %bb.20:
Lloh13:
	adrp	x0, l_.str.5@PAGE
Lloh14:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_brcmf_err
	mov	x0, x23
	bl	_spin_unlock_bh
	mov	x0, x22
	bl	_vfree
	b	LBB0_22
LBB0_21:
	add	x8, x22, x21, lsl #2
	stp	x22, x8, [x19, #40]
	sub	x8, x20, x21
	str	x8, [x19, #24]
	mov	x0, x23
	bl	_spin_unlock_bh
LBB0_22:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_brcmf_sdio_dcmd_resp_wake
LBB0_23:
	stp	x23, x0, [sp]
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_brcmf_err
	ldr	w8, [x19, #56]
	add	w8, w8, #1
	str	w8, [x19, #56]
	mov	x0, x19
	mov	w1, #1
	mov	w2, #1
	bl	_brcmf_sdio_rxfail
	b	LBB0_22
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_SDIO,4,2                       ; @SDIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enter\n"

	.comm	_BRCMF_FIRSTREAD,8,3            ; @BRCMF_FIRSTREAD
l_.str.1:                               ; @.str.1
	.asciz	"%d-byte control read exceeds %d-byte buffer\n"

l_.str.2:                               ; @.str.2
	.asciz	"%d-byte ctl frame (%d-byte ctl data) exceeds %d-byte limit\n"

l_.str.3:                               ; @.str.3
	.asciz	"read %d control bytes failed: %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"RxCtrl:\n"

l_.str.5:                               ; @.str.5
	.asciz	"last control frame is being processed.\n"

	.no_dead_strip	_brcmf_sdio_read_control
.subsections_via_symbols
