	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bgmac_dma_rx_skb_for_slot
_bgmac_dma_rx_skb_for_slot:             ## @bgmac_dma_rx_skb_for_slot
	.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
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	8(%rdi), %r12
	movq	_BGMAC_RX_ALLOC_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_netdev_alloc_frag
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_BGMAC_RX_BUF_OFFSET@GOTPCREL(%rip), %r13
	movslq	(%r13), %r14
	movl	$57005, %edi                    ## imm = 0xDEAD
	callq	_cpu_to_le16
	movq	%rax, 8(%rbx,%r14)
	movl	$48879, %edi                    ## imm = 0xBEEF
	callq	_cpu_to_le16
	movq	%rax, (%rbx,%r14)
	movslq	(%r13), %rsi
	addq	%rbx, %rsi
	movq	_BGMAC_RX_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	callq	_dma_map_single
	movl	%eax, %r13d
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_err
	movq	%rbx, %rdi
	callq	_virt_to_head_page
	movl	%eax, %edi
	callq	_put_page
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_5
LBB0_4:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, 8(%rax)
	movl	%r13d, (%rax)
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BGMAC_RX_ALLOC_SIZE,4,2        ## @BGMAC_RX_ALLOC_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_BGMAC_RX_BUF_OFFSET,4,2        ## @BGMAC_RX_BUF_OFFSET
	.comm	_BGMAC_RX_BUF_SIZE,4,2          ## @BGMAC_RX_BUF_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DMA mapping error\n"

	.no_dead_strip	_bgmac_dma_rx_skb_for_slot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bgmac_dma_rx_skb_for_slot
_bgmac_dma_rx_skb_for_slot:             ; @bgmac_dma_rx_skb_for_slot
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x21, x0
	ldr	x22, [x0, #8]
Lloh0:
	adrp	x8, _BGMAC_RX_ALLOC_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BGMAC_RX_ALLOC_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_netdev_alloc_frag
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x23, _BGMAC_RX_BUF_OFFSET@GOTPAGE
Lloh4:
	ldr	x23, [x23, _BGMAC_RX_BUF_OFFSET@GOTPAGEOFF]
	ldrsw	x8, [x23]
	add	x24, x0, x8
	mov	w0, #57005
	bl	_cpu_to_le16
	str	x0, [x24, #8]
	mov	w0, #48879
	bl	_cpu_to_le16
	str	x0, [x24]
	ldrsw	x8, [x23]
	add	x1, x20, x8
Lloh5:
	adrp	x8, _BGMAC_RX_BUF_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BGMAC_RX_BUF_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x0, x22
	bl	_dma_map_single
	mov	x23, x0
	mov	x0, x22
	mov	x1, x23
	bl	_dma_mapping_error
	cbz	x0, LBB0_4
; %bb.2:
	ldr	w0, [x21]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
	mov	x0, x20
	bl	_virt_to_head_page
	bl	_put_page
LBB0_3:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
	str	x20, [x19, #8]
	str	w23, [x19]
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_BGMAC_RX_ALLOC_SIZE,4,2        ; @BGMAC_RX_ALLOC_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_BGMAC_RX_BUF_OFFSET,4,2        ; @BGMAC_RX_BUF_OFFSET
	.comm	_BGMAC_RX_BUF_SIZE,4,2          ; @BGMAC_RX_BUF_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DMA mapping error\n"

	.no_dead_strip	_bgmac_dma_rx_skb_for_slot
.subsections_via_symbols
