	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ftgmac100_alloc_rx_buf
_ftgmac100_alloc_rx_buf:                ## @ftgmac100_alloc_rx_buf
	.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
	movq	%rdx, %rbx
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	movq	24(%rdi), %r15
	movq	_RX_BUF_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_netdev_alloc_skb_ip_align
	movq	%rax, %r12
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_net_ratelimit
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_netdev_warn
LBB0_3:
	movq	%r12, %rdx
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	movl	16(%r13), %r15d
	jmp	LBB0_9
LBB0_4:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	20(%r13), %edi
	movl	(%r12), %esi
	movl	(%r14), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_dma_map_single
	movl	%eax, %r15d
	movl	20(%r13), %edi
	movl	%eax, %esi
	callq	_dma_mapping_error
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	xorl	%eax, %eax
	callq	_net_ratelimit
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_netdev_err
LBB0_8:
	movq	%r12, %rdi
	callq	_dev_kfree_skb_any
	movl	16(%r13), %r15d
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	xorl	%edx, %edx
	jmp	LBB0_9
LBB0_5:
	movq	%r12, %rdx
	xorl	%r14d, %r14d
LBB0_9:
	movq	8(%r13), %rax
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %ecx
	movq	%rdx, (%rax,%rcx,8)
	movl	%r15d, %edi
	callq	_cpu_to_le32
	movq	%rax, 8(%rbx)
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_dma_wmb
	movl	(%r13), %eax
	decl	%eax
	cmpl	%r12d, %eax
	jne	LBB0_11
## %bb.10:
	movl	4(%r13), %edi
	callq	_cpu_to_le32
	movq	%rax, %r15
LBB0_11:
	movq	%r15, (%rbx)
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RX_BUF_SIZE,4,2                ## @RX_BUF_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to allocate rx skb\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
L_.str.1:                               ## @.str.1
	.asciz	"failed to map rx page\n"

	.no_dead_strip	_ftgmac100_alloc_rx_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ftgmac100_alloc_rx_buf
_ftgmac100_alloc_rx_buf:                ; @ftgmac100_alloc_rx_buf
	.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, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x23, [x0, #24]
Lloh0:
	adrp	x24, _RX_BUF_SIZE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _RX_BUF_SIZE@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x23
	bl	_netdev_alloc_skb_ip_align
	mov	x22, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.1:
	bl	_net_ratelimit
	cbz	x0, LBB0_3
; %bb.2:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_netdev_warn
LBB0_3:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w23, w8
	ldr	w24, [x20, #16]
	b	LBB0_9
LBB0_4:
	ldr	w0, [x20, #20]
	ldr	w1, [x22]
	ldr	w2, [x24]
Lloh7:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh9:
	ldr	w3, [x8]
	bl	_dma_map_single
	mov	x24, x0
	ldr	w0, [x20, #20]
	mov	x1, x24
	bl	_dma_mapping_error
	bl	_unlikely
	cbz	x0, LBB0_8
; %bb.5:
	bl	_net_ratelimit
	cbz	x0, LBB0_7
; %bb.6:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x23
	bl	_netdev_err
LBB0_7:
	mov	x0, x22
	bl	_dev_kfree_skb_any
	mov	x22, #0
	ldr	w24, [x20, #16]
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_9
LBB0_8:
	mov	w23, #0
LBB0_9:
	ldr	x8, [x20, #8]
	str	x22, [x8, w21, uxtw #3]
	mov	x0, x24
	bl	_cpu_to_le32
	str	x0, [x19, #8]
	bl	_dma_wmb
	ldr	w8, [x20]
	sub	w8, w8, #1
	cmp	w8, w21
	b.ne	LBB0_11
; %bb.10:
	ldr	w0, [x20, #4]
	bl	_cpu_to_le32
	b	LBB0_12
LBB0_11:
	mov	x0, #0
LBB0_12:
	str	x0, [x19]
	mov	x0, x23
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_RX_BUF_SIZE,4,2                ; @RX_BUF_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to allocate rx skb\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
l_.str.1:                               ; @.str.1
	.asciz	"failed to map rx page\n"

	.no_dead_strip	_ftgmac100_alloc_rx_buf
.subsections_via_symbols
