	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rcar_drif_qbuf
_rcar_drif_qbuf:                        ## @rcar_drif_qbuf
	.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	%rdi, %rbx
	movq	16(%rdi), %r14
	movl	(%rdi), %edi
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	movl	8(%rbx), %esi
	movl	(%r14), %ecx
	movq	_RCAR_DRIF_NUM_HWBUFS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	imull	%ecx, %edx
	movq	_DMA_DEV_TO_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_DMA_PREP_INTERRUPT@GOTPCREL(%rip), %r10
	movq	_DMA_CTRL_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	orl	(%r10), %r9d
	callq	_dmaengine_prep_dma_cyclic
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	_rcar_drif_dma_complete@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%rax)
	movq	%rbx, (%rax)
	movq	%rax, %rdi
	callq	_dmaengine_submit
	movl	%eax, %edi
	callq	_dma_submit_error
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	4(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_1:
	movl	4(%rbx), %edx
	leaq	L_.str(%rip), %rsi
LBB0_2:
	movq	%r14, %rdi
	callq	_rdrif_err
	jmp	LBB0_6
LBB0_5:
	movl	(%rbx), %edi
	callq	_dma_async_issue_pending
	xorl	%r15d, %r15d
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_RCAR_DRIF_NUM_HWBUFS,4,2       ## @RCAR_DRIF_NUM_HWBUFS
	.comm	_DMA_DEV_TO_MEM,4,2             ## @DMA_DEV_TO_MEM
	.comm	_DMA_PREP_INTERRUPT,4,2         ## @DMA_PREP_INTERRUPT
	.comm	_DMA_CTRL_ACK,4,2               ## @DMA_CTRL_ACK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ch%u: prep dma cyclic failed\n"

	.comm	_rcar_drif_dma_complete,4,2     ## @rcar_drif_dma_complete
L_.str.1:                               ## @.str.1
	.asciz	"ch%u: dma submit failed\n"

	.no_dead_strip	_rcar_drif_qbuf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rcar_drif_qbuf
_rcar_drif_qbuf:                        ; @rcar_drif_qbuf
	.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	x21, x0
	ldr	x20, [x0, #16]
	ldr	w1, [x0, #8]
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w19, w8
	ldr	w0, [x0]
	ldr	w3, [x20]
Lloh3:
	adrp	x8, _RCAR_DRIF_NUM_HWBUFS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RCAR_DRIF_NUM_HWBUFS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mul	w2, w8, w3
Lloh6:
	adrp	x8, _DMA_DEV_TO_MEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DMA_DEV_TO_MEM@GOTPAGEOFF]
Lloh8:
	adrp	x9, _DMA_PREP_INTERRUPT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DMA_PREP_INTERRUPT@GOTPAGEOFF]
Lloh10:
	ldr	w4, [x8]
Lloh11:
	ldr	w8, [x9]
Lloh12:
	adrp	x9, _DMA_CTRL_ACK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _DMA_CTRL_ACK@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w5, w9, w8
	bl	_dmaengine_prep_dma_cyclic
	cbz	x0, LBB0_3
; %bb.1:
Lloh15:
	adrp	x8, _rcar_drif_dma_complete@GOTPAGE
Lloh16:
	ldr	x8, [x8, _rcar_drif_dma_complete@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x0, #8]
	str	x21, [x0]
	bl	_dmaengine_submit
	bl	_dma_submit_error
	cbz	x0, LBB0_5
; %bb.2:
	ldr	w2, [x21, #4]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
	ldr	w2, [x21, #4]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	mov	x0, x20
	bl	_rdrif_err
	b	LBB0_6
LBB0_5:
	ldr	w0, [x21]
	bl	_dma_async_issue_pending
	mov	w19, #0
LBB0_6:
	mov	x0, x19
	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	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_RCAR_DRIF_NUM_HWBUFS,4,2       ; @RCAR_DRIF_NUM_HWBUFS
	.comm	_DMA_DEV_TO_MEM,4,2             ; @DMA_DEV_TO_MEM
	.comm	_DMA_PREP_INTERRUPT,4,2         ; @DMA_PREP_INTERRUPT
	.comm	_DMA_CTRL_ACK,4,2               ; @DMA_CTRL_ACK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ch%u: prep dma cyclic failed\n"

	.comm	_rcar_drif_dma_complete,4,2     ; @rcar_drif_dma_complete
l_.str.1:                               ; @.str.1
	.asciz	"ch%u: dma submit failed\n"

	.no_dead_strip	_rcar_drif_qbuf
.subsections_via_symbols
