	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ql_alloc_rx_resources
_ql_alloc_rx_resources:                 ## @ql_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	4(%rdi), %edi
	movl	68(%rsi), %esi
	leaq	64(%rbx), %rdx
	callq	_pci_alloc_consistent
	movq	%rax, 56(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	cmpl	$0, (%rbx)
	je	LBB0_8
## %bb.3:
	movl	4(%r14), %edi
	movl	52(%rbx), %esi
	leaq	48(%rbx), %rdx
	callq	_pci_alloc_consistent
	movq	%rax, 40(%rbx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movl	(%rbx), %edi
	shll	$2, %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	movq	%rax, 32(%rbx)
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_ql_init_sbq_ring
LBB0_8:
	xorl	%r15d, %r15d
	cmpl	$0, 4(%rbx)
	je	LBB0_15
## %bb.9:
	movl	4(%r14), %edi
	movl	28(%rbx), %esi
	leaq	24(%rbx), %rdx
	callq	_pci_alloc_consistent
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movl	4(%rbx), %edi
	shll	$2, %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_12
## %bb.16:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_ql_init_lbq_ring
	jmp	LBB0_15
LBB0_1:
	movq	_ifup@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rcx
	movq	%r14, %rdi
	callq	_netif_err
	jmp	LBB0_14
LBB0_4:
	leaq	L_.str.1(%rip), %rcx
	jmp	LBB0_13
LBB0_6:
	leaq	L_.str.2(%rip), %rcx
	jmp	LBB0_13
LBB0_10:
	leaq	L_.str.3(%rip), %rcx
	jmp	LBB0_13
LBB0_12:
	leaq	L_.str.4(%rip), %rcx
LBB0_13:
	movq	_ifup@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	movq	%r14, %rdi
	callq	_netif_err
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_ql_free_rx_resources
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_15:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ifup,4,2                       ## @ifup
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rx_ring alloc failed.\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"Small buffer queue allocation failed.\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.2:                               ## @.str.2
	.asciz	"Small buffer queue control block allocation failed.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Large buffer queue allocation failed.\n"

L_.str.4:                               ## @.str.4
	.asciz	"Large buffer queue control block allocation failed.\n"

	.no_dead_strip	_ql_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 ql_alloc_rx_resources
_ql_alloc_rx_resources:                 ; @ql_alloc_rx_resources
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #4]
	ldr	w1, [x1, #68]
	add	x2, x20, #64
	bl	_pci_alloc_consistent
	str	x0, [x20, #56]
	cbz	x0, LBB0_9
; %bb.1:
	ldr	w8, [x20]
	cbz	w8, LBB0_5
; %bb.2:
	ldr	w0, [x19, #4]
	ldr	w1, [x20, #52]
	add	x2, x20, #48
	bl	_pci_alloc_consistent
	str	x0, [x20, #40]
	cbz	x0, LBB0_10
; %bb.3:
	ldr	w8, [x20]
	lsl	w0, w8, #2
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_kmalloc
	str	x0, [x20, #32]
	cbz	x0, LBB0_12
; %bb.4:
	mov	x0, x19
	mov	x1, x20
	bl	_ql_init_sbq_ring
LBB0_5:
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_11
; %bb.6:
	ldr	w0, [x19, #4]
	ldr	w1, [x20, #28]
	add	x2, x20, #24
	bl	_pci_alloc_consistent
	str	x0, [x20, #16]
	cbz	x0, LBB0_13
; %bb.7:
	ldr	w8, [x20, #4]
	lsl	w0, w8, #2
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_kmalloc
	str	x0, [x20, #8]
	cbz	x0, LBB0_14
; %bb.8:
	mov	x0, x19
	mov	x1, x20
	bl	_ql_init_lbq_ring
	mov	w0, #0
	b	LBB0_17
LBB0_9:
Lloh6:
	adrp	x8, _ifup@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ifup@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w2, [x19]
Lloh9:
	adrp	x3, l_.str@PAGE
Lloh10:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netif_err
	b	LBB0_16
LBB0_10:
Lloh11:
	adrp	x3, l_.str.1@PAGE
Lloh12:
	add	x3, x3, l_.str.1@PAGEOFF
	b	LBB0_15
LBB0_11:
	mov	w0, #0
	b	LBB0_17
LBB0_12:
Lloh13:
	adrp	x3, l_.str.2@PAGE
Lloh14:
	add	x3, x3, l_.str.2@PAGEOFF
	b	LBB0_15
LBB0_13:
Lloh15:
	adrp	x3, l_.str.3@PAGE
Lloh16:
	add	x3, x3, l_.str.3@PAGEOFF
	b	LBB0_15
LBB0_14:
Lloh17:
	adrp	x3, l_.str.4@PAGE
Lloh18:
	add	x3, x3, l_.str.4@PAGEOFF
LBB0_15:
Lloh19:
	adrp	x8, _ifup@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ifup@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	ldr	w2, [x19]
	mov	x0, x19
	bl	_netif_err
	mov	x0, x19
	mov	x1, x20
	bl	_ql_free_rx_resources
LBB0_16:
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_17:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_ifup,4,2                       ; @ifup
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rx_ring alloc failed.\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"Small buffer queue allocation failed.\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.2:                               ; @.str.2
	.asciz	"Small buffer queue control block allocation failed.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Large buffer queue allocation failed.\n"

l_.str.4:                               ; @.str.4
	.asciz	"Large buffer queue control block allocation failed.\n"

	.no_dead_strip	_ql_alloc_rx_resources
.subsections_via_symbols
