	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_to_rbuf
_add_to_rbuf:                           ## @add_to_rbuf
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %rbx
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	(%rbx), %ecx
	movq	_MBOX_TX_QUEUE_LEN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	_ENOBUFS@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_3
LBB0_2:
	movslq	4(%rbx), %r15
	movq	16(%rbx), %rdx
	movq	%r12, (%rdx,%r15,8)
	incl	%ecx
	movl	%ecx, (%rbx)
	movl	(%rax), %eax
	decl	%eax
	leal	1(%r15), %ecx
	xorl	%edx, %edx
	cmpl	%eax, %r15d
	cmovnel	%ecx, %edx
	movl	%edx, 4(%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
LBB0_3:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MBOX_TX_QUEUE_LEN,4,2          ## @MBOX_TX_QUEUE_LEN
	.comm	_ENOBUFS,4,2                    ## @ENOBUFS
	.no_dead_strip	_add_to_rbuf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_to_rbuf
_add_to_rbuf:                           ; @add_to_rbuf
	.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	x22, x1
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w9, [x20]
Lloh0:
	adrp	x8, _MBOX_TX_QUEUE_LEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MBOX_TX_QUEUE_LEN@GOTPAGEOFF]
	ldr	w10, [x8]
	cmp	w9, w10
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
Lloh2:
	adrp	x8, _ENOBUFS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOBUFS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_3
LBB0_2:
	ldrsw	x21, [x20, #4]
	ldr	x10, [x20, #16]
	str	x22, [x10, x21, lsl #3]
	add	w9, w9, #1
	str	w9, [x20]
	ldr	w8, [x8]
	sub	w8, w8, #1
	cmp	w21, w8
	csinc	w8, wzr, w21, eq
	str	w8, [x20, #4]
	mov	x0, x19
	bl	_spin_unlock_irqrestore
LBB0_3:
	mov	x0, x21
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MBOX_TX_QUEUE_LEN,4,2          ; @MBOX_TX_QUEUE_LEN
	.comm	_ENOBUFS,4,2                    ; @ENOBUFS
	.no_dead_strip	_add_to_rbuf
.subsections_via_symbols
