	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ql_alloc_buffer_queues
_ql_alloc_buffer_queues:                ## @ql_alloc_buffer_queues
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	4(%rdi), %eax
	movl	96(%rdi), %edi
	leal	(,%rax,4), %ecx
	movl	%ecx, (%rbx)
	movslq	%ecx, %rcx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r14
	movq	(%r14), %rdx
	shll	$3, %eax
	cmpq	%rcx, %rdx
	cmovbel	%eax, %edx
	movl	%edx, 8(%rbx)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$4, %esi
	callq	_kmalloc_array
	movq	%rax, 88(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	8(%rbx), %esi
	movl	64(%rbx), %edi
	leaq	48(%rbx), %rdx
	callq	_pci_alloc_consistent
	movq	%rax, 56(%rbx)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, 80(%rbx)
	movl	48(%rbx), %eax
	movl	64(%rbx), %edi
	movl	%eax, 72(%rbx)
	movq	_NUM_SBUFQ_ENTRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(,%rax,4), %ecx
	movl	%ecx, 12(%rbx)
	movslq	%ecx, %rcx
	movq	(%r14), %rsi
	shll	$3, %eax
	cmpq	%rcx, %rsi
	cmovbel	%eax, %esi
	movl	%esi, 16(%rbx)
	leaq	24(%rbx), %rdx
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_pci_alloc_consistent
	movq	%rax, 32(%rbx)
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, 40(%rbx)
	movl	24(%rbx), %eax
	movl	%eax, 28(%rbx)
	movq	_QL_ALLOC_BUFQS_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$20, %rbx
	movq	%rbx, %rsi
	callq	_set_bit
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_3:
	movl	68(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_err
	jmp	LBB0_1
LBB0_5:
	movl	68(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_netdev_err
	movl	64(%rbx), %edi
	movq	56(%rbx), %rdx
	movl	8(%rbx), %esi
	movl	48(%rbx), %ecx
	callq	_pci_free_consistent
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"lBufQ failed\n"

	.comm	_NUM_SBUFQ_ENTRIES,4,2          ## @NUM_SBUFQ_ENTRIES
L_.str.1:                               ## @.str.1
	.asciz	"Small Buffer Queue allocation failed\n"

	.comm	_QL_ALLOC_BUFQS_DONE,4,2        ## @QL_ALLOC_BUFQS_DONE
	.no_dead_strip	_ql_alloc_buffer_queues
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ql_alloc_buffer_queues
_ql_alloc_buffer_queues:                ; @ql_alloc_buffer_queues
	.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	x19, x0
	ldr	w8, [x0, #4]
	lsl	w9, w8, #2
	str	w9, [x0]
Lloh0:
	adrp	x20, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _PAGE_SIZE@GOTPAGEOFF]
	ldr	x10, [x20]
	lsl	w8, w8, #3
	cmp	x10, w9, sxtw
	csel	w8, w10, w8, hi
	str	w8, [x0, #8]
	ldr	w0, [x0, #96]
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	w1, #4
	bl	_kmalloc_array
	str	x0, [x19, #88]
	cbz	x0, LBB0_6
; %bb.1:
	ldr	w0, [x19, #64]
	ldr	w1, [x19, #8]
	add	x2, x19, #48
	bl	_pci_alloc_consistent
	str	x0, [x19, #56]
	cbz	x0, LBB0_4
; %bb.2:
	str	x0, [x19, #80]
	ldr	w8, [x19, #48]
	str	w8, [x19, #72]
Lloh5:
	adrp	x8, _NUM_SBUFQ_ENTRIES@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NUM_SBUFQ_ENTRIES@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	lsl	w9, w8, #2
	ldr	x10, [x20]
	lsl	w8, w8, #3
	cmp	x10, w9, sxtw
	csel	w1, w10, w8, hi
	stp	w9, w1, [x19, #12]
	ldr	w0, [x19, #64]
	add	x2, x19, #24
	bl	_pci_alloc_consistent
	str	x0, [x19, #32]
	cbz	x0, LBB0_5
; %bb.3:
	str	x0, [x19, #40]
	ldr	w8, [x19, #24]
	str	w8, [x19, #28]
Lloh8:
	adrp	x8, _QL_ALLOC_BUFQS_DONE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _QL_ALLOC_BUFQS_DONE@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	add	x1, x19, #20
	bl	_set_bit
	mov	w0, #0
	b	LBB0_7
LBB0_4:
	ldr	w0, [x19, #68]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
	b	LBB0_6
LBB0_5:
	ldr	w0, [x19, #68]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_netdev_err
	ldr	w0, [x19, #64]
	ldr	w1, [x19, #8]
	ldr	x2, [x19, #56]
	ldr	w3, [x19, #48]
	bl	_pci_free_consistent
LBB0_6:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"lBufQ failed\n"

	.comm	_NUM_SBUFQ_ENTRIES,4,2          ; @NUM_SBUFQ_ENTRIES
l_.str.1:                               ; @.str.1
	.asciz	"Small Buffer Queue allocation failed\n"

	.comm	_QL_ALLOC_BUFQS_DONE,4,2        ; @QL_ALLOC_BUFQS_DONE
	.no_dead_strip	_ql_alloc_buffer_queues
.subsections_via_symbols
