	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_aq_ring_rx_alloc               ## -- Begin function aq_ring_rx_alloc
	.p2align	4, 0x90
_aq_ring_rx_alloc:                      ## @aq_ring_rx_alloc
	.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	%rcx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	%rsi, 24(%rdi)
	movl	%edx, (%rdi)
	movl	16(%rcx), %eax
	movl	%eax, 20(%rdi)
	movq	8(%rcx), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rdi)
	movq	_AQ_CFG_RX_FRAME_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	cmpl	$1, %edx
	sbbl	$-1, %eax
	movl	%eax, %edi
	callq	_fls
	leaq	-1(%rax), %rcx
	movq	(%r15), %rdx
	cmpq	%rax, %rdx
	cmovgeq	%rdx, %rcx
	movq	%rcx, 8(%rbx)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_aq_ring_alloc
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_3
## %bb.2:
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_aq_ring_free
LBB0_3:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AQ_CFG_RX_FRAME_MAX,4,2        ## @AQ_CFG_RX_FRAME_MAX
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_aq_ring_rx_alloc               ; -- Begin function aq_ring_rx_alloc
	.p2align	2
_aq_ring_rx_alloc:                      ; @aq_ring_rx_alloc
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x3
	mov	x20, x1
	mov	x21, x0
	str	x1, [x0, #24]
	str	w2, [x0]
	ldr	w8, [x3, #16]
	ldr	x9, [x3, #8]
	ldr	w9, [x9]
	stp	w9, w8, [x0, #16]
Lloh0:
	adrp	x8, _AQ_CFG_RX_FRAME_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AQ_CFG_RX_FRAME_MAX@GOTPAGEOFF]
Lloh2:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	cmp	w8, #0
	cinc	w0, w10, ne
	bl	_fls
	sub	x8, x0, #1
	ldr	x9, [x19]
	cmp	x9, x0
	csel	x8, x8, x9, lt
	str	x8, [x21, #8]
	mov	x0, x21
	mov	x1, x20
	bl	_aq_ring_alloc
	cbnz	x0, LBB0_3
; %bb.1:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.2:
	mov	x0, #0
	bl	_aq_ring_free
	mov	x0, #0
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AQ_CFG_RX_FRAME_MAX,4,2        ; @AQ_CFG_RX_FRAME_MAX
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
