	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function edma_execute
_edma_execute:                          ## @edma_execute
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	16(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	32(%rdi), %rbx
	movq	40(%rdi), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testq	%rbx, %rbx
	jne	LBB0_3
## %bb.1:
	leaq	40(%r15), %rdi
	callq	_vchan_next_desc
	testq	%rax, %rax
	je	LBB0_16
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %rdi
	addq	$4, %rdi
	callq	_list_del
	movq	%rbx, %rdi
	callq	_to_edma_desc
	movq	%rax, %rbx
	movq	%rax, 32(%r15)
LBB0_3:
	movl	(%rbx), %esi
	subl	4(%rbx), %esi
	movq	_MAX_NR_SG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_min
                                        ## kill: def $eax killed $eax def $rax
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	$0, 24(%rbx)
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testl	%eax, %eax
	jle	LBB0_9
## %bb.4:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leal	-1(%rax), %ecx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movl	%eax, %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	24(%r15), %rax
	movq	%rbx, %rdi
	leaq	1(%r14), %rbx
	movl	(%rax,%r14,4), %esi
	movl	4(%rax,%r14,4), %edx
	callq	_edma_link
	movq	%rbx, %r14
	cmpq	-88(%rbp), %r14                 ## 8-byte Folded Reload
	je	LBB0_9
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movslq	4(%r12), %rax
	movslq	%r14d, %r13
	addq	%rax, %r13
	movq	24(%r15), %rax
	movl	(%rax,%r14,4), %esi
	movq	%r13, %rax
	shlq	$3, %rax
	leaq	(%rax,%rax,4), %r15
	movq	16(%r12), %rdx
	addq	%r15, %rdx
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_edma_write_slot
	movq	16(%r12), %rax
	movq	32(%rax,%r15), %rcx
	addq	%rcx, 24(%r12)
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %ecx
	movl	28(%rax,%r15), %r9d
	movl	24(%rax,%r15), %edx
	movq	%rdx, -120(%rbp)                ## 8-byte Spill
	movl	20(%rax,%r15), %edx
	movq	%rdx, -112(%rbp)                ## 8-byte Spill
	movl	16(%rax,%r15), %edx
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	movl	12(%rax,%r15), %r12d
	movl	8(%rax,%r15), %r10d
	movl	(%rax,%r15), %r11d
	movl	4(%rax,%r15), %eax
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	24(%r15), %rdx
	movl	(%rdx,%r14,4), %r8d
	subq	$8, %rsp
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	pushq	%r11
	pushq	%rax
	pushq	%r10
	pushq	%r12
	pushq	-104(%rbp)                      ## 8-byte Folded Reload
	pushq	-112(%rbp)                      ## 8-byte Folded Reload
	pushq	-120(%rbp)                      ## 8-byte Folded Reload
	callq	_dev_vdbg
	addq	$64, %rsp
	cmpq	-96(%rbp), %r14                 ## 8-byte Folded Reload
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%r14
	cmpq	-88(%rbp), %r14                 ## 8-byte Folded Reload
	jne	LBB0_5
LBB0_9:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	4(%rbx), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	addl	%ecx, %eax
	movl	%eax, 4(%rbx)
	cmpl	(%rbx), %eax
	jne	LBB0_14
## %bb.10:
	cmpq	$0, 8(%rbx)
	movq	24(%r15), %rax
	movslq	%ecx, %rcx
	movl	-4(%rax,%rcx,4), %esi
	je	LBB0_12
## %bb.11:
	addq	$4, %rax
	jmp	LBB0_13
LBB0_12:
	movq	16(%r15), %rax
LBB0_13:
	movl	(%rax), %edx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_edma_link
LBB0_14:
	cmpq	$0, 8(%r15)
	je	LBB0_17
## %bb.15:
	movl	(%r15), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	%r15, %rdi
	callq	_edma_clean_channel
	movq	%r15, %rdi
	callq	_edma_stop
	movq	%r15, %rdi
	callq	_edma_start
	movq	%r15, %rdi
	callq	_edma_trigger_channel
	movq	$0, 8(%r15)
LBB0_16:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movl	4(%rbx), %ecx
	movl	(%r15), %edx
	movq	_MAX_NR_SG@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jle	LBB0_19
## %bb.18:
	leaq	L_.str.3(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	%r15, %rdi
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_edma_resume                    ## TAILCALL
LBB0_19:
	leaq	L_.str.2(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	%r15, %rdi
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_edma_start                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_NR_SG,4,2                  ## @MAX_NR_SG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n pset[%d]:\n  chnum\t%d\n  slot\t%d\n  opt\t%08x\n  src\t%08x\n  dst\t%08x\n  abcnt\t%08x\n  ccnt\t%08x\n  bidx\t%08x\n  cidx\t%08x\n  lkrld\t%08x\n"

L_.str.1:                               ## @.str.1
	.asciz	"missed event on channel %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"first transfer starting on channel %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"chan: %d: completed %d elements, resuming\n"

	.no_dead_strip	_edma_execute
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function edma_execute
_edma_execute:                          ; @edma_execute
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x8, [x0, #40]!
	ldur	x21, [x0, #-24]
	ldr	x20, [x8]
	ldur	x22, [x0, #-8]
	cbnz	x22, LBB0_3
; %bb.1:
	bl	_vchan_next_desc
	cbz	x0, LBB0_15
; %bb.2:
	mov	x22, x0
	add	x0, x0, #4
	bl	_list_del
	mov	x0, x22
	bl	_to_edma_desc
	mov	x22, x0
	str	x0, [x19, #32]
LBB0_3:
	ldp	w8, w9, [x22]
	sub	w1, w8, w9
Lloh0:
	adrp	x8, _MAX_NR_SG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_NR_SG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_min
	str	xzr, [x22, #24]
	str	w0, [sp, #28]                   ; 4-byte Folded Spill
	subs	w27, w0, #1
	b.lt	LBB0_8
; %bb.4:
	mov	x28, #0
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	mov	w26, w8
	mov	w23, #40
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #24]
	ldr	w1, [x8, x28, lsl #2]
	add	x28, x28, #1
	ldr	w2, [x8, x28, lsl #2]
	mov	x0, x21
	bl	_edma_link
	cmp	x28, x26
	b.eq	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22, #4]
	add	w25, w8, w28
	ldr	x8, [x19, #24]
	lsl	x24, x28, #2
	ldr	w1, [x8, x24]
	ldr	x8, [x22, #16]
	smaddl	x2, w25, w23, x8
	mov	x0, x21
	bl	_edma_write_slot
	ldp	x8, x9, [x22, #16]
	smaddl	x8, w25, w23, x8
	ldr	x10, [x8, #32]
	add	x9, x9, x10
	str	x9, [x22, #24]
	ldr	w3, [x19]
	ldr	x9, [x19, #24]
	ldr	w4, [x9, x24]
	ldp	w6, w5, [x8, #24]
	ldp	w9, w7, [x8, #16]
	ldp	w11, w10, [x8, #8]
	ldp	w8, w12, [x8]
	stp	w12, w8, [sp, #12]
	stp	w10, w11, [sp, #4]
	str	w9, [sp]
	mov	x0, x20
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x25
	bl	_dev_vdbg
	cmp	x28, x27
	b.ne	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x28, x28, #1
	cmp	x28, x26
	b.ne	LBB0_6
LBB0_8:
	ldp	w9, w8, [x22]
	ldr	w10, [sp, #28]                  ; 4-byte Folded Reload
	add	w8, w8, w10
	cmp	w8, w9
	str	w8, [x22, #4]
	b.ne	LBB0_13
; %bb.9:
	ldr	x9, [x22, #8]
	ldr	x8, [x19, #24]
	ldr	w1, [x8, w27, sxtw #2]
	cbz	x9, LBB0_11
; %bb.10:
	add	x8, x8, #4
	b	LBB0_12
LBB0_11:
	ldr	x8, [x19, #16]
LBB0_12:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_edma_link
LBB0_13:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_16
; %bb.14:
	ldr	w2, [x19]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	mov	x0, x19
	bl	_edma_clean_channel
	mov	x0, x19
	bl	_edma_stop
	mov	x0, x19
	bl	_edma_start
	mov	x0, x19
	bl	_edma_trigger_channel
	str	xzr, [x19, #8]
LBB0_15:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_16:
	ldr	w8, [x22, #4]
Lloh7:
	adrp	x9, _MAX_NR_SG@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MAX_NR_SG@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	ldr	w2, [x19]
	cmp	w8, w9
	b.le	LBB0_18
; %bb.17:
	str	x8, [sp]
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_edma_resume
LBB0_18:
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_edma_start
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_NR_SG,4,2                  ; @MAX_NR_SG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n pset[%d]:\n  chnum\t%d\n  slot\t%d\n  opt\t%08x\n  src\t%08x\n  dst\t%08x\n  abcnt\t%08x\n  ccnt\t%08x\n  bidx\t%08x\n  cidx\t%08x\n  lkrld\t%08x\n"

l_.str.1:                               ; @.str.1
	.asciz	"missed event on channel %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"first transfer starting on channel %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"chan: %d: completed %d elements, resuming\n"

	.no_dead_strip	_edma_execute
.subsections_via_symbols
