	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b44_alloc_rx_skb
_b44_alloc_rx_skb:                      ## @b44_alloc_rx_skb
	.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	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	movq	48(%rdi), %rax
	movl	%esi, %r14d
	shlq	$4, %r14
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	addq	%rax, %r14
	xorl	%ebx, %ebx
	testl	%esi, %esi
	cmovsq	%rbx, %r14
	movq	_B44_RX_RING_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	40(%rdi), %edi
	movq	_RX_PKT_BUF_SZ@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_netdev_alloc_skb
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	16(%r13), %rax
	movl	(%rax), %edi
	movq	(%r15), %rsi
	movl	(%r12), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_map_single
	movq	%rax, %rbx
	movq	16(%r13), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movslq	(%r12), %rax
	movq	%rbx, %r12
	addq	%rax, %r12
	movl	$30, %edi
	callq	_DMA_BIT_MASK
	cmpq	%rax, %r12
	movq	_RX_PKT_BUF_SZ@GOTPCREL(%rip), %r12
	jle	LBB0_14
LBB0_4:
	movq	16(%r13), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	16(%r13), %rax
	movl	(%rax), %edi
	movl	(%r12), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rsi
	callq	_dma_unmap_single
LBB0_6:
	movq	%r15, %rdi
	callq	_dev_kfree_skb_any
	movl	40(%r13), %edi
	movl	(%r12), %esi
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movq	_GFP_DMA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	callq	___netdev_alloc_skb
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r15
	movq	16(%r13), %rax
	movl	(%rax), %edi
	movq	(%r15), %rsi
	movl	(%r12), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_map_single
	movq	%rax, %rbx
	movq	16(%r13), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	movslq	(%r12), %rax
	movq	%rbx, %r12
	addq	%rax, %r12
	movl	$30, %edi
	callq	_DMA_BIT_MASK
	cmpq	%rax, %r12
	movq	_RX_PKT_BUF_SZ@GOTPCREL(%rip), %r12
	jle	LBB0_13
LBB0_10:
	movq	16(%r13), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_12
## %bb.11:
	movq	16(%r13), %rax
	movl	(%rax), %edi
	movl	(%r12), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rsi
	callq	_dma_unmap_single
LBB0_12:
	movq	%r15, %rdi
	callq	_dev_kfree_skb_any
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_21
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_21
LBB0_13:
	movl	$1, (%r13)
LBB0_14:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	decq	%rax
	movslq	-44(%rbp), %rdx                 ## 4-byte Folded Reload
	andq	%rax, %rdx
	movq	(%r15), %rax
	movq	%rdx, %r12
	shlq	$4, %r12
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax,%r12)
	movq	%rbx, 8(%rax,%r12)
	testq	%r14, %r14
	je	LBB0_16
## %bb.15:
	movq	$0, (%r14)
LBB0_16:
	movq	_DESC_CTRL_LEN@GOTPCREL(%rip), %rcx
	movq	_RX_PKT_BUF_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%rcx), %eax
	movq	_B44_RX_RING_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	decl	%ecx
	xorl	%edi, %edi
	movq	%rdx, %r15
	cmpl	%ecx, %edx
	jne	LBB0_18
## %bb.17:
	movq	_DESC_CTRL_EOT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
LBB0_18:
	orl	%eax, %edi
	movq	32(%r13), %r14
	callq	_cpu_to_le32
	movq	%rax, 8(%r14,%r12)
	addl	24(%r13), %ebx
	movl	%ebx, %edi
	callq	_cpu_to_le32
	movq	%rax, (%r14,%r12)
	movq	_B44_FLAG_RX_RING_HACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r13)
	je	LBB0_20
## %bb.19:
	movq	16(%r13), %rdi
	movl	8(%r13), %esi
	movq	%r15, %rdx
	shll	$4, %edx
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_b44_sync_dma_desc_for_device
LBB0_20:
	movq	_RX_PKT_BUF_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_21:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_B44_RX_RING_SIZE,4,2           ## @B44_RX_RING_SIZE
	.comm	_RX_PKT_BUF_SZ,4,2              ## @RX_PKT_BUF_SZ
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_GFP_DMA,4,2                    ## @GFP_DMA
	.comm	_DESC_CTRL_LEN,4,2              ## @DESC_CTRL_LEN
	.comm	_DESC_CTRL_EOT,4,2              ## @DESC_CTRL_EOT
	.comm	_B44_FLAG_RX_RING_HACK,4,2      ## @B44_FLAG_RX_RING_HACK
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.no_dead_strip	_b44_alloc_rx_skb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function b44_alloc_rx_skb
_b44_alloc_rx_skb:                      ; @b44_alloc_rx_skb
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x19, x0
	ldr	x26, [x0, #48]
	add	x8, x26, w1, uxtw #4
	cmp	w1, #0
Lloh0:
	adrp	x24, _B44_RX_RING_SIZE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _B44_RX_RING_SIZE@GOTPAGEOFF]
	csel	x25, x8, xzr, ge
	ldr	w27, [x24]
	ldr	w0, [x0, #40]
Lloh2:
	adrp	x23, _RX_PKT_BUF_SZ@GOTPAGE
Lloh3:
	ldr	x23, [x23, _RX_PKT_BUF_SZ@GOTPAGEOFF]
	ldr	w1, [x23]
	bl	_netdev_alloc_skb
	cbz	x0, LBB0_11
; %bb.1:
	mov	x20, x0
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	ldr	x1, [x20]
	ldr	w2, [x23]
Lloh4:
	adrp	x28, _DMA_FROM_DEVICE@GOTPAGE
Lloh5:
	ldr	x28, [x28, _DMA_FROM_DEVICE@GOTPAGEOFF]
	ldr	w3, [x28]
	bl	_dma_map_single
	mov	x22, x0
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	mov	x1, x22
	bl	_dma_mapping_error
	cbnz	x0, LBB0_3
; %bb.2:
	ldrsw	x8, [x23]
	mov	x28, x24
	add	x24, x22, x8
	mov	w0, #30
	bl	_DMA_BIT_MASK
	cmp	x24, x0
	mov	x24, x28
Lloh6:
	adrp	x28, _DMA_FROM_DEVICE@GOTPAGE
Lloh7:
	ldr	x28, [x28, _DMA_FROM_DEVICE@GOTPAGEOFF]
	b.le	LBB0_14
LBB0_3:
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	mov	x1, x22
	bl	_dma_mapping_error
	cbnz	x0, LBB0_5
; %bb.4:
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	ldr	w2, [x23]
	ldr	w3, [x28]
	mov	x1, x22
	bl	_dma_unmap_single
LBB0_5:
	mov	x0, x20
	bl	_dev_kfree_skb_any
	ldr	w0, [x19, #40]
Lloh8:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _GFP_DMA@GOTPAGE
Lloh12:
	ldr	x9, [x9, _GFP_DMA@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w2, w9, w8
	bl	___netdev_alloc_skb
	cbz	x0, LBB0_11
; %bb.6:
	mov	x20, x0
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	ldr	x1, [x20]
	ldr	w2, [x23]
	ldr	w3, [x28]
	bl	_dma_map_single
	mov	x22, x0
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	mov	x1, x22
	bl	_dma_mapping_error
	cbnz	x0, LBB0_8
; %bb.7:
	ldrsw	x8, [x23]
	str	x25, [sp, #8]                   ; 8-byte Folded Spill
	mov	x25, x21
	mov	x21, x28
	mov	x28, x24
	add	x24, x22, x8
	mov	w0, #30
	bl	_DMA_BIT_MASK
	cmp	x24, x0
	mov	x24, x28
	mov	x28, x21
	mov	x21, x25
	ldr	x25, [sp, #8]                   ; 8-byte Folded Reload
	b.le	LBB0_13
LBB0_8:
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	mov	x1, x22
	bl	_dma_mapping_error
	cbnz	x0, LBB0_10
; %bb.9:
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	ldr	w2, [x23]
	ldr	w3, [x28]
	mov	x1, x22
	bl	_dma_unmap_single
LBB0_10:
	mov	x0, x20
	bl	_dev_kfree_skb_any
LBB0_11:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	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
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_13:
	mov	w8, #1
	str	w8, [x19]
LBB0_14:
	sub	w8, w27, #1
	and	w8, w8, w21
	sxtw	x21, w8
	ldr	x8, [x20]
	stp	xzr, xzr, [x8]
	add	x8, x26, x21, lsl #4
	stp	x20, x22, [x8]
	cbz	x25, LBB0_16
; %bb.15:
	str	xzr, [x25]
LBB0_16:
Lloh17:
	adrp	x8, _DESC_CTRL_LEN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DESC_CTRL_LEN@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	ldr	w9, [x23]
	and	w8, w9, w8
	ldr	w9, [x24]
Lloh20:
	adrp	x10, _DESC_CTRL_EOT@GOTPAGE
Lloh21:
	ldr	x10, [x10, _DESC_CTRL_EOT@GOTPAGEOFF]
	sub	w9, w9, #1
Lloh22:
	ldr	w10, [x10]
	cmp	w21, w9
	csel	w9, w10, wzr, eq
	orr	w0, w9, w8
	ldr	x20, [x19, #32]
	bl	_cpu_to_le32
	add	x20, x20, x21, lsl #4
	str	x0, [x20, #8]
	ldr	w8, [x19, #24]
	add	w0, w8, w22
	bl	_cpu_to_le32
	str	x0, [x20]
	ldr	w8, [x19, #4]
Lloh23:
	adrp	x9, _B44_FLAG_RX_RING_HACK@GOTPAGE
Lloh24:
	ldr	x9, [x9, _B44_FLAG_RX_RING_HACK@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_18
; %bb.17:
	ldr	x0, [x19, #16]
	ldr	w1, [x19, #8]
	lsl	w2, w21, #4
Lloh26:
	adrp	x8, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh28:
	ldr	w3, [x8]
	bl	_b44_sync_dma_desc_for_device
LBB0_18:
	ldr	w0, [x23]
	b	LBB0_12
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_B44_RX_RING_SIZE,4,2           ; @B44_RX_RING_SIZE
	.comm	_RX_PKT_BUF_SZ,4,2              ; @RX_PKT_BUF_SZ
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_GFP_DMA,4,2                    ; @GFP_DMA
	.comm	_DESC_CTRL_LEN,4,2              ; @DESC_CTRL_LEN
	.comm	_DESC_CTRL_EOT,4,2              ; @DESC_CTRL_EOT
	.comm	_B44_FLAG_RX_RING_HACK,4,2      ; @B44_FLAG_RX_RING_HACK
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.no_dead_strip	_b44_alloc_rx_skb
.subsections_via_symbols
