	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2_alloc_rx_page
_bnx2_alloc_rx_page:                    ## @bnx2_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movq	%rdx, %rbx
	movq	%rdi, %r12
	leaq	(,%rdx,8), %r14
	addq	8(%rsi), %r14
	movq	(%rsi), %r13
	movq	%rdx, %rdi
	callq	_BNX2_RX_RING
	movq	(%r13,%rax,8), %r13
	movq	%rbx, %rdi
	callq	_BNX2_RX_IDX
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r15d, %edi
	callq	_alloc_page
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	(%r12), %rdi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%r13d, %r13d
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_dma_map_page
	movq	%rax, %r15
	movq	(%r12), %rdi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	___free_page
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_5
LBB0_4:
	movq	%rbx, (%r14)
	movq	%r14, %rdi
	movq	%r15, %rsi
	movq	%r15, %rdx
	callq	_pci_unmap_addr_set
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%r15d, 4(%rax,%rcx,8)
LBB0_5:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_PCI_DMA_FROMDEVICE,4,2         ## @PCI_DMA_FROMDEVICE
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_bnx2_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 bnx2_alloc_rx_page
_bnx2_alloc_rx_page:                    ; @bnx2_alloc_rx_page
	.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	x22, x3
	mov	x19, x2
	mov	x21, x0
	ldp	x20, x25, [x1]
	mov	x0, x2
	bl	_BNX2_RX_RING
	ldr	x24, [x20, x0, lsl #3]
	mov	x0, x19
	bl	_BNX2_RX_IDX
	mov	x20, x0
	mov	x0, x22
	bl	_alloc_page
	cbz	x0, LBB0_3
; %bb.1:
	mov	x22, x0
	ldr	x0, [x21]
Lloh0:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
Lloh3:
	adrp	x8, _PCI_DMA_FROMDEVICE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_DMA_FROMDEVICE@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
	mov	x1, x22
	mov	w2, #0
	bl	_dma_map_page
	mov	x23, x0
	ldr	x0, [x21]
	mov	x1, x23
	bl	_dma_mapping_error
	cbz	x0, LBB0_5
; %bb.2:
	mov	x0, x22
	bl	___free_page
Lloh6:
	adrp	x8, _EIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	add	x0, x25, x19, lsl #3
	str	x22, [x0]
	mov	x1, x23
	mov	x2, x23
	bl	_pci_unmap_addr_set
	mov	w0, #0
	add	x8, x24, x20, lsl #3
	str	w23, [x8, #4]
LBB0_6:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_PCI_DMA_FROMDEVICE,4,2         ; @PCI_DMA_FROMDEVICE
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_bnx2_alloc_rx_page
.subsections_via_symbols
