	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function diva_get_dma_descriptor
_diva_get_dma_descriptor:               ## @diva_get_dma_descriptor
	.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	_diva_xdi_extended_features@GOTPCREL(%rip), %rax
	movq	_DIVA_CAPI_XDI_PROVIDES_RX_DMA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	$-1, %r14d
	testl	%ecx, (%rax)
	je	LBB0_6
## %bb.1:
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	$0, -24(%rbp)
	movq	(%rdi), %rax
	movq	(%rax), %rcx
	decq	%rcx
	movq	-32(%rbp), %rdx
	movq	%rcx, (%rdx)
	leaq	-32(%rbp), %rdi
	callq	*8(%rax)
	cmpl	$0, -16(%rbp)
	jne	LBB0_5
## %bb.2:
	movl	-32(%rbp), %edx
	testl	%edx, %edx
	js	LBB0_5
## %bb.3:
	movq	-24(%rbp), %rcx
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.4:
	movq	%rcx, (%r15)
	movq	(%rbx), %rax
	movq	(%rax), %rsi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_dprintf
	movl	$3, %edi
	movl	%eax, %esi
	callq	_dbug
	movl	-32(%rbp), %r14d
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_dprintf
	movl	$1, %edi
	movl	%eax, %esi
	callq	_dbug
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_diva_xdi_extended_features,4,2 ## @diva_xdi_extended_features
	.comm	_DIVA_CAPI_XDI_PROVIDES_RX_DMA,4,2 ## @DIVA_CAPI_XDI_PROVIDES_RX_DMA
	.comm	_IDI_SYNC_REQ_DMA_DESCRIPTOR_OPERATION,4,2 ## @IDI_SYNC_REQ_DMA_DESCRIPTOR_OPERATION
	.comm	_IDI_SYNC_REQ_DMA_DESCRIPTOR_ALLOC,4,2 ## @IDI_SYNC_REQ_DMA_DESCRIPTOR_ALLOC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dma_alloc, a:%d (%d-%08x)"

L_.str.1:                               ## @.str.1
	.asciz	"dma_alloc failed"

	.no_dead_strip	_diva_get_dma_descriptor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function diva_get_dma_descriptor
_diva_get_dma_descriptor:               ; @diva_get_dma_descriptor
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
Lloh0:
	adrp	x8, _diva_xdi_extended_features@GOTPAGE
Lloh1:
	ldr	x8, [x8, _diva_xdi_extended_features@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _DIVA_CAPI_XDI_PROVIDES_RX_DMA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DIVA_CAPI_XDI_PROVIDES_RX_DMA@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	str	xzr, [sp, #32]
	ldr	x8, [x0]
	ldp	x9, x8, [x8]
	sub	x9, x9, #1
	ldr	x10, [sp, #24]
	str	x9, [x10]
	add	x0, sp, #24
	blr	x8
	ldr	w8, [sp, #40]
	cbnz	w8, LBB0_5
; %bb.2:
	ldr	w8, [sp, #24]
	tbnz	w8, #31, LBB0_5
; %bb.3:
	ldr	x9, [sp, #32]
	cbz	x9, LBB0_5
; %bb.4:
	str	x9, [x20]
	ldr	x10, [x19]
	ldr	x10, [x10]
	stp	x8, x9, [sp, #8]
	str	x10, [sp]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintf
	mov	x1, x0
	mov	w0, #3
	bl	_dbug
	ldr	w0, [sp, #24]
	b	LBB0_7
LBB0_5:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dprintf
	mov	x1, x0
	mov	w0, #1
	bl	_dbug
LBB0_6:
	mov	w0, #-1
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_diva_xdi_extended_features,4,2 ; @diva_xdi_extended_features
	.comm	_DIVA_CAPI_XDI_PROVIDES_RX_DMA,4,2 ; @DIVA_CAPI_XDI_PROVIDES_RX_DMA
	.comm	_IDI_SYNC_REQ_DMA_DESCRIPTOR_OPERATION,4,2 ; @IDI_SYNC_REQ_DMA_DESCRIPTOR_OPERATION
	.comm	_IDI_SYNC_REQ_DMA_DESCRIPTOR_ALLOC,4,2 ; @IDI_SYNC_REQ_DMA_DESCRIPTOR_ALLOC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dma_alloc, a:%d (%d-%08x)"

l_.str.1:                               ; @.str.1
	.asciz	"dma_alloc failed"

	.no_dead_strip	_diva_get_dma_descriptor
.subsections_via_symbols
