	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b43_setup_dmaring
_b43_setup_dmaring:                     ## @b43_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r13d
	movl	%edx, %r12d
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$88, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_30
## %bb.1:
	movq	%rax, %rbx
	movq	_B43_RXRING_SLOTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, (%rbx)
	testl	%r12d, %r12d
	je	LBB0_3
## %bb.2:
	movq	_B43_TXRING_SLOTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, (%rbx)
LBB0_3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, 24(%rbx)
	testq	%rax, %rax
	je	LBB0_29
## %bb.4:
	cmpl	$0, (%rbx)
	jle	LBB0_6
## %bb.5:
	movq	_B43_DMA_PTR_POISON@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 80(%rax)
LBB0_6:
	movl	%r13d, 4(%rbx)
	movq	%r14, 72(%rbx)
	movl	%r13d, %edi
	movl	%r15d, %esi
	callq	_b43_dmacontroller_base
	movl	%eax, 64(%rbx)
	movl	%r15d, 8(%rbx)
	movq	_B43_DMA_64BIT@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_7
## %bb.8:
	movq	_dma64_ops@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_dma32_ops@GOTPCREL(%rip), %rax
LBB0_9:
	movq	%rax, 56(%rbx)
	testl	%r12d, %r12d
	je	LBB0_10
## %bb.17:
	movabsq	$-4294967295, %rax              ## imm = 0xFFFFFFFF00000001
	movq	%rax, 12(%rbx)
	movq	_B43_TXRING_SLOTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_TX_SLOTS_PER_FRAME@GOTPCREL(%rip), %r13
	cltd
	idivl	(%r13)
	xorl	%edi, %edi
	testl	%edx, %edx
	setne	%dil
	callq	_BUILD_BUG_ON
	movl	(%rbx), %eax
	cltd
	idivl	(%r13)
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_b43_txhdr_size
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_kcalloc
	movq	%rax, 32(%rbx)
	testq	%rax, %rax
	je	LBB0_28
## %bb.18:
	movq	%rax, %r15
	movq	(%r14), %rax
	movl	(%rax), %r12d
	movq	%r14, %rdi
	callq	_b43_txhdr_size
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%r12d, %edi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_dma_map_single
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_b43_txhdr_size
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	movl	$1, %ecx
	callq	_b43_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_19
## %bb.24:
	movq	32(%rbx), %rdi
	callq	_kfree
	movl	(%rbx), %eax
	cltd
	idivl	(%r13)
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_b43_txhdr_size
	movq	_GFP_DMA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_kcalloc
	movq	%rax, 32(%rbx)
	testq	%rax, %rax
	je	LBB0_28
## %bb.25:
	movq	%rax, %r15
	movq	(%r14), %rax
	movl	(%rax), %r12d
	movq	%r14, %rdi
	callq	_b43_txhdr_size
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movl	%r12d, %edi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_dma_map_single
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_b43_txhdr_size
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	movl	$1, %ecx
	callq	_b43_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_20
## %bb.26:
	movl	8(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_b43err
	jmp	LBB0_27
LBB0_10:
	testl	%r15d, %r15d
	je	LBB0_11
## %bb.16:
	movl	$1, %edi
	callq	_B43_WARN_ON
	jmp	LBB0_21
LBB0_19:
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %r13
LBB0_20:
	movq	(%r14), %rax
	movl	(%rax), %r12d
	movq	%r14, %rdi
	callq	_b43_txhdr_size
	movl	(%r13), %ecx
	movl	%r12d, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_dma_unmap_single
	jmp	LBB0_21
LBB0_11:
	movl	12(%r14), %eax
	leal	-129(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_12
## %bb.15:
	movq	_B43_DMA0_RX_FW351_BUFSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movq	_B43_DMA0_RX_FW351_FO@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_12:
	cmpl	$128, %eax
	jne	LBB0_21
## %bb.13:
	movq	_B43_DMA0_RX_FW598_BUFSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movq	_B43_DMA0_RX_FW598_FO@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
LBB0_21:
	movq	%rbx, %rdi
	callq	_alloc_ringmemory
	testl	%eax, %eax
	jne	LBB0_27
## %bb.22:
	movq	%rbx, %rdi
	callq	_dmacontroller_setup
	testl	%eax, %eax
	je	LBB0_31
## %bb.23:
	movq	%rbx, %rdi
	callq	_free_ringmemory
LBB0_27:
	movq	32(%rbx), %rdi
	callq	_kfree
LBB0_28:
	movq	24(%rbx), %rdi
	callq	_kfree
LBB0_29:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_30:
	xorl	%ebx, %ebx
LBB0_31:
	movq	%rbx, %rax
	addq	$8, %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	_B43_RXRING_SLOTS,4,2           ## @B43_RXRING_SLOTS
	.comm	_B43_TXRING_SLOTS,4,2           ## @B43_TXRING_SLOTS
	.comm	_B43_DMA_PTR_POISON,4,2         ## @B43_DMA_PTR_POISON
	.comm	_B43_DMA_64BIT,4,2              ## @B43_DMA_64BIT
	.comm	_dma64_ops,4,2                  ## @dma64_ops
	.comm	_dma32_ops,4,2                  ## @dma32_ops
	.comm	_B43_DMA0_RX_FW598_BUFSIZE,4,2  ## @B43_DMA0_RX_FW598_BUFSIZE
	.comm	_B43_DMA0_RX_FW598_FO,4,2       ## @B43_DMA0_RX_FW598_FO
	.comm	_B43_DMA0_RX_FW351_BUFSIZE,4,2  ## @B43_DMA0_RX_FW351_BUFSIZE
	.comm	_B43_DMA0_RX_FW351_FO,4,2       ## @B43_DMA0_RX_FW351_FO
	.comm	_TX_SLOTS_PER_FRAME,4,2         ## @TX_SLOTS_PER_FRAME
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_GFP_DMA,4,2                    ## @GFP_DMA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TXHDR DMA allocation failed\n"

	.comm	_jiffies,4,2                    ## @jiffies
	.no_dead_strip	_b43_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 b43_setup_dmaring
lCPI0_0:
	.long	1                               ; 0x1
	.long	4294967295                      ; 0xffffffff
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_b43_setup_dmaring:                     ; @b43_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	x23, x3
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	w0, #88
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_26
; %bb.1:
Lloh2:
	adrp	x8, _B43_RXRING_SLOTS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _B43_RXRING_SLOTS@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	str	w0, [x19]
Lloh5:
	adrp	x26, _B43_TXRING_SLOTS@GOTPAGE
Lloh6:
	ldr	x26, [x26, _B43_TXRING_SLOTS@GOTPAGEOFF]
	cbz	w22, LBB0_3
; %bb.2:
	ldr	w0, [x26]
	str	w0, [x19]
LBB0_3:
	ldr	w2, [x24]
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x19, #24]
	cbz	x0, LBB0_25
; %bb.4:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.5:
Lloh7:
	adrp	x8, _B43_DMA_PTR_POISON@GOTPAGE
Lloh8:
	ldr	x8, [x8, _B43_DMA_PTR_POISON@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x0, #80]
LBB0_6:
	str	w23, [x19, #4]
	str	x20, [x19, #72]
	mov	x0, x23
	mov	x1, x21
	bl	_b43_dmacontroller_base
	str	w0, [x19, #64]
	str	w21, [x19, #8]
Lloh10:
	adrp	x8, _B43_DMA_64BIT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _B43_DMA_64BIT@GOTPAGEOFF]
Lloh12:
	adrp	x9, _dma32_ops@GOTPAGE
Lloh13:
	ldr	x9, [x9, _dma32_ops@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x10, _dma64_ops@GOTPAGE
Lloh16:
	ldr	x10, [x10, _dma64_ops@GOTPAGEOFF]
	cmp	w8, w23
	csel	x8, x10, x9, eq
	str	x8, [x19, #56]
	cbz	w22, LBB0_12
; %bb.7:
Lloh17:
	adrp	x8, lCPI0_0@PAGE
Lloh18:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x19, #12]
Lloh19:
	adrp	x25, _TX_SLOTS_PER_FRAME@GOTPAGE
Lloh20:
	ldr	x25, [x25, _TX_SLOTS_PER_FRAME@GOTPAGEOFF]
	ldr	w8, [x26]
	ldr	w9, [x25]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	cmp	w8, #0
	cset	w0, ne
	bl	_BUILD_BUG_ON
	ldr	w8, [x19]
	ldr	w9, [x25]
	sdiv	w21, w8, w9
	mov	x0, x20
	bl	_b43_txhdr_size
	mov	x1, x0
	ldr	w2, [x24]
	mov	x0, x21
	bl	_kcalloc
	str	x0, [x19, #32]
	cbz	x0, LBB0_24
; %bb.8:
	mov	x21, x0
	ldr	x8, [x20]
	ldr	w22, [x8]
	mov	x0, x20
	bl	_b43_txhdr_size
	mov	x2, x0
Lloh21:
	adrp	x23, _DMA_TO_DEVICE@GOTPAGE
Lloh22:
	ldr	x23, [x23, _DMA_TO_DEVICE@GOTPAGEOFF]
	ldr	w3, [x23]
	mov	x0, x22
	mov	x1, x21
	bl	_dma_map_single
	mov	x21, x0
	mov	x0, x20
	bl	_b43_txhdr_size
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	mov	w3, #1
	bl	_b43_dma_mapping_error
	cbz	x0, LBB0_14
; %bb.9:
	ldr	x0, [x19, #32]
	bl	_kfree
	ldr	w8, [x19]
	ldr	w9, [x25]
	sdiv	w21, w8, w9
	mov	x0, x20
	bl	_b43_txhdr_size
	mov	x1, x0
	ldr	w8, [x24]
Lloh23:
	adrp	x9, _GFP_DMA@GOTPAGE
Lloh24:
	ldr	x9, [x9, _GFP_DMA@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x21
	bl	_kcalloc
	str	x0, [x19, #32]
	cbz	x0, LBB0_24
; %bb.10:
	mov	x21, x0
	ldr	x8, [x20]
	ldr	w22, [x8]
	mov	x0, x20
	bl	_b43_txhdr_size
	mov	x2, x0
	ldr	w3, [x23]
	mov	x0, x22
	mov	x1, x21
	bl	_dma_map_single
	mov	x21, x0
	mov	x0, x20
	bl	_b43_txhdr_size
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	mov	w3, #1
	bl	_b43_dma_mapping_error
	cbz	x0, LBB0_14
; %bb.11:
	ldr	w0, [x20, #8]
Lloh26:
	adrp	x1, l_.str@PAGE
Lloh27:
	add	x1, x1, l_.str@PAGEOFF
	bl	_b43err
	b	LBB0_23
LBB0_12:
	cbz	w21, LBB0_15
; %bb.13:
	mov	w0, #1
	bl	_B43_WARN_ON
	b	LBB0_20
LBB0_14:
	ldr	x8, [x20]
	ldr	w22, [x8]
	mov	x0, x20
	bl	_b43_txhdr_size
	mov	x2, x0
	ldr	w3, [x23]
	mov	x0, x22
	mov	x1, x21
	bl	_dma_unmap_single
	b	LBB0_20
LBB0_15:
	ldr	w8, [x20, #12]
	sub	w9, w8, #129
	cmp	w9, #2
	b.hs	LBB0_17
; %bb.16:
Lloh28:
	adrp	x8, _B43_DMA0_RX_FW351_BUFSIZE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _B43_DMA0_RX_FW351_BUFSIZE@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
Lloh31:
	adrp	x9, _B43_DMA0_RX_FW351_FO@GOTPAGE
Lloh32:
	ldr	x9, [x9, _B43_DMA0_RX_FW351_FO@GOTPAGEOFF]
	b	LBB0_19
LBB0_17:
	cmp	w8, #128
	b.ne	LBB0_20
; %bb.18:
Lloh33:
	adrp	x8, _B43_DMA0_RX_FW598_BUFSIZE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _B43_DMA0_RX_FW598_BUFSIZE@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
Lloh36:
	adrp	x9, _B43_DMA0_RX_FW598_FO@GOTPAGE
Lloh37:
	ldr	x9, [x9, _B43_DMA0_RX_FW598_FO@GOTPAGEOFF]
LBB0_19:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #44]
LBB0_20:
	mov	x0, x19
	bl	_alloc_ringmemory
	cbnz	w0, LBB0_23
; %bb.21:
	mov	x0, x19
	bl	_dmacontroller_setup
	cbz	w0, LBB0_26
; %bb.22:
	mov	x0, x19
	bl	_free_ringmemory
LBB0_23:
	ldr	x0, [x19, #32]
	bl	_kfree
LBB0_24:
	ldr	x0, [x19, #24]
	bl	_kfree
LBB0_25:
	mov	x0, x19
	bl	_kfree
	mov	x19, #0
LBB0_26:
	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	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdr	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_B43_RXRING_SLOTS,4,2           ; @B43_RXRING_SLOTS
	.comm	_B43_TXRING_SLOTS,4,2           ; @B43_TXRING_SLOTS
	.comm	_B43_DMA_PTR_POISON,4,2         ; @B43_DMA_PTR_POISON
	.comm	_B43_DMA_64BIT,4,2              ; @B43_DMA_64BIT
	.comm	_dma64_ops,4,2                  ; @dma64_ops
	.comm	_dma32_ops,4,2                  ; @dma32_ops
	.comm	_B43_DMA0_RX_FW598_BUFSIZE,4,2  ; @B43_DMA0_RX_FW598_BUFSIZE
	.comm	_B43_DMA0_RX_FW598_FO,4,2       ; @B43_DMA0_RX_FW598_FO
	.comm	_B43_DMA0_RX_FW351_BUFSIZE,4,2  ; @B43_DMA0_RX_FW351_BUFSIZE
	.comm	_B43_DMA0_RX_FW351_FO,4,2       ; @B43_DMA0_RX_FW351_FO
	.comm	_TX_SLOTS_PER_FRAME,4,2         ; @TX_SLOTS_PER_FRAME
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_GFP_DMA,4,2                    ; @GFP_DMA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TXHDR DMA allocation failed\n"

	.comm	_jiffies,4,2                    ; @jiffies
	.no_dead_strip	_b43_setup_dmaring
.subsections_via_symbols
