	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alcor_data_set_dma
_alcor_data_set_dma:                    ## @alcor_data_set_dma
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	cmpl	$0, (%rdi)
	je	LBB0_7
## %bb.1:
	movq	%rdi, %rbx
	movq	8(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.4:
	movq	24(%rbx), %r14
	callq	_sg_dma_len
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movq	8(%rbx), %rdi
	callq	_sg_dma_address
	movq	_AU6601_REG_SDMA_ADDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_alcor_write32
	movq	8(%rbx), %rdi
	callq	_sg_next
	movq	%rax, 8(%rbx)
	decl	(%rbx)
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movl	16(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_3
LBB0_5:
	movl	16(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"have blocks, but no SG\n"

L_.str.1:                               ## @.str.1
	.asciz	"DMA SG len == 0\n"

	.comm	_AU6601_REG_SDMA_ADDR,4,2       ## @AU6601_REG_SDMA_ADDR
	.no_dead_strip	_alcor_data_set_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alcor_data_set_dma
_alcor_data_set_dma:                    ; @alcor_data_set_dma
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w8, [x0]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	x0, [x0, #8]
	cbz	x0, LBB0_5
; %bb.2:
	ldr	x20, [x19, #24]
	bl	_sg_dma_len
	cbz	w0, LBB0_6
; %bb.3:
	ldr	x0, [x19, #8]
	bl	_sg_dma_address
	mov	x1, x0
Lloh0:
	adrp	x8, _AU6601_REG_SDMA_ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AU6601_REG_SDMA_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_alcor_write32
	ldr	x0, [x19, #8]
	bl	_sg_next
	str	x0, [x19, #8]
	ldr	w8, [x19]
	sub	w8, w8, #1
	str	w8, [x19]
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	w0, [x19, #16]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_7
LBB0_6:
	ldr	w0, [x19, #16]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_dev_err
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"have blocks, but no SG\n"

l_.str.1:                               ; @.str.1
	.asciz	"DMA SG len == 0\n"

	.comm	_AU6601_REG_SDMA_ADDR,4,2       ; @AU6601_REG_SDMA_ADDR
	.no_dead_strip	_alcor_data_set_dma
.subsections_via_symbols
