	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcms_b_attach_dmapio
_brcms_b_attach_dmapio:                 ## @brcms_b_attach_dmapio
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r13d
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %r15
	movl	(%r15), %ebx
	leaq	L_.str(%rip), %rdx
	leaq	-56(%rbp), %rdi
	movl	$8, %esi
	movl	%ebx, %ecx
	callq	_snprintf
	movq	24(%r15), %rax
	cmpq	$0, (%rax)
	je	LBB0_1
LBB0_16:
	movq	16(%r15), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_brcms_c_mhfdef
	movl	$1, %eax
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_20
## %bb.18:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	testl	%r13d, %r13d
	je	LBB0_2
## %bb.3:
	movq	_DMA_TX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_dmareg
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	jmp	LBB0_4
LBB0_2:
	movl	$0, -64(%rbp)                   ## 4-byte Folded Spill
LBB0_4:
	movl	%ebx, -68(%rbp)                 ## 4-byte Spill
	movq	_DMA_RX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_dmareg
	movq	_NTXD@GOTPCREL(%rip), %rbx
	testl	%r13d, %r13d
	je	LBB0_6
## %bb.5:
	movl	(%rbx), %r13d
LBB0_6:
	movq	_NRXD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movq	_RXBUFSZ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	movq	_NRXBUFPOST@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r11d
	movq	_BRCMS_HWRXOFF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	leaq	-56(%rbp), %rdi
	movq	%r12, %rsi
	movl	-64(%rbp), %edx                 ## 4-byte Reload
	movl	%eax, %ecx
	movl	%r13d, %r8d
	pushq	%r14
	pushq	%r11
	pushq	$-1
	pushq	%r10
	callq	_dma_attach
	addq	$32, %rsp
	movq	24(%r15), %rcx
	movq	%rax, (%rcx)
	movq	24(%r15), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_DMA_TX@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movl	$1, %esi
	callq	_dmareg
	movq	%rbx, %r14
	movl	(%rbx), %r8d
	leaq	-56(%rbp), %rbx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	pushq	$0
	pushq	$0
	pushq	$-1
	pushq	$0
	callq	_dma_attach
	addq	$32, %rsp
	movq	24(%r15), %rcx
	movq	%rax, 8(%rcx)
	movq	24(%r15), %rax
	movq	8(%rax), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	(%r13), %edi
	movl	$2, %esi
	callq	_dmareg
	movl	(%r14), %r8d
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	pushq	$0
	pushq	$0
	pushq	$-1
	pushq	$0
	callq	_dma_attach
	addq	$32, %rsp
	movq	24(%r15), %rcx
	movq	%rax, 16(%rcx)
	movq	24(%r15), %rax
	movq	16(%rax), %rbx
	movl	(%r13), %edi
	movl	$3, %esi
	callq	_dmareg
	movl	(%r14), %r8d
	leaq	-56(%rbp), %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	pushq	$0
	pushq	$0
	pushq	$-1
	pushq	$0
	callq	_dma_attach
	addq	$32, %rsp
	movq	24(%r15), %rcx
	movq	%rax, 24(%rcx)
	cmpq	$0, -64(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_19
## %bb.7:
	cmpq	$0, -80(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_19
## %bb.8:
	testq	%rbx, %rbx
	je	LBB0_19
## %bb.9:
	movq	24(%r15), %rcx
	cmpq	$0, 24(%rcx)
	je	LBB0_19
## %bb.10:
	movq	_NFIFO@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, %eax
	jle	LBB0_16
## %bb.11:
	movl	$1, %ebx
	leaq	L_.str.2(%rip), %r13
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	-8(%rcx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%r13, %rsi
	callq	_dma_getvar
	movq	8(%r15), %rcx
	movq	%rax, -8(%rcx,%rbx,8)
	movl	(%r14), %eax
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	24(%r15), %rcx
	incq	%rbx
	jmp	LBB0_12
LBB0_19:
	movl	32(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	-68(%rbp), %edx                 ## 4-byte Reload
	callq	_brcms_err
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wl%d"

	.comm	_DMA_TX,4,2                     ## @DMA_TX
	.comm	_DMA_RX,4,2                     ## @DMA_RX
	.comm	_NTXD,4,2                       ## @NTXD
	.comm	_NRXD,4,2                       ## @NRXD
	.comm	_RXBUFSZ,4,2                    ## @RXBUFSZ
	.comm	_NRXBUFPOST,4,2                 ## @NRXBUFPOST
	.comm	_BRCMS_HWRXOFF,4,2              ## @BRCMS_HWRXOFF
L_.str.1:                               ## @.str.1
	.asciz	"wl%d: wlc_attach: dma_attach failed\n"

	.comm	_NFIFO,4,2                      ## @NFIFO
L_.str.2:                               ## @.str.2
	.asciz	"&txavail"

	.no_dead_strip	_brcms_b_attach_dmapio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcms_b_attach_dmapio
_brcms_b_attach_dmapio:                 ; @brcms_b_attach_dmapio
	.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, x2
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x23, [x0]
	ldr	w20, [x23]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #16
	mov	w1, #8
	mov	x3, x20
	bl	_snprintf
	ldr	x8, [x23, #24]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
LBB0_1:
	ldr	x8, [x23, #16]
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_brcms_c_mhfdef
	mov	w0, #1
LBB0_2:
	ldr	x8, [sp, #24]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.3:
	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
	ret
LBB0_4:
Lloh8:
	adrp	x24, _DMA_TX@GOTPAGE
Lloh9:
	ldr	x24, [x24, _DMA_TX@GOTPAGEOFF]
	cbz	w21, LBB0_6
; %bb.5:
	ldr	w0, [x24]
	mov	w1, #0
	bl	_dmareg
	mov	x22, x0
	b	LBB0_7
LBB0_6:
	mov	w22, #0
LBB0_7:
Lloh10:
	adrp	x8, _DMA_RX@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DMA_RX@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_dmareg
	mov	x3, x0
Lloh13:
	adrp	x25, _NTXD@GOTPAGE
Lloh14:
	ldr	x25, [x25, _NTXD@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w21, #0
	csel	w4, wzr, w8, eq
Lloh15:
	adrp	x8, _NRXD@GOTPAGE
Lloh16:
	ldr	x8, [x8, _NRXD@GOTPAGEOFF]
Lloh17:
	ldr	w5, [x8]
Lloh18:
	adrp	x8, _RXBUFSZ@GOTPAGE
Lloh19:
	ldr	x8, [x8, _RXBUFSZ@GOTPAGEOFF]
Lloh20:
	ldr	w6, [x8]
Lloh21:
	adrp	x8, _NRXBUFPOST@GOTPAGE
Lloh22:
	ldr	x8, [x8, _NRXBUFPOST@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _BRCMS_HWRXOFF@GOTPAGE
Lloh25:
	ldr	x9, [x9, _BRCMS_HWRXOFF@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	stp	w8, w9, [sp]
	add	x0, sp, #16
	mov	x1, x19
	mov	x2, x22
	mov	w7, #-1
	bl	_dma_attach
	ldr	x8, [x23, #24]
	str	x0, [x8]
	ldr	x8, [x23, #24]
	ldr	x21, [x8]
	ldr	w0, [x24]
	mov	w1, #1
	bl	_dmareg
	mov	x2, x0
	ldr	w4, [x25]
	str	xzr, [sp]
	add	x0, sp, #16
	mov	x1, x19
	mov	w3, #0
	mov	w5, #0
	mov	w6, #0
	mov	w7, #-1
	bl	_dma_attach
	ldr	x8, [x23, #24]
	str	x0, [x8, #8]
	ldr	x8, [x23, #24]
	ldr	x22, [x8, #8]
	ldr	w0, [x24]
	mov	w1, #2
	bl	_dmareg
	mov	x2, x0
	ldr	w4, [x25]
	str	xzr, [sp]
	add	x0, sp, #16
	mov	x1, x19
	mov	w3, #0
	mov	w5, #0
	mov	w6, #0
	mov	w7, #-1
	bl	_dma_attach
	ldr	x8, [x23, #24]
	str	x0, [x8, #16]
	ldr	x8, [x23, #24]
	ldr	x26, [x8, #16]
	ldr	w0, [x24]
	mov	w1, #3
	bl	_dmareg
	mov	x2, x0
	ldr	w4, [x25]
	str	xzr, [sp]
	add	x0, sp, #16
	mov	x1, x19
	mov	w3, #0
	mov	w5, #0
	mov	w6, #0
	mov	w7, #-1
	bl	_dma_attach
	ldr	x8, [x23, #24]
	str	x0, [x8, #24]
	cbz	x21, LBB0_16
; %bb.8:
	cbz	x22, LBB0_16
; %bb.9:
	cbz	x26, LBB0_16
; %bb.10:
	ldr	x9, [x23, #24]
	ldr	x8, [x9, #24]
	cbz	x8, LBB0_16
; %bb.11:
Lloh27:
	adrp	x21, _NFIFO@GOTPAGE
Lloh28:
	ldr	x21, [x21, _NFIFO@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_1
; %bb.12:
	mov	x22, #0
Lloh29:
	adrp	x20, l_.str.2@PAGE
Lloh30:
	add	x20, x20, l_.str.2@PAGEOFF
	ldr	x0, [x9, x22, lsl #3]
	cbz	x0, LBB0_14
LBB0_13:
	mov	x1, x20
	bl	_dma_getvar
	ldr	x8, [x23, #8]
	str	x0, [x8, x22, lsl #3]
	ldr	w8, [x21]
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	add	x22, x22, #1
	cmp	x22, w8, sxtw
	b.ge	LBB0_1
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x9, [x23, #24]
	ldr	x0, [x9, x22, lsl #3]
	cbnz	x0, LBB0_13
	b	LBB0_14
LBB0_16:
	ldr	w0, [x23, #32]
Lloh31:
	adrp	x1, l_.str.1@PAGE
Lloh32:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_brcms_err
	mov	w0, #0
	b	LBB0_2
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wl%d"

	.comm	_DMA_TX,4,2                     ; @DMA_TX
	.comm	_DMA_RX,4,2                     ; @DMA_RX
	.comm	_NTXD,4,2                       ; @NTXD
	.comm	_NRXD,4,2                       ; @NRXD
	.comm	_RXBUFSZ,4,2                    ; @RXBUFSZ
	.comm	_NRXBUFPOST,4,2                 ; @NRXBUFPOST
	.comm	_BRCMS_HWRXOFF,4,2              ; @BRCMS_HWRXOFF
l_.str.1:                               ; @.str.1
	.asciz	"wl%d: wlc_attach: dma_attach failed\n"

	.comm	_NFIFO,4,2                      ; @NFIFO
l_.str.2:                               ; @.str.2
	.asciz	"&txavail"

	.no_dead_strip	_brcms_b_attach_dmapio
.subsections_via_symbols
