	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function queue_get_desc
_queue_get_desc:                        ## @queue_get_desc
	.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
	movl	%edx, %r14d
	movq	%rsi, %rbx
	callq	_qmgr_get_entry
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %r12d
	movl	%eax, %edi
	andl	$31, %edi
	callq	_BUG_ON
	movq	%rbx, %rdi
	xorl	%esi, %esi
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.3:
	callq	_tx_desc_phys
	movl	%eax, %r13d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_tx_desc_ptr
	jmp	LBB0_5
LBB0_1:
	movl	$-1, %ebx
	jmp	LBB0_9
LBB0_4:
	callq	_rx_desc_phys
	movl	%eax, %r13d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_rx_desc_ptr
LBB0_5:
	movq	%rax, %r15
	movl	%r12d, %ebx
	subl	%r13d, %ebx
	sarl	$2, %ebx
	testl	%r14d, %r14d
	jne	LBB0_6
## %bb.7:
	movq	_RX_DESCS@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	_TX_DESCS@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%edi, %edi
	cmpl	(%rax), %ebx
	setge	%dil
	callq	_BUG_ON
	movslq	%ebx, %r14
	leaq	(%r15,%r14,4), %rsi
	movl	%r12d, %edi
	callq	_debug_desc
	movl	(%r15,%r14,4), %edi
	callq	_BUG_ON
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TX_DESCS,4,2                   ## @TX_DESCS
	.comm	_RX_DESCS,4,2                   ## @RX_DESCS
	.no_dead_strip	_queue_get_desc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function queue_get_desc
_queue_get_desc:                        ; @queue_get_desc
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x2
	mov	x21, x1
	bl	_qmgr_get_entry
	cbz	w0, LBB0_3
; %bb.1:
	mov	x19, x0
	and	w0, w0, #0x1f
	bl	_BUG_ON
	mov	x0, x21
	mov	w1, #0
	cbz	w20, LBB0_4
; %bb.2:
	bl	_tx_desc_phys
	mov	x22, x0
	mov	x0, x21
	mov	w1, #0
	bl	_tx_desc_ptr
	b	LBB0_5
LBB0_3:
	mov	w21, #-1
	b	LBB0_6
LBB0_4:
	bl	_rx_desc_phys
	mov	x22, x0
	mov	x0, x21
	mov	w1, #0
	bl	_rx_desc_ptr
LBB0_5:
	mov	x23, x0
	sub	w8, w19, w22
Lloh0:
	adrp	x9, _TX_DESCS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TX_DESCS@GOTPAGEOFF]
Lloh2:
	adrp	x10, _RX_DESCS@GOTPAGE
Lloh3:
	ldr	x10, [x10, _RX_DESCS@GOTPAGEOFF]
	asr	w21, w8, #2
	cmp	w20, #0
	csel	x8, x10, x9, eq
	ldr	w8, [x8]
	cmp	w21, w8
	cset	w0, ge
	bl	_BUG_ON
	add	x20, x23, w21, sxtw #2
	mov	x0, x19
	mov	x1, x20
	bl	_debug_desc
	ldr	w0, [x20]
	bl	_BUG_ON
LBB0_6:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_TX_DESCS,4,2                   ; @TX_DESCS
	.comm	_RX_DESCS,4,2                   ; @RX_DESCS
	.no_dead_strip	_queue_get_desc
.subsections_via_symbols
