	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dmacontroller_setup
_dmacontroller_setup:                   ## @dmacontroller_setup
	.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	%rdi, %rbx
	movq	24(%rdi), %rax
	movl	(%rax), %r14d
	movl	16(%rdi), %r15d
	cmpq	$0, 8(%rdi)
	je	LBB0_2
## %bb.1:
	movq	_SSB_DMA_TRANSLATION_MASK@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	andl	%r15d, %edx
	movq	_SSB_DMA_TRANSLATION_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %edx
	movq	_B43legacy_DMA32_TXADDREXT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %edx
	movq	_B43legacy_DMA32_TXENABLE@GOTPCREL(%rip), %rax
	movq	_B43legacy_DMA32_TXADDREXT_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_B43legacy_DMA32_TXCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_b43legacy_dma_write
	movq	_B43legacy_DMA32_TXRING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	notl	%edx
	andl	%r15d, %edx
	orl	%r14d, %edx
	movq	%rbx, %rdi
LBB0_4:
	callq	_b43legacy_dma_write
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_2:
	movq	%rbx, %rdi
	callq	_alloc_initial_descbuffers
	testl	%eax, %eax
	je	LBB0_3
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_SSB_DMA_TRANSLATION_MASK@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	andl	%r15d, %edx
	movq	_SSB_DMA_TRANSLATION_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %edx
	movl	(%rbx), %eax
	movq	_B43legacy_DMA32_RXFROFF_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	_B43legacy_DMA32_RXENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_B43legacy_DMA32_RXADDREXT_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	movq	_B43legacy_DMA32_RXADDREXT_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %edx
	orl	%eax, %edx
	movq	_B43legacy_DMA32_RXCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_b43legacy_dma_write
	movq	_B43legacy_DMA32_RXRING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	notl	%edx
	andl	%r15d, %edx
	orl	%r14d, %edx
	movq	%rbx, %rdi
	callq	_b43legacy_dma_write
	movq	_B43legacy_DMA32_RXINDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$200, %edx
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_SSB_DMA_TRANSLATION_MASK,4,2   ## @SSB_DMA_TRANSLATION_MASK
	.comm	_SSB_DMA_TRANSLATION_SHIFT,4,2  ## @SSB_DMA_TRANSLATION_SHIFT
	.comm	_B43legacy_DMA32_TXENABLE,4,2   ## @B43legacy_DMA32_TXENABLE
	.comm	_B43legacy_DMA32_TXADDREXT_SHIFT,4,2 ## @B43legacy_DMA32_TXADDREXT_SHIFT
	.comm	_B43legacy_DMA32_TXADDREXT_MASK,4,2 ## @B43legacy_DMA32_TXADDREXT_MASK
	.comm	_B43legacy_DMA32_TXCTL,4,2      ## @B43legacy_DMA32_TXCTL
	.comm	_B43legacy_DMA32_TXRING,4,2     ## @B43legacy_DMA32_TXRING
	.comm	_B43legacy_DMA32_RXFROFF_SHIFT,4,2 ## @B43legacy_DMA32_RXFROFF_SHIFT
	.comm	_B43legacy_DMA32_RXENABLE,4,2   ## @B43legacy_DMA32_RXENABLE
	.comm	_B43legacy_DMA32_RXADDREXT_SHIFT,4,2 ## @B43legacy_DMA32_RXADDREXT_SHIFT
	.comm	_B43legacy_DMA32_RXADDREXT_MASK,4,2 ## @B43legacy_DMA32_RXADDREXT_MASK
	.comm	_B43legacy_DMA32_RXCTL,4,2      ## @B43legacy_DMA32_RXCTL
	.comm	_B43legacy_DMA32_RXRING,4,2     ## @B43legacy_DMA32_RXRING
	.comm	_B43legacy_DMA32_RXINDEX,4,2    ## @B43legacy_DMA32_RXINDEX
	.no_dead_strip	_dmacontroller_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dmacontroller_setup
_dmacontroller_setup:                   ; @dmacontroller_setup
	.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, x0
	ldr	x8, [x0, #24]
	ldr	w20, [x8]
	ldr	w21, [x0, #16]
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_3
; %bb.1:
Lloh0:
	adrp	x22, _SSB_DMA_TRANSLATION_MASK@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SSB_DMA_TRANSLATION_MASK@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh2:
	adrp	x9, _SSB_DMA_TRANSLATION_SHIFT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SSB_DMA_TRANSLATION_SHIFT@GOTPAGEOFF]
	and	w8, w8, w21
Lloh4:
	ldr	w9, [x9]
	asr	w8, w8, w9
Lloh5:
	adrp	x9, _B43legacy_DMA32_TXENABLE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _B43legacy_DMA32_TXENABLE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _B43legacy_DMA32_TXADDREXT_SHIFT@GOTPAGE
Lloh9:
	ldr	x10, [x10, _B43legacy_DMA32_TXADDREXT_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	lsl	w8, w8, w10
Lloh11:
	adrp	x10, _B43legacy_DMA32_TXADDREXT_MASK@GOTPAGE
Lloh12:
	ldr	x10, [x10, _B43legacy_DMA32_TXADDREXT_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	and	w8, w8, w10
	orr	w2, w8, w9
Lloh14:
	adrp	x8, _B43legacy_DMA32_TXCTL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _B43legacy_DMA32_TXCTL@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_b43legacy_dma_write
Lloh17:
	adrp	x8, _B43legacy_DMA32_TXRING@GOTPAGE
Lloh18:
	ldr	x8, [x8, _B43legacy_DMA32_TXRING@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	ldr	w8, [x22]
	bic	w8, w21, w8
	orr	w2, w8, w20
	mov	x0, x19
LBB0_2:
	bl	_b43legacy_dma_write
	mov	w0, #0
	b	LBB0_4
LBB0_3:
	mov	x0, x19
	bl	_alloc_initial_descbuffers
	cbz	w0, LBB0_5
LBB0_4:
	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
LBB0_5:
Lloh20:
	adrp	x22, _SSB_DMA_TRANSLATION_MASK@GOTPAGE
Lloh21:
	ldr	x22, [x22, _SSB_DMA_TRANSLATION_MASK@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh22:
	adrp	x9, _SSB_DMA_TRANSLATION_SHIFT@GOTPAGE
Lloh23:
	ldr	x9, [x9, _SSB_DMA_TRANSLATION_SHIFT@GOTPAGEOFF]
	and	w8, w8, w21
Lloh24:
	ldr	w9, [x9]
	asr	w8, w8, w9
	ldr	w9, [x19]
Lloh25:
	adrp	x10, _B43legacy_DMA32_RXFROFF_SHIFT@GOTPAGE
Lloh26:
	ldr	x10, [x10, _B43legacy_DMA32_RXFROFF_SHIFT@GOTPAGEOFF]
Lloh27:
	ldr	w10, [x10]
	lsl	w9, w9, w10
Lloh28:
	adrp	x10, _B43legacy_DMA32_RXENABLE@GOTPAGE
Lloh29:
	ldr	x10, [x10, _B43legacy_DMA32_RXENABLE@GOTPAGEOFF]
Lloh30:
	ldr	w10, [x10]
	orr	w9, w9, w10
Lloh31:
	adrp	x10, _B43legacy_DMA32_RXADDREXT_SHIFT@GOTPAGE
Lloh32:
	ldr	x10, [x10, _B43legacy_DMA32_RXADDREXT_SHIFT@GOTPAGEOFF]
Lloh33:
	ldr	w10, [x10]
	lsl	w8, w8, w10
Lloh34:
	adrp	x10, _B43legacy_DMA32_RXADDREXT_MASK@GOTPAGE
Lloh35:
	ldr	x10, [x10, _B43legacy_DMA32_RXADDREXT_MASK@GOTPAGEOFF]
Lloh36:
	ldr	w10, [x10]
	and	w8, w8, w10
	orr	w2, w9, w8
Lloh37:
	adrp	x8, _B43legacy_DMA32_RXCTL@GOTPAGE
Lloh38:
	ldr	x8, [x8, _B43legacy_DMA32_RXCTL@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_b43legacy_dma_write
Lloh40:
	adrp	x8, _B43legacy_DMA32_RXRING@GOTPAGE
Lloh41:
	ldr	x8, [x8, _B43legacy_DMA32_RXRING@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
	ldr	w8, [x22]
	bic	w8, w21, w8
	orr	w2, w8, w20
	mov	x0, x19
	bl	_b43legacy_dma_write
Lloh43:
	adrp	x8, _B43legacy_DMA32_RXINDEX@GOTPAGE
Lloh44:
	ldr	x8, [x8, _B43legacy_DMA32_RXINDEX@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #200
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_SSB_DMA_TRANSLATION_MASK,4,2   ; @SSB_DMA_TRANSLATION_MASK
	.comm	_SSB_DMA_TRANSLATION_SHIFT,4,2  ; @SSB_DMA_TRANSLATION_SHIFT
	.comm	_B43legacy_DMA32_TXENABLE,4,2   ; @B43legacy_DMA32_TXENABLE
	.comm	_B43legacy_DMA32_TXADDREXT_SHIFT,4,2 ; @B43legacy_DMA32_TXADDREXT_SHIFT
	.comm	_B43legacy_DMA32_TXADDREXT_MASK,4,2 ; @B43legacy_DMA32_TXADDREXT_MASK
	.comm	_B43legacy_DMA32_TXCTL,4,2      ; @B43legacy_DMA32_TXCTL
	.comm	_B43legacy_DMA32_TXRING,4,2     ; @B43legacy_DMA32_TXRING
	.comm	_B43legacy_DMA32_RXFROFF_SHIFT,4,2 ; @B43legacy_DMA32_RXFROFF_SHIFT
	.comm	_B43legacy_DMA32_RXENABLE,4,2   ; @B43legacy_DMA32_RXENABLE
	.comm	_B43legacy_DMA32_RXADDREXT_SHIFT,4,2 ; @B43legacy_DMA32_RXADDREXT_SHIFT
	.comm	_B43legacy_DMA32_RXADDREXT_MASK,4,2 ; @B43legacy_DMA32_RXADDREXT_MASK
	.comm	_B43legacy_DMA32_RXCTL,4,2      ; @B43legacy_DMA32_RXCTL
	.comm	_B43legacy_DMA32_RXRING,4,2     ; @B43legacy_DMA32_RXRING
	.comm	_B43legacy_DMA32_RXINDEX,4,2    ; @B43legacy_DMA32_RXINDEX
	.no_dead_strip	_dmacontroller_setup
.subsections_via_symbols
