	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b43legacy_setup_dmaring
_b43legacy_setup_dmaring:               ## @b43legacy_setup_dmaring
	.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	%ecx, %ebx
	movl	%edx, %r14d
	movl	%esi, %r13d
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$64, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_24
## %bb.1:
	movq	%rax, %r12
	movl	%ebx, (%rax)
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, 56(%rax)
	testl	%r14d, %r14d
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%r13d, %r15d
	jne	LBB0_2
## %bb.3:
	movq	_B43legacy_RXRING_SLOTS@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_B43legacy_TXRING_SLOTS@GOTPCREL(%rip), %rax
LBB0_4:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rax), %r13d
	movl	(%rbx), %edx
	movl	%r13d, %edi
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, 24(%r12)
	testq	%rax, %rax
	je	LBB0_23
## %bb.5:
	testl	%r14d, %r14d
	je	LBB0_12
## %bb.6:
	movl	(%rbx), %edx
	movl	%r13d, %edi
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, 32(%r12)
	testq	%rax, %rax
	je	LBB0_22
## %bb.7:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movl	(%rcx), %edi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%rax, %rsi
	movl	$4, %edx
	callq	_dma_map_single
	movl	%eax, %r14d
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	$4, %edx
	movl	$1, %ecx
	callq	_b43legacy_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	32(%r12), %rdi
	callq	_kfree
	movq	_GFP_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%rbx), %edx
	movl	%r13d, %edi
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, 32(%r12)
	testq	%rax, %rax
	je	LBB0_22
## %bb.10:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rcx
	movl	(%rcx), %edi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%rax, %rsi
	movl	$4, %edx
	callq	_dma_map_single
	movl	%eax, %r14d
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	$4, %edx
	movl	$1, %ecx
	callq	_b43legacy_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_21
	jmp	LBB0_11
LBB0_12:
	movl	%r13d, 4(%r12)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r15d, %esi
	callq	_b43legacy_dmacontroller_base
	movl	%eax, 52(%r12)
	movl	%r15d, 8(%r12)
	cmpl	$3, %r15d
	je	LBB0_16
## %bb.13:
	testl	%r15d, %r15d
	jne	LBB0_17
## %bb.14:
	movq	_B43legacy_DMA0_RX_BUFFERSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r12)
	movq	_B43legacy_DMA0_RX_FRAMEOFFSET@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_8:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_11:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r14d, %esi
	movl	$4, %edx
	callq	_dma_unmap_single
	movl	%r13d, 4(%r12)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	%r15d, %esi
	callq	_b43legacy_dmacontroller_base
	movl	%eax, 52(%r12)
	movl	%r15d, 8(%r12)
	movabsq	$-4294967295, %rax              ## imm = 0xFFFFFFFF00000001
	movq	%rax, 12(%r12)
	jmp	LBB0_18
LBB0_16:
	movq	_B43legacy_DMA3_RX_BUFFERSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r12)
	movq	_B43legacy_DMA3_RX_FRAMEOFFSET@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %eax
	movl	%eax, 44(%r12)
	jmp	LBB0_18
LBB0_17:
	movl	$1, %edi
	callq	_B43legacy_WARN_ON
LBB0_18:
	movq	%r12, %rdi
	callq	_alloc_ringmemory
	testl	%eax, %eax
	jne	LBB0_21
## %bb.19:
	movq	%r12, %rdi
	callq	_dmacontroller_setup
	testl	%eax, %eax
	je	LBB0_25
## %bb.20:
	movq	%r12, %rdi
	callq	_free_ringmemory
LBB0_21:
	movq	32(%r12), %rdi
	callq	_kfree
LBB0_22:
	movq	24(%r12), %rdi
	callq	_kfree
LBB0_23:
	movq	%r12, %rdi
	callq	_kfree
LBB0_24:
	xorl	%r12d, %r12d
LBB0_25:
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_B43legacy_RXRING_SLOTS,4,2     ## @B43legacy_RXRING_SLOTS
	.comm	_B43legacy_TXRING_SLOTS,4,2     ## @B43legacy_TXRING_SLOTS
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_GFP_DMA,4,2                    ## @GFP_DMA
	.comm	_B43legacy_DMA0_RX_BUFFERSIZE,4,2 ## @B43legacy_DMA0_RX_BUFFERSIZE
	.comm	_B43legacy_DMA0_RX_FRAMEOFFSET,4,2 ## @B43legacy_DMA0_RX_FRAMEOFFSET
	.comm	_B43legacy_DMA3_RX_BUFFERSIZE,4,2 ## @B43legacy_DMA3_RX_BUFFERSIZE
	.comm	_B43legacy_DMA3_RX_FRAMEOFFSET,4,2 ## @B43legacy_DMA3_RX_FRAMEOFFSET
	.comm	_jiffies,4,2                    ## @jiffies
	.no_dead_strip	_b43legacy_setup_dmaring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function b43legacy_setup_dmaring
lCPI0_0:
	.long	1                               ; 0x1
	.long	4294967295                      ; 0xffffffff
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_b43legacy_setup_dmaring:               ; @b43legacy_setup_dmaring
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x24, x2
	mov	x20, x1
	mov	x22, x0
Lloh0:
	adrp	x25, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x25, [x25, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	w0, #64
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_20
; %bb.1:
	str	w21, [x19]
	str	x22, [x19, #56]
Lloh2:
	adrp	x8, _B43legacy_RXRING_SLOTS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _B43legacy_RXRING_SLOTS@GOTPAGEOFF]
Lloh4:
	adrp	x9, _B43legacy_TXRING_SLOTS@GOTPAGE
Lloh5:
	ldr	x9, [x9, _B43legacy_TXRING_SLOTS@GOTPAGEOFF]
	cmp	w24, #0
	csel	x8, x8, x9, eq
	ldr	w23, [x8]
	ldr	w2, [x25]
	mov	x0, x23
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x19, #24]
	cbz	x0, LBB0_19
; %bb.2:
	cbz	w24, LBB0_8
; %bb.3:
	ldr	w2, [x25]
	mov	x0, x23
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x19, #32]
	cbz	x0, LBB0_18
; %bb.4:
	mov	x1, x0
	ldr	x8, [x22]
	ldr	w0, [x8]
Lloh6:
	adrp	x26, _DMA_TO_DEVICE@GOTPAGE
Lloh7:
	ldr	x26, [x26, _DMA_TO_DEVICE@GOTPAGEOFF]
	ldr	w3, [x26]
	mov	w2, #4
	bl	_dma_map_single
	mov	x24, x0
	mov	x0, x19
	mov	x1, x24
	mov	w2, #4
	mov	w3, #1
	bl	_b43legacy_dma_mapping_error
	cbz	x0, LBB0_7
; %bb.5:
	ldr	x0, [x19, #32]
	bl	_kfree
	ldr	w8, [x25]
Lloh8:
	adrp	x9, _GFP_DMA@GOTPAGE
Lloh9:
	ldr	x9, [x9, _GFP_DMA@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x23
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x19, #32]
	cbz	x0, LBB0_18
; %bb.6:
	mov	x1, x0
	ldr	x8, [x22]
	ldr	w0, [x8]
	ldr	w3, [x26]
	mov	w2, #4
	bl	_dma_map_single
	mov	x24, x0
	mov	x0, x19
	mov	x1, x24
	mov	w2, #4
	mov	w3, #1
	bl	_b43legacy_dma_mapping_error
	cbnz	x0, LBB0_17
LBB0_7:
	ldr	x8, [x22]
	ldr	w0, [x8]
	ldr	w3, [x26]
	mov	x1, x24
	mov	w2, #4
	bl	_dma_unmap_single
	str	w23, [x19, #4]
	mov	x0, x21
	mov	x1, x20
	bl	_b43legacy_dmacontroller_base
	str	w0, [x19, #52]
	str	w20, [x19, #8]
Lloh11:
	adrp	x8, lCPI0_0@PAGE
Lloh12:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x19, #12]
	b	LBB0_14
LBB0_8:
	str	w23, [x19, #4]
	mov	x0, x21
	mov	x1, x20
	bl	_b43legacy_dmacontroller_base
	str	w0, [x19, #52]
	str	w20, [x19, #8]
	cmp	w20, #3
	b.eq	LBB0_11
; %bb.9:
	cbnz	w20, LBB0_13
; %bb.10:
Lloh13:
	adrp	x8, _B43legacy_DMA0_RX_BUFFERSIZE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _B43legacy_DMA0_RX_BUFFERSIZE@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _B43legacy_DMA0_RX_FRAMEOFFSET@GOTPAGE
Lloh17:
	ldr	x9, [x9, _B43legacy_DMA0_RX_FRAMEOFFSET@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh18:
	adrp	x8, _B43legacy_DMA3_RX_BUFFERSIZE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _B43legacy_DMA3_RX_BUFFERSIZE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _B43legacy_DMA3_RX_FRAMEOFFSET@GOTPAGE
Lloh22:
	ldr	x9, [x9, _B43legacy_DMA3_RX_FRAMEOFFSET@GOTPAGEOFF]
LBB0_12:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #44]
	b	LBB0_14
LBB0_13:
	mov	w0, #1
	bl	_B43legacy_WARN_ON
LBB0_14:
	mov	x0, x19
	bl	_alloc_ringmemory
	cbnz	w0, LBB0_17
; %bb.15:
	mov	x0, x19
	bl	_dmacontroller_setup
	cbz	w0, LBB0_20
; %bb.16:
	mov	x0, x19
	bl	_free_ringmemory
LBB0_17:
	ldr	x0, [x19, #32]
	bl	_kfree
LBB0_18:
	ldr	x0, [x19, #24]
	bl	_kfree
LBB0_19:
	mov	x0, x19
	bl	_kfree
	mov	x19, #0
LBB0_20:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdr	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_B43legacy_RXRING_SLOTS,4,2     ; @B43legacy_RXRING_SLOTS
	.comm	_B43legacy_TXRING_SLOTS,4,2     ; @B43legacy_TXRING_SLOTS
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_GFP_DMA,4,2                    ; @GFP_DMA
	.comm	_B43legacy_DMA0_RX_BUFFERSIZE,4,2 ; @B43legacy_DMA0_RX_BUFFERSIZE
	.comm	_B43legacy_DMA0_RX_FRAMEOFFSET,4,2 ; @B43legacy_DMA0_RX_FRAMEOFFSET
	.comm	_B43legacy_DMA3_RX_BUFFERSIZE,4,2 ; @B43legacy_DMA3_RX_BUFFERSIZE
	.comm	_B43legacy_DMA3_RX_FRAMEOFFSET,4,2 ; @B43legacy_DMA3_RX_FRAMEOFFSET
	.comm	_jiffies,4,2                    ; @jiffies
	.no_dead_strip	_b43legacy_setup_dmaring
.subsections_via_symbols
