	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_e1000e_setup_rx_resources      ## -- Begin function e1000e_setup_rx_resources
	.p2align	4, 0x90
_e1000e_setup_rx_resources:             ## @e1000e_setup_rx_resources
	.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	%rdi, %r14
	movq	40(%rdi), %rbx
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movl	(%rdi), %edi
	shll	$2, %edi
	callq	_vzalloc
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_13
## %bb.1:
	movl	(%r14), %edi
	testl	%edi, %edi
	jle	LBB0_6
## %bb.2:
	movq	%rax, %r12
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	_PS_PAGE_BUFFERS@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movl	$4, %esi
	callq	_kcalloc
	movl	%eax, (%r12)
	testl	%eax, %eax
	je	LBB0_9
## %bb.3:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%r14), %rdi
	cmpq	%rdi, %rbx
	jge	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r14), %r12
	movl	(%r13), %edi
	movl	(%r15), %edx
	movl	$4, %esi
	callq	_kcalloc
	movl	%eax, (%r12,%rbx,4)
	incq	%rbx
	testl	%eax, %eax
	jne	LBB0_4
LBB0_9:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	jmp	LBB0_10
LBB0_5:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_6:
	shll	$2, %edi
	movl	%edi, 4(%r14)
                                        ## kill: def $edi killed $edi killed $rdi
	movl	$4096, %esi                     ## imm = 0x1000
	callq	_ALIGN
	movl	%eax, 4(%r14)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_e1000_alloc_ring_dma
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_7
LBB0_10:
	cmpl	$0, (%r14)
	jle	LBB0_13
## %bb.11:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_kfree
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_12
LBB0_13:
	movq	8(%r14), %rdi
	callq	_vfree
	leaq	L_.str(%rip), %rdi
	callq	_e_err
LBB0_14:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%r14)
	movq	$0, 32(%r14)
	xorl	%r15d, %r15d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PS_PAGE_BUFFERS,4,2            ## @PS_PAGE_BUFFERS
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to allocate memory for the receive descriptor ring\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_e1000e_setup_rx_resources      ; -- Begin function e1000e_setup_rx_resources
	.p2align	2
_e1000e_setup_rx_resources:             ; @e1000e_setup_rx_resources
	.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	x19, x0
	ldr	x21, [x0, #40]
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	ldr	w8, [x0]
	lsl	w0, w8, #2
	bl	_vzalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_10
; %bb.1:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x22, x0
Lloh3:
	adrp	x23, _PS_PAGE_BUFFERS@GOTPAGE
Lloh4:
	ldr	x23, [x23, _PS_PAGE_BUFFERS@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh5:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	w1, #4
	bl	_kcalloc
	str	w0, [x22]
	cbz	w0, LBB0_7
; %bb.3:
	mov	w22, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x19]
	cmp	x22, x8
	b.ge	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x25, [x19, #8]
	ldr	w0, [x23]
	ldr	w2, [x24]
	mov	w1, #4
	bl	_kcalloc
	str	w0, [x25, x22, lsl #2]
	add	x22, x22, #1
	cbnz	w0, LBB0_4
	b	LBB0_7
LBB0_6:
	lsl	w0, w8, #2
	str	w0, [x19, #4]
	mov	w1, #4096
	bl	_ALIGN
	str	w0, [x19, #4]
	mov	x0, x21
	mov	x1, x19
	bl	_e1000_alloc_ring_dma
	mov	x20, x0
	cbz	w0, LBB0_12
LBB0_7:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x21, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	w0, [x8, x21, lsl #2]
	bl	_kfree
	add	x21, x21, #1
	ldrsw	x8, [x19]
	cmp	x21, x8
	b.lt	LBB0_9
LBB0_10:
	ldr	x0, [x19, #8]
	bl	_vfree
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	bl	_e_err
LBB0_11:
	mov	x0, x20
	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
LBB0_12:
	stp	xzr, xzr, [x19, #16]
	str	xzr, [x19, #32]
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PS_PAGE_BUFFERS,4,2            ; @PS_PAGE_BUFFERS
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to allocate memory for the receive descriptor ring\n"

.subsections_via_symbols
