	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function at_xdmac_xlate
_at_xdmac_xlate:                        ## @at_xdmac_xlate
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rsi), %rdi
	movq	(%rdi), %r14
	cmpl	$1, (%rbx)
	jne	LBB0_1
## %bb.3:
	callq	_dma_get_any_slave_channel
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_to_at_xdmac_chan
	movq	%rax, %r12
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	callq	_AT91_XDMAC_DT_GET_MEM_IF
	movl	%eax, 8(%r12)
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	callq	_AT91_XDMAC_DT_GET_PER_IF
	movl	%eax, 4(%r12)
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	callq	_AT91_XDMAC_DT_GET_PERID
	movl	%eax, (%r12)
	movl	4(%r12), %ecx
	movl	8(%r12), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %r8d
	callq	_dev_dbg
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movq	%r14, %rdi
	callq	_dev_err
	xorl	%r15d, %r15d
LBB0_6:
	movq	%r15, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dma phandler args: bad number of args\n"

L_.str.1:                               ## @.str.1
	.asciz	"can't get a dma channel\n"

L_.str.2:                               ## @.str.2
	.asciz	"chan dt cfg: memif=%u perif=%u perid=%u\n"

	.no_dead_strip	_at_xdmac_xlate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function at_xdmac_xlate
_at_xdmac_xlate:                        ; @at_xdmac_xlate
	.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	x0, [x1]
	ldr	x19, [x0]
	ldr	w8, [x21]
	cmp	w8, #1
	b.ne	LBB0_3
; %bb.1:
	bl	_dma_get_any_slave_channel
	mov	x20, x0
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x20
	bl	_to_at_xdmac_chan
	mov	x22, x0
	ldr	x8, [x21, #8]
	ldr	w0, [x8]
	bl	_AT91_XDMAC_DT_GET_MEM_IF
	str	w0, [x22, #8]
	ldr	x8, [x21, #8]
	ldr	w0, [x8]
	bl	_AT91_XDMAC_DT_GET_PER_IF
	str	w0, [x22, #4]
	ldr	x8, [x21, #8]
	ldr	w0, [x8]
	bl	_AT91_XDMAC_DT_GET_PERID
	mov	x4, x0
	str	w0, [x22]
	ldp	w3, w2, [x22, #4]
Lloh0:
	adrp	x1, l_.str.2@PAGE
Lloh1:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	b	LBB0_5
LBB0_3:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x20, #0
	b	LBB0_5
LBB0_4:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_5:
	mov	x0, x20
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dma phandler args: bad number of args\n"

l_.str.1:                               ; @.str.1
	.asciz	"can't get a dma channel\n"

l_.str.2:                               ; @.str.2
	.asciz	"chan dt cfg: memif=%u perif=%u perid=%u\n"

	.no_dead_strip	_at_xdmac_xlate
.subsections_via_symbols
