	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dma_xfer
_dma_xfer:                              ## @dma_xfer
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_DMA_CTRL_ACK@GOTPCREL(%rip), %rax
	movq	_DMA_PREP_INTERRUPT@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rbx
	orq	(%rax), %rbx
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	cmpl	%ecx, (%rax)
	jne	LBB0_2
## %bb.1:
	leaq	24(%rdi), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	cmpl	%ecx, (%rax)
	jne	LBB0_12
## %bb.3:
	leaq	16(%rdi), %rax
LBB0_4:
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	(%rax), %r12
	movq	(%r12), %r13
	movl	(%r13), %edi
	movl	%edx, %r14d
	movl	%ecx, %r15d
	callq	_dma_map_single
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	cmpl	%r15d, (%rcx)
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	8(%r15), %esi
	movl	%esi, %edx
	cmovel	%eax, %edx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmovnel	%eax, %esi
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movl	%r14d, %ecx
	movq	%rbx, %r8
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	callq	*8(%r13)
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	_dma_complete@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%rax)
	movq	%r15, 8(%rax)
	movq	%rax, %rdi
	callq	*(%rax)
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_dma_submit_error
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %r14d
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_10
LBB0_5:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_10
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_11
LBB0_8:
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_dma_async_issue_pending
	leaq	4(%r15), %rbx
	movl	$3000, %edi                     ## imm = 0xBB8
	callq	_msecs_to_jiffies
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	xorl	%r14d, %r14d
	testq	%rax, %rax
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jne	LBB0_10
## %bb.9:
	movq	%r13, %rdi
	callq	_dmaengine_terminate_all
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_10:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movl	%ebx, %esi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	callq	_dma_unmap_single
LBB0_11:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_CTRL_ACK,8,3               ## @DMA_CTRL_ACK
	.comm	_DMA_PREP_INTERRUPT,8,3         ## @DMA_PREP_INTERRUPT
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"device_prep_dma_memcpy error\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_dma_complete,4,2               ## @dma_complete
L_.str.1:                               ## @.str.1
	.asciz	"dma_submit_error %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"wait_for_completion_timeout\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_dma_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dma_xfer
_dma_xfer:                              ; @dma_xfer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x3
	mov	x20, x2
	mov	x22, x0
Lloh0:
	adrp	x8, _DMA_CTRL_ACK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_CTRL_ACK@GOTPAGEOFF]
Lloh2:
	adrp	x9, _DMA_PREP_INTERRUPT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DMA_PREP_INTERRUPT@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x25, _DMA_TO_DEVICE@GOTPAGE
Lloh7:
	ldr	x25, [x25, _DMA_TO_DEVICE@GOTPAGEOFF]
	ldr	w10, [x25]
	cmp	w10, w3
	b.ne	LBB0_2
; %bb.1:
	add	x10, x22, #24
	b	LBB0_4
LBB0_2:
Lloh8:
	adrp	x10, _DMA_FROM_DEVICE@GOTPAGE
Lloh9:
	ldr	x10, [x10, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	cmp	w10, w19
	b.ne	LBB0_8
; %bb.3:
	add	x10, x22, #16
LBB0_4:
	orr	x24, x9, x8
	ldr	x23, [x10]
	ldr	x26, [x23]
	ldr	w0, [x26]
	mov	x2, x20
	mov	x3, x19
	bl	_dma_map_single
	mov	x21, x0
	ldr	w8, [x25]
	ldr	w9, [x22, #8]
	cmp	w8, w19
	csel	w2, w0, w9, eq
	csel	w1, w9, w0, eq
	ldr	x8, [x26, #8]
	mov	x0, x23
	mov	x3, x20
	mov	x4, x24
	blr	x8
	cbz	x0, LBB0_7
; %bb.5:
Lloh11:
	adrp	x8, _dma_complete@GOTPAGE
Lloh12:
	ldr	x8, [x8, _dma_complete@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x0, #16]
	str	x22, [x0, #8]
	ldr	x8, [x0]
	blr	x8
	mov	x25, x0
	bl	_dma_submit_error
	cbz	w0, LBB0_9
; %bb.6:
	mov	x24, x0
	ldr	w0, [x22]
	str	x25, [sp]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_13
LBB0_7:
	ldr	w0, [x22]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh18:
	adrp	x8, _EIO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_12
LBB0_8:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_14
LBB0_9:
	mov	x0, x23
	bl	_dma_async_issue_pending
	add	x24, x22, #4
	mov	w0, #3000
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x24
	bl	_wait_for_completion_timeout
	cbz	x0, LBB0_11
; %bb.10:
	mov	w24, #0
	b	LBB0_13
LBB0_11:
	mov	x0, x23
	bl	_dmaengine_terminate_all
	ldr	w0, [x22]
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
Lloh25:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_13:
	ldr	w0, [x26]
	mov	x1, x21
	mov	x2, x20
	mov	x3, x19
	bl	_dma_unmap_single
LBB0_14:
	mov	x0, x24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_CTRL_ACK,8,3               ; @DMA_CTRL_ACK
	.comm	_DMA_PREP_INTERRUPT,8,3         ; @DMA_PREP_INTERRUPT
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"device_prep_dma_memcpy error\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_dma_complete,4,2               ; @dma_complete
l_.str.1:                               ; @.str.1
	.asciz	"dma_submit_error %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"wait_for_completion_timeout\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_dma_xfer
.subsections_via_symbols
