	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function d40_xlate
_d40_xlate:                             ## @d40_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	%r14
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	leaq	-64(%rbp), %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	callq	_dma_cap_zero
	movq	_DMA_SLAVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_dma_cap_set
	movq	(%r14), %rax
	movl	(%rax), %ecx
	movl	%ecx, -20(%rbp)
	movl	8(%rax), %ebx
	movl	%ebx, %edi
	callq	_D40_DT_FLAGS_MODE
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	cmpl	$1, %eax
	jne	LBB0_5
## %bb.3:
	movq	_STEDMA40_MODE_PHYSICAL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_1:
	movq	_STEDMA40_MODE_LOGICAL@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
LBB0_5:
	movl	%ebx, %edi
	callq	_D40_DT_FLAGS_DIR
	cmpl	$1, %eax
	je	LBB0_8
## %bb.6:
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movq	_DMA_MEM_TO_DEV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movl	%ebx, %edi
	callq	_D40_DT_FLAGS_BIG_ENDIAN
	movq	%rax, -32(%rbp)
	jmp	LBB0_9
LBB0_8:
	movq	_DMA_DEV_TO_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movl	%ebx, %edi
	callq	_D40_DT_FLAGS_BIG_ENDIAN
	movq	%rax, -48(%rbp)
LBB0_9:
	movl	%ebx, %edi
	callq	_D40_DT_FLAGS_FIXED_CHAN
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	(%r14), %rax
	movl	4(%rax), %eax
	movl	%eax, -56(%rbp)
	movl	$1, -64(%rbp)
LBB0_11:
	movl	%ebx, %edi
	callq	_D40_DT_FLAGS_HIGH_PRIO
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movl	$1, -60(%rbp)
LBB0_13:
	movq	_stedma40_filter@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	callq	_dma_request_channel
	addq	$48, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_SLAVE,4,2                  ## @DMA_SLAVE
	.comm	_STEDMA40_MODE_LOGICAL,4,2      ## @STEDMA40_MODE_LOGICAL
	.comm	_STEDMA40_MODE_PHYSICAL,4,2     ## @STEDMA40_MODE_PHYSICAL
	.comm	_DMA_MEM_TO_DEV,4,2             ## @DMA_MEM_TO_DEV
	.comm	_DMA_DEV_TO_MEM,4,2             ## @DMA_DEV_TO_MEM
	.comm	_stedma40_filter,4,2            ## @stedma40_filter
	.no_dead_strip	_d40_xlate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function d40_xlate
_d40_xlate:                             ; @d40_xlate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	mov	x0, sp
	mov	w1, #0
	mov	w2, #48
	bl	_memset
	bl	_dma_cap_zero
Lloh0:
	adrp	x8, _DMA_SLAVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_SLAVE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_dma_cap_set
	ldr	x8, [x19]
	ldr	w9, [x8]
	str	w9, [sp, #44]
	ldr	w20, [x8, #8]
	mov	x0, x20
	bl	_D40_DT_FLAGS_MODE
	cbz	w0, LBB0_3
; %bb.1:
	cmp	w0, #1
	b.ne	LBB0_5
; %bb.2:
Lloh3:
	adrp	x8, _STEDMA40_MODE_PHYSICAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _STEDMA40_MODE_PHYSICAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh5:
	adrp	x8, _STEDMA40_MODE_LOGICAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _STEDMA40_MODE_LOGICAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	str	w8, [sp, #40]
LBB0_5:
	mov	x0, x20
	bl	_D40_DT_FLAGS_DIR
	cmp	w0, #1
	b.eq	LBB0_8
; %bb.6:
	cbnz	w0, LBB0_9
; %bb.7:
Lloh7:
	adrp	x8, _DMA_MEM_TO_DEV@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DMA_MEM_TO_DEV@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	mov	x0, x20
	bl	_D40_DT_FLAGS_BIG_ENDIAN
	str	x0, [sp, #32]
	b	LBB0_9
LBB0_8:
Lloh10:
	adrp	x8, _DMA_DEV_TO_MEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DMA_DEV_TO_MEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	mov	x0, x20
	bl	_D40_DT_FLAGS_BIG_ENDIAN
	str	x0, [sp, #16]
LBB0_9:
	mov	x0, x20
	bl	_D40_DT_FLAGS_FIXED_CHAN
	cbz	x0, LBB0_11
; %bb.10:
	ldr	x8, [x19]
	ldr	w8, [x8, #4]
	mov	w9, #1
	str	w8, [sp, #8]
	str	w9, [sp]
LBB0_11:
	mov	x0, x20
	bl	_D40_DT_FLAGS_HIGH_PRIO
	cbz	x0, LBB0_13
; %bb.12:
	mov	w8, #1
	str	w8, [sp, #4]
LBB0_13:
Lloh13:
	adrp	x8, _stedma40_filter@GOTPAGE
Lloh14:
	ldr	x8, [x8, _stedma40_filter@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x2, sp
	bl	_dma_request_channel
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_SLAVE,4,2                  ; @DMA_SLAVE
	.comm	_STEDMA40_MODE_LOGICAL,4,2      ; @STEDMA40_MODE_LOGICAL
	.comm	_STEDMA40_MODE_PHYSICAL,4,2     ; @STEDMA40_MODE_PHYSICAL
	.comm	_DMA_MEM_TO_DEV,4,2             ; @DMA_MEM_TO_DEV
	.comm	_DMA_DEV_TO_MEM,4,2             ; @DMA_DEV_TO_MEM
	.comm	_stedma40_filter,4,2            ; @stedma40_filter
	.no_dead_strip	_d40_xlate
.subsections_via_symbols
