	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_b43legacy_dma_init             ## -- Begin function b43legacy_dma_init
	.p2align	4, 0x90
_b43legacy_dma_init:                    ## @b43legacy_dma_init
	.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, %r12
	callq	_b43legacy_engine_type
	movl	%eax, %r15d
	movq	8(%r12), %rax
	movl	4(%rax), %ebx
	movl	%r15d, %edi
	callq	_DMA_BIT_MASK
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_dma_set_mask_and_coherent
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	4(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_b43legacyerr
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_20
LBB0_2:
	movq	8(%r12), %rdi
	callq	_ssb_dma_translation
	movl	%eax, 80(%r12)
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	movl	%r15d, %ecx
	callq	_b43legacy_setup_dmaring
	testq	%rax, %rax
	je	LBB0_20
## %bb.3:
	movq	%rax, 16(%r12)
	movq	%r12, %rdi
	movl	$1, %esi
	movl	$1, %edx
	movl	%r15d, %ecx
	callq	_b43legacy_setup_dmaring
	testq	%rax, %rax
	je	LBB0_19
## %bb.4:
	movq	%rax, 24(%r12)
	movq	%r12, %rdi
	movl	$2, %esi
	movl	$1, %edx
	movl	%r15d, %ecx
	callq	_b43legacy_setup_dmaring
	testq	%rax, %rax
	je	LBB0_18
## %bb.5:
	movq	%rax, 32(%r12)
	movq	%r12, %rdi
	movl	$3, %esi
	movl	$1, %edx
	movl	%r15d, %ecx
	callq	_b43legacy_setup_dmaring
	testq	%rax, %rax
	je	LBB0_17
## %bb.6:
	movq	%rax, 40(%r12)
	movq	%r12, %rdi
	movl	$4, %esi
	movl	$1, %edx
	movl	%r15d, %ecx
	callq	_b43legacy_setup_dmaring
	testq	%rax, %rax
	je	LBB0_16
## %bb.7:
	movq	%rax, 48(%r12)
	movq	%r12, %rdi
	movl	$5, %esi
	movl	$1, %edx
	movl	%r15d, %ecx
	callq	_b43legacy_setup_dmaring
	testq	%rax, %rax
	je	LBB0_15
## %bb.8:
	movq	%rax, 56(%r12)
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%r15d, %ecx
	callq	_b43legacy_setup_dmaring
	testq	%rax, %rax
	je	LBB0_14
## %bb.9:
	movq	%rax, 64(%r12)
	movq	8(%r12), %rax
	cmpl	$4, (%rax)
	jg	LBB0_12
## %bb.10:
	movq	%r12, %rdi
	movl	$3, %esi
	xorl	%edx, %edx
	movl	%r15d, %ecx
	callq	_b43legacy_setup_dmaring
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movq	%rax, 72(%r12)
LBB0_12:
	movl	4(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	callq	_b43legacydbg
	xorl	%r14d, %r14d
	jmp	LBB0_20
LBB0_13:
	movq	64(%r12), %rdi
	callq	_b43legacy_destroy_dmaring
	movq	$0, 64(%r12)
LBB0_14:
	movq	56(%r12), %rdi
	callq	_b43legacy_destroy_dmaring
	movq	$0, 56(%r12)
LBB0_15:
	movq	48(%r12), %rdi
	callq	_b43legacy_destroy_dmaring
	movq	$0, 48(%r12)
LBB0_16:
	movq	40(%r12), %rdi
	callq	_b43legacy_destroy_dmaring
	movq	$0, 40(%r12)
LBB0_17:
	movq	32(%r12), %rdi
	callq	_b43legacy_destroy_dmaring
	movq	$0, 32(%r12)
LBB0_18:
	movq	24(%r12), %rdi
	callq	_b43legacy_destroy_dmaring
	movq	$0, 24(%r12)
LBB0_19:
	movq	16(%r12), %rdi
	callq	_b43legacy_destroy_dmaring
	movq	$0, 16(%r12)
LBB0_20:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DMA for this device not supported and no PIO support compiled in\n"

	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"%u-bit DMA initialized\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_b43legacy_dma_init             ; -- Begin function b43legacy_dma_init
	.p2align	2
_b43legacy_dma_init:                    ; @b43legacy_dma_init
	.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
	bl	_b43legacy_engine_type
	mov	x21, x0
	ldr	x8, [x19, #8]
	ldr	w20, [x8, #4]
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x20
	bl	_dma_set_mask_and_coherent
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_b43legacyerr
Lloh2:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_20
LBB0_2:
	ldr	x0, [x19, #8]
	bl	_ssb_dma_translation
	str	w0, [x19, #80]
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w20, w8
	mov	x0, x19
	mov	w1, #0
	mov	w2, #1
	mov	x3, x21
	bl	_b43legacy_setup_dmaring
	cbz	x0, LBB0_20
; %bb.3:
	str	x0, [x19, #16]
	mov	x0, x19
	mov	w1, #1
	mov	w2, #1
	mov	x3, x21
	bl	_b43legacy_setup_dmaring
	cbz	x0, LBB0_19
; %bb.4:
	str	x0, [x19, #24]
	mov	x0, x19
	mov	w1, #2
	mov	w2, #1
	mov	x3, x21
	bl	_b43legacy_setup_dmaring
	cbz	x0, LBB0_18
; %bb.5:
	str	x0, [x19, #32]
	mov	x0, x19
	mov	w1, #3
	mov	w2, #1
	mov	x3, x21
	bl	_b43legacy_setup_dmaring
	cbz	x0, LBB0_17
; %bb.6:
	str	x0, [x19, #40]
	mov	x0, x19
	mov	w1, #4
	mov	w2, #1
	mov	x3, x21
	bl	_b43legacy_setup_dmaring
	cbz	x0, LBB0_16
; %bb.7:
	str	x0, [x19, #48]
	mov	x0, x19
	mov	w1, #5
	mov	w2, #1
	mov	x3, x21
	bl	_b43legacy_setup_dmaring
	cbz	x0, LBB0_15
; %bb.8:
	str	x0, [x19, #56]
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	mov	x3, x21
	bl	_b43legacy_setup_dmaring
	cbz	x0, LBB0_14
; %bb.9:
	str	x0, [x19, #64]
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	cmp	w8, #4
	b.gt	LBB0_12
; %bb.10:
	mov	x0, x19
	mov	w1, #3
	mov	w2, #0
	mov	x3, x21
	bl	_b43legacy_setup_dmaring
	cbz	x0, LBB0_13
; %bb.11:
	str	x0, [x19, #72]
LBB0_12:
	ldr	w0, [x19, #4]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_b43legacydbg
	mov	w20, #0
	b	LBB0_20
LBB0_13:
	ldr	x0, [x19, #64]
	bl	_b43legacy_destroy_dmaring
	str	xzr, [x19, #64]
LBB0_14:
	ldr	x0, [x19, #56]
	bl	_b43legacy_destroy_dmaring
	str	xzr, [x19, #56]
LBB0_15:
	ldr	x0, [x19, #48]
	bl	_b43legacy_destroy_dmaring
	str	xzr, [x19, #48]
LBB0_16:
	ldr	x0, [x19, #40]
	bl	_b43legacy_destroy_dmaring
	str	xzr, [x19, #40]
LBB0_17:
	ldr	x0, [x19, #32]
	bl	_b43legacy_destroy_dmaring
	str	xzr, [x19, #32]
LBB0_18:
	ldr	x0, [x19, #24]
	bl	_b43legacy_destroy_dmaring
	str	xzr, [x19, #24]
LBB0_19:
	ldr	x0, [x19, #16]
	bl	_b43legacy_destroy_dmaring
	str	xzr, [x19, #16]
LBB0_20:
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DMA for this device not supported and no PIO support compiled in\n"

	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"%u-bit DMA initialized\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
.subsections_via_symbols
