	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_setup_rx_resources
_e1000_setup_rx_resources:              ## @e1000_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	%rsi, %r13
	movq	%rdi, %r15
	movq	(%rdi), %r14
	movl	(%rsi), %edi
	shll	$2, %edi
	callq	_vzalloc
	movl	%eax, 44(%r13)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	(%r13), %edi
	shll	$2, %edi
	movl	%edi, 4(%r13)
	movl	$4096, %esi                     ## imm = 0x1000
	callq	_ALIGN
	movl	%eax, 4(%r13)
	leaq	40(%r13), %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	%r12, %rdx
	callq	_dma_alloc_coherent
	movq	%rax, 8(%r13)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	4(%r13), %edx
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_e1000_check_64k_bound
	testl	%eax, %eax
	je	LBB0_5
LBB0_10:
	movq	8(%r13), %rdi
	movl	4(%r13), %edx
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_memset
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%r13)
	movq	$0, 32(%r13)
	jmp	LBB0_11
LBB0_5:
	movq	8(%r13), %rcx
	movl	40(%r13), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_rx_err@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	4(%r13), %edx
	leaq	L_.str(%rip), %rsi
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_e_err
	movl	4(%r13), %esi
	movl	(%rbx), %ecx
	movq	%r14, %rdi
	movq	%r12, %rdx
	callq	_dma_alloc_coherent
	movq	%rax, 8(%r13)
	movl	4(%r13), %edx
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_e1000_check_64k_bound
	movl	4(%r13), %esi
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movq	%r14, %rdi
	movq	%rbx, %rdx
	movl	%r12d, %ecx
	callq	_dma_free_coherent
	jmp	LBB0_10
LBB0_6:
	movq	%r14, %rdi
	movl	%edx, %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_dma_free_coherent
	jmp	LBB0_3
LBB0_8:
	movq	8(%r13), %rdx
	movl	40(%r13), %ecx
	movq	%r14, %rdi
	callq	_dma_free_coherent
	movl	4(%r13), %esi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	movl	%r12d, %ecx
	callq	_dma_free_coherent
	movq	_probe@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_e_err
LBB0_3:
	movl	44(%r13), %edi
	callq	_vfree
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %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	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_rx_err,4,2                     ## @rx_err
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rxdr align check failed: %u bytes at %p\n"

	.comm	_probe,4,2                      ## @probe
L_.str.1:                               ## @.str.1
	.asciz	"Unable to allocate aligned memory for the Rx descriptor ring\n"

	.no_dead_strip	_e1000_setup_rx_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_setup_rx_resources
_e1000_setup_rx_resources:              ; @e1000_setup_rx_resources
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x1
	mov	x21, x0
	ldr	x20, [x0]
	ldr	w8, [x1]
	lsl	w0, w8, #2
	bl	_vzalloc
	str	w0, [x19, #44]
	cbz	w0, LBB0_10
; %bb.1:
	ldr	w8, [x19]
	lsl	w0, w8, #2
	str	w0, [x19, #4]
	mov	w1, #4096
	bl	_ALIGN
	mov	x1, x0
	str	w0, [x19, #4]
	add	x24, x19, #40
Lloh0:
	adrp	x25, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x25, [x25, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w3, [x25]
	mov	x0, x20
	mov	x2, x24
	bl	_dma_alloc_coherent
	str	x0, [x19, #8]
	cbz	x0, LBB0_9
; %bb.2:
	mov	x1, x0
	ldr	w2, [x19, #4]
	mov	x0, x21
	bl	_e1000_check_64k_bound
	cbz	w0, LBB0_4
LBB0_3:
	ldr	x0, [x19, #8]
	ldr	w2, [x19, #4]
	mov	w1, #0
	bl	_memset
	mov	w0, #0
	stp	xzr, xzr, [x19, #24]
	str	xzr, [x19, #16]
	b	LBB0_11
LBB0_4:
	ldr	x23, [x19, #8]
	ldr	w22, [x19, #40]
Lloh2:
	adrp	x8, _rx_err@GOTPAGE
Lloh3:
	ldr	x8, [x8, _rx_err@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldr	w8, [x19, #4]
	stp	x8, x23, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_e_err
	ldr	w1, [x19, #4]
	ldr	w3, [x25]
	mov	x0, x20
	mov	x2, x24
	bl	_dma_alloc_coherent
	str	x0, [x19, #8]
	ldr	w2, [x19, #4]
	cbz	x0, LBB0_7
; %bb.5:
	mov	x1, x0
	mov	x0, x21
	bl	_e1000_check_64k_bound
	ldr	w1, [x19, #4]
	cbz	w0, LBB0_8
; %bb.6:
	mov	x0, x20
	mov	x2, x23
	mov	x3, x22
	bl	_dma_free_coherent
	b	LBB0_3
LBB0_7:
	mov	x0, x20
	mov	x1, x2
	mov	x2, x23
	mov	x3, x22
	bl	_dma_free_coherent
	b	LBB0_9
LBB0_8:
	ldr	x2, [x19, #8]
	ldr	w3, [x19, #40]
	mov	x0, x20
	bl	_dma_free_coherent
	ldr	w1, [x19, #4]
	mov	x0, x20
	mov	x2, x23
	mov	x3, x22
	bl	_dma_free_coherent
Lloh7:
	adrp	x8, _probe@GOTPAGE
Lloh8:
	ldr	x8, [x8, _probe@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_e_err
LBB0_9:
	ldr	w0, [x19, #44]
	bl	_vfree
LBB0_10:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_rx_err,4,2                     ; @rx_err
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rxdr align check failed: %u bytes at %p\n"

	.comm	_probe,4,2                      ; @probe
l_.str.1:                               ; @.str.1
	.asciz	"Unable to allocate aligned memory for the Rx descriptor ring\n"

	.no_dead_strip	_e1000_setup_rx_resources
.subsections_via_symbols
