	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ftmac100_alloc_rx_page
_ftmac100_alloc_rx_page:                ## @ftmac100_alloc_rx_page
	.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, %r15
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movl	%edx, %edi
	callq	_alloc_page
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	movq	%rax, %r13
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %edi
	movq	_RX_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%r12d, %r12d
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_dma_map_page
	movl	%eax, %r14d
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_dma_mapping_error
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_net_ratelimit
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_netdev_err
LBB0_7:
	movq	%r13, %rdi
	callq	___free_page
	jmp	LBB0_3
LBB0_1:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_net_ratelimit
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_netdev_err
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_9
LBB0_8:
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_ftmac100_rxdes_set_page
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_ftmac100_rxdes_set_dma_addr
	movq	_RX_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ftmac100_rxdes_set_buffer_size
	movq	%r15, %rdi
	callq	_ftmac100_rxdes_set_dma_own
LBB0_9:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to allocate rx page\n"

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

	.no_dead_strip	_ftmac100_alloc_rx_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ftmac100_alloc_rx_page
_ftmac100_alloc_rx_page:                ; @ftmac100_alloc_rx_page
	.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	x22, x0
	ldr	x20, [x0, #8]
	mov	x0, x2
	bl	_alloc_page
	cbz	x0, LBB0_5
; %bb.1:
	mov	x21, x0
	ldr	w0, [x22]
Lloh0:
	adrp	x24, _RX_BUF_SIZE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _RX_BUF_SIZE@GOTPAGEOFF]
	ldr	w3, [x24]
Lloh2:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh4:
	ldr	w4, [x8]
	mov	x1, x21
	mov	w2, #0
	bl	_dma_map_page
	mov	x23, x0
	ldr	w0, [x22]
	mov	x1, x23
	bl	_dma_mapping_error
	bl	_unlikely
	cbz	x0, LBB0_8
; %bb.2:
	bl	_net_ratelimit
	cbz	x0, LBB0_4
; %bb.3:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
LBB0_4:
	mov	x0, x21
	bl	___free_page
	b	LBB0_7
LBB0_5:
	bl	_net_ratelimit
	cbz	x0, LBB0_7
; %bb.6:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
LBB0_7:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_8:
	mov	x0, x19
	mov	x1, x21
	bl	_ftmac100_rxdes_set_page
	mov	x0, x19
	mov	x1, x23
	bl	_ftmac100_rxdes_set_dma_addr
	ldr	w1, [x24]
	mov	x0, x19
	bl	_ftmac100_rxdes_set_buffer_size
	mov	x0, x19
	bl	_ftmac100_rxdes_set_dma_own
	mov	w0, #0
LBB0_9:
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to allocate rx page\n"

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

	.no_dead_strip	_ftmac100_alloc_rx_page
.subsections_via_symbols
