	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_rx_resources
_alloc_rx_resources:                    ## @alloc_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	56(%rdi), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_SGE_FREELQ_N@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_7
## %bb.1:
	movq	%rsi, %r15
	movl	$32, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	40(%r13), %r14
	leaq	(%r14,%rbx), %rdx
	movl	$1, -32(%r14,%rbx)
	movq	(%r15), %rax
	movl	(%rax,%r12,4), %esi
	movl	%esi, -28(%r14,%rbx)
	cmpq	$0, 48(%r13)
	movl	$0, %eax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_NET_IP_ALIGN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, -24(%r14,%rbx)
	shll	$2, %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_pci_alloc_consistent
	movq	%rax, -8(%r14,%rbx)
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-28(%r14,%rbx), %edi
	shll	$2, %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	movl	%eax, -12(%r14,%rbx)
	testl	%eax, %eax
	je	LBB0_8
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	movq	_SGE_FREELQ_N@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$40, %rbx
	cmpq	%rax, %r12
	jb	LBB0_3
LBB0_7:
	movq	_SGE_RX_SM_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	40(%r13), %rcx
	xorl	%edx, %edx
	cmpq	$0, (%r13)
	sete	%dl
	leaq	(%rdx,%rdx,4), %rdx
	movl	8(%rcx,%rdx,8), %esi
	addl	%esi, %eax
	addl	$4, %eax
	movl	%eax, 12(%rcx,%rdx,8)
	movl	$4, %edi
	callq	_SKB_DATA_ALIGN
	movl	$16384, %ecx                    ## imm = 0x4000
	subl	%eax, %ecx
	movq	(%r13), %rax
	movq	40(%r13), %rdx
	leaq	(%rax,%rax,4), %rsi
	movl	%ecx, 12(%rdx,%rsi,8)
	xorl	%ecx, %ecx
	testq	%rax, %rax
	sete	%cl
	leaq	(%rcx,%rcx,4), %rax
	movl	$0, 16(%rdx,%rax,8)
	movl	$1, 16(%rdx,%rsi,8)
	movl	$1, 8(%r13)
	movq	_SGE_RESPQ_E_N@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%esi, 12(%r13)
	movq	$0, 32(%r13)
	shll	$2, %esi
	leaq	24(%r13), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_pci_alloc_consistent
	movq	%rax, %rcx
	movq	%rax, 16(%r13)
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_9
LBB0_8:
	movq	%r13, %rdi
	callq	_free_rx_resources
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SGE_FREELQ_N,4,2               ## @SGE_FREELQ_N
	.comm	_NET_IP_ALIGN,4,2               ## @NET_IP_ALIGN
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_SGE_RX_SM_BUF_SIZE,4,2         ## @SGE_RX_SM_BUF_SIZE
	.comm	_SGE_RESPQ_E_N,4,2              ## @SGE_RESPQ_E_N
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_alloc_rx_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_rx_resources
_alloc_rx_resources:                    ; @alloc_rx_resources
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x8, [x0, #56]
	ldr	x20, [x8]
Lloh0:
	adrp	x22, _SGE_FREELQ_N@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SGE_FREELQ_N@GOTPAGEOFF]
	ldr	w8, [x22]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x21, x1
	mov	x23, #0
	mov	x24, #0
	mov	w25, #1
Lloh2:
	adrp	x26, _NET_IP_ALIGN@GOTPAGE
Lloh3:
	ldr	x26, [x26, _NET_IP_ALIGN@GOTPAGEOFF]
Lloh4:
	adrp	x27, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x27, [x27, _GFP_KERNEL@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x8, x9, [x19, #40]
	add	x28, x8, x23
	str	w25, [x28]
	ldr	x8, [x21]
	ldr	w8, [x8, x24, lsl #2]
	str	w8, [x28, #4]
	ldr	w10, [x26]
	cmp	x9, #0
	csel	w9, w10, wzr, eq
	str	w9, [x28, #8]
	lsl	w1, w8, #2
	add	x2, x28, #32
	mov	x0, x20
	bl	_pci_alloc_consistent
	str	x0, [x28, #24]
	cbz	x0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x28, #4]
	lsl	w0, w8, #2
	ldr	w1, [x27]
	bl	_kzalloc
	str	w0, [x28, #20]
	cbz	w0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x24, x24, #1
	ldr	w8, [x22]
	add	x23, x23, #40
	cmp	x24, x8
	b.lo	LBB0_2
LBB0_5:
Lloh6:
	adrp	x8, _SGE_RX_SM_BUF_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SGE_RX_SM_BUF_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	x9, [x19, #40]
	ldr	x10, [x19]
	cmp	x10, #0
	cset	w10, eq
	mov	w21, #40
	umaddl	x9, w10, w21, x9
	ldr	w10, [x9, #8]
	add	w8, w8, w10
	add	w8, w8, #4
	str	w8, [x9, #12]
	mov	w0, #4
	bl	_SKB_DATA_ALIGN
	mov	w8, #16384
	sub	w8, w8, w0
	ldr	x9, [x19, #40]
	ldr	x10, [x19]
	madd	x11, x10, x21, x9
	cmp	x10, #0
	cset	w10, eq
	umaddl	x9, w10, w21, x9
	str	wzr, [x9, #16]
	mov	w9, #1
	stp	w8, w9, [x11, #12]
Lloh9:
	adrp	x8, _SGE_RESPQ_E_N@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SGE_RESPQ_E_N@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	stp	w9, w8, [x19, #8]
	str	xzr, [x19, #32]
	lsl	w1, w8, #2
	add	x2, x19, #24
	mov	x0, x20
	bl	_pci_alloc_consistent
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19, #16]
	cbnz	x8, LBB0_7
LBB0_6:
	mov	x0, x19
	bl	_free_rx_resources
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_SGE_FREELQ_N,4,2               ; @SGE_FREELQ_N
	.comm	_NET_IP_ALIGN,4,2               ; @NET_IP_ALIGN
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_SGE_RX_SM_BUF_SIZE,4,2         ; @SGE_RX_SM_BUF_SIZE
	.comm	_SGE_RESPQ_E_N,4,2              ; @SGE_RESPQ_E_N
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_alloc_rx_resources
.subsections_via_symbols
