	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function jz4780_of_dma_xlate
_jz4780_of_dma_xlate:                   ## @jz4780_of_dma_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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rsi), %rbx
	movl	20(%rbx), %eax
	movl	%eax, -36(%rbp)
	cmpl	$2, (%rdi)
	jne	LBB0_10
## %bb.1:
	movq	8(%rdi), %rax
	movl	(%rax), %r15d
	movl	%r15d, -48(%rbp)
	movl	4(%rax), %r14d
	movl	%r14d, -44(%rbp)
	testl	%r14d, %r14d
	js	LBB0_6
## %bb.2:
	movq	24(%rbx), %rax
	cmpl	(%rax), %r14d
	jge	LBB0_7
## %bb.3:
	movl	(%rbx), %r12d
	movl	%r14d, %edi
	callq	_BIT
	testl	%r12d, %eax
	je	LBB0_8
## %bb.4:
	movq	8(%rbx), %rax
	movl	%r15d, (%rax,%r14,8)
	leaq	(%rax,%r14,8), %rdi
	addq	$4, %rdi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dma_get_slave_channel          ## TAILCALL
LBB0_6:
	movq	_jz4780_dma_filter_fn@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%rsi), %ecx
	leaq	-36(%rbp), %rdi
	leaq	-48(%rbp), %rdx
	movl	%eax, %esi
	callq	___dma_request_channel
	jmp	LBB0_11
LBB0_7:
	movl	16(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_9
LBB0_8:
	movl	16(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_9:
	movl	%r14d, %edx
	callq	_dev_err
LBB0_10:
	xorl	%eax, %eax
LBB0_11:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"device requested non-existent channel %u\n"

L_.str.1:                               ## @.str.1
	.asciz	"device requested unreserved channel %u\n"

	.comm	_jz4780_dma_filter_fn,4,2       ## @jz4780_dma_filter_fn
	.no_dead_strip	_jz4780_of_dma_xlate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function jz4780_of_dma_xlate
_jz4780_of_dma_xlate:                   ; @jz4780_of_dma_xlate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x20, [x1, #8]
	ldr	w8, [x20, #20]
	str	w8, [sp, #12]
	ldr	w8, [x0]
	cmp	w8, #2
	b.ne	LBB0_9
; %bb.1:
	ldr	x8, [x0, #8]
	ldp	w21, w19, [x8]
	stp	w21, w19, [sp]
	tbnz	w19, #31, LBB0_5
; %bb.2:
	ldr	x8, [x20, #24]
	ldr	w8, [x8]
	cmp	w19, w8
	b.ge	LBB0_6
; %bb.3:
	ldr	w22, [x20]
	mov	x0, x19
	bl	_BIT
	tst	w0, w22
	b.eq	LBB0_7
; %bb.4:
	ldr	x8, [x20, #8]
	add	x0, x8, x19, lsl #3
	str	w21, [x0], #4
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_dma_get_slave_channel
LBB0_5:
Lloh0:
	adrp	x8, _jz4780_dma_filter_fn@GOTPAGE
Lloh1:
	ldr	x8, [x8, _jz4780_dma_filter_fn@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w3, [x1]
	add	x0, sp, #12
	mov	x2, sp
	mov	x1, x8
	bl	___dma_request_channel
	b	LBB0_10
LBB0_6:
	ldr	w0, [x20, #16]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_8
LBB0_7:
	ldr	w0, [x20, #16]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_8:
	mov	x2, x19
	bl	_dev_err
LBB0_9:
	mov	x0, #0
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.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	"device requested non-existent channel %u\n"

l_.str.1:                               ; @.str.1
	.asciz	"device requested unreserved channel %u\n"

	.comm	_jz4780_dma_filter_fn,4,2       ; @jz4780_dma_filter_fn
	.no_dead_strip	_jz4780_of_dma_xlate
.subsections_via_symbols
