	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_adf_send_message               ## -- Begin function adf_send_message
	.p2align	4, 0x90
_adf_send_message:                      ## @adf_send_message
	.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, %r14
	movq	%rdi, %rbx
	movl	48(%rdi), %esi
	movl	$1, %edi
	callq	_atomic_add_return
	movq	%rax, %r15
	movl	32(%rbx), %edi
	movl	36(%rbx), %esi
	callq	_ADF_MAX_INFLIGHTS
	cmpq	%rax, %r15
	jle	LBB0_2
## %bb.1:
	movl	48(%rbx), %edi
	callq	_atomic_dec
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_3
LBB0_2:
	movq	%rbx, %rdi
	callq	_spin_lock_bh
	movq	8(%rbx), %r15
	addq	40(%rbx), %r15
	movl	36(%rbx), %edi
	callq	_ADF_MSG_SIZE_TO_BYTES
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%rax, %rdx
	callq	_memcpy
	movq	8(%rbx), %r14
	movl	36(%rbx), %edi
	callq	_ADF_MSG_SIZE_TO_BYTES
	addq	%rax, %r14
	movl	32(%rbx), %edi
	callq	_ADF_RING_SIZE_MODULO
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_adf_modulo
	movq	%rax, 8(%rbx)
	movq	24(%rbx), %rcx
	movl	(%rcx), %esi
	movl	4(%rcx), %edi
	movl	16(%rbx), %edx
	movq	%rax, %rcx
	callq	_WRITE_CSR_RING_TAIL
	movq	%rbx, %rdi
	callq	_spin_unlock_bh
	xorl	%eax, %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_adf_send_message               ; -- Begin function adf_send_message
	.p2align	2
_adf_send_message:                      ; @adf_send_message
	.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	x20, x1
	mov	x19, x0
	ldr	w1, [x0, #48]
	mov	w0, #1
	bl	_atomic_add_return
	mov	x21, x0
	ldp	w0, w1, [x19, #32]
	bl	_ADF_MAX_INFLIGHTS
	cmp	x21, x0
	b.le	LBB0_2
; %bb.1:
	ldr	w0, [x19, #48]
	bl	_atomic_dec
Lloh0:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_spin_lock_bh
	ldr	x8, [x19, #40]
	ldr	x9, [x19, #8]
	add	x21, x9, x8
	ldr	w0, [x19, #36]
	bl	_ADF_MSG_SIZE_TO_BYTES
	mov	x2, x0
	mov	x0, x21
	mov	x1, x20
	bl	_memcpy
	ldr	x20, [x19, #8]
	ldr	w0, [x19, #36]
	bl	_ADF_MSG_SIZE_TO_BYTES
	add	x20, x0, x20
	ldr	w0, [x19, #32]
	bl	_ADF_RING_SIZE_MODULO
	mov	x1, x0
	mov	x0, x20
	bl	_adf_modulo
	mov	x3, x0
	str	x0, [x19, #8]
	ldr	x8, [x19, #24]
	ldp	w1, w0, [x8]
	ldr	w2, [x19, #16]
	bl	_WRITE_CSR_RING_TAIL
	mov	x0, x19
	bl	_spin_unlock_bh
	mov	w0, #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	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
.subsections_via_symbols
