	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdma_load_context
_sdma_load_context:                     ## @sdma_load_context
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%r15d, %r15d
	cmpl	$0, 4(%rdi)
	jne	LBB0_10
## %bb.1:
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	_DMA_DEV_TO_MEM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	leaq	16(%rbx), %rax
	jmp	LBB0_8
LBB0_3:
	movq	_DMA_DEV_TO_DEV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	leaq	20(%rbx), %rax
	jmp	LBB0_8
LBB0_5:
	movq	_DMA_MEM_TO_MEM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	leaq	24(%rbx), %rax
	jmp	LBB0_8
LBB0_7:
	leaq	28(%rbx), %rax
LBB0_8:
	movl	(%rax), %r15d
	testl	%r15d, %r15d
	js	LBB0_10
## %bb.9:
	movq	56(%rbx), %r14
	movl	(%rbx), %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	16(%r14), %r13
	movq	24(%r14), %r12
	movl	8(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_dbg
	movl	8(%r14), %edi
	movl	32(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_dbg
	movl	8(%r14), %edi
	movl	36(%rbx), %edx
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_dbg
	movl	8(%r14), %edi
	movl	40(%rbx), %edx
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_dbg
	movl	8(%r14), %edi
	movq	48(%rbx), %rax
	movl	(%rax), %edx
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_dbg
	movl	8(%r14), %edi
	movq	48(%rbx), %rax
	movl	4(%rax), %edx
	leaq	L_.str.5(%rip), %rsi
	callq	_dev_dbg
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	%r15d, 8(%r12)
	movq	48(%rbx), %rax
	movl	4(%rax), %ecx
	movq	(%r12), %rdx
	movl	%ecx, (%rdx)
	movl	(%rax), %eax
	movl	%eax, 4(%rdx)
	movl	40(%rbx), %eax
	movl	%eax, 8(%rdx)
	movl	36(%rbx), %eax
	movl	%eax, 24(%rdx)
	movl	32(%rbx), %eax
	movl	%eax, 28(%rdx)
	movq	_C0_SETDM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r13)
	movq	_BD_DONE@GOTPCREL(%rip), %rax
	movq	_BD_WRAP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_BD_EXTD@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 8(%r13)
	movl	$4, 12(%r13)
	movl	4(%r14), %eax
	movl	%eax, 4(%r13)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leal	2048(,%rax,4), %eax
	movl	%eax, (%r13)
	movq	%r14, %rdi
	callq	_sdma_run_channel0
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	$1, 4(%rbx)
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_DEV_TO_MEM,8,3             ## @DMA_DEV_TO_MEM
	.comm	_DMA_DEV_TO_DEV,8,3             ## @DMA_DEV_TO_DEV
	.comm	_DMA_MEM_TO_MEM,8,3             ## @DMA_MEM_TO_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"load_address = %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"wml = 0x%08x\n"

L_.str.2:                               ## @.str.2
	.asciz	"shp_addr = 0x%08x\n"

L_.str.3:                               ## @.str.3
	.asciz	"per_addr = 0x%08x\n"

L_.str.4:                               ## @.str.4
	.asciz	"event_mask0 = 0x%08x\n"

L_.str.5:                               ## @.str.5
	.asciz	"event_mask1 = 0x%08x\n"

	.comm	_C0_SETDM,4,2                   ## @C0_SETDM
	.comm	_BD_DONE,4,2                    ## @BD_DONE
	.comm	_BD_WRAP,4,2                    ## @BD_WRAP
	.comm	_BD_EXTD,4,2                    ## @BD_EXTD
	.no_dead_strip	_sdma_load_context
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdma_load_context
_sdma_load_context:                     ; @sdma_load_context
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	w8, [x0, #4]
	cbz	w8, LBB0_2
; %bb.1:
	mov	w21, #0
	b	LBB0_11
LBB0_2:
	mov	x19, x0
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _DMA_DEV_TO_MEM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DMA_DEV_TO_MEM@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	add	x8, x19, #16
	b	LBB0_9
LBB0_4:
Lloh3:
	adrp	x9, _DMA_DEV_TO_DEV@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DMA_DEV_TO_DEV@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	add	x8, x19, #20
	b	LBB0_9
LBB0_6:
Lloh6:
	adrp	x9, _DMA_MEM_TO_MEM@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DMA_MEM_TO_MEM@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	add	x8, x19, #24
	b	LBB0_9
LBB0_8:
	add	x8, x19, #28
LBB0_9:
	ldr	w21, [x8]
	tbnz	w21, #31, LBB0_11
; %bb.10:
	ldr	x20, [x19, #56]
	ldp	x23, x22, [x20, #16]
	ldr	w24, [x19]
	ldr	w0, [x20, #8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_dbg
	ldr	w0, [x20, #8]
	ldr	w2, [x19, #32]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	ldr	w0, [x20, #8]
	ldr	w2, [x19, #36]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
	ldr	w0, [x20, #8]
	ldr	w2, [x19, #40]
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_dbg
	ldr	w0, [x20, #8]
	ldr	x8, [x19, #48]
	ldr	w2, [x8]
Lloh17:
	adrp	x1, l_.str.4@PAGE
Lloh18:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_dbg
	ldr	w0, [x20, #8]
	ldr	x8, [x19, #48]
	ldr	w2, [x8, #4]
Lloh19:
	adrp	x1, l_.str.5@PAGE
Lloh20:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_dbg
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	x0, x22
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	str	w21, [x22, #8]
	ldr	x8, [x19, #48]
	ldr	w9, [x8, #4]
	ldr	x10, [x22]
	str	w9, [x10]
	ldr	w8, [x8]
	str	w8, [x10, #4]
	ldr	w8, [x19, #40]
	str	w8, [x10, #8]
	ldr	w8, [x19, #36]
	str	w8, [x10, #24]
	ldr	w8, [x19, #32]
	str	w8, [x10, #28]
Lloh21:
	adrp	x8, _C0_SETDM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _C0_SETDM@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _BD_DONE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _BD_DONE@GOTPAGEOFF]
	str	w8, [x23, #16]
Lloh26:
	ldr	w8, [x9]
Lloh27:
	adrp	x9, _BD_WRAP@GOTPAGE
Lloh28:
	ldr	x9, [x9, _BD_WRAP@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh30:
	adrp	x9, _BD_EXTD@GOTPAGE
Lloh31:
	ldr	x9, [x9, _BD_EXTD@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	orr	w8, w8, w9
	mov	w9, #4
	stp	w8, w9, [x23, #8]
	ldr	w8, [x20, #4]
	lsl	w9, w24, #2
	add	w9, w9, #2048
	stp	w9, w8, [x23]
	mov	x0, x20
	bl	_sdma_run_channel0
	mov	x21, x0
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	w8, #1
	str	w8, [x19, #4]
LBB0_11:
	mov	x0, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_DEV_TO_MEM,8,3             ; @DMA_DEV_TO_MEM
	.comm	_DMA_DEV_TO_DEV,8,3             ; @DMA_DEV_TO_DEV
	.comm	_DMA_MEM_TO_MEM,8,3             ; @DMA_MEM_TO_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"load_address = %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"wml = 0x%08x\n"

l_.str.2:                               ; @.str.2
	.asciz	"shp_addr = 0x%08x\n"

l_.str.3:                               ; @.str.3
	.asciz	"per_addr = 0x%08x\n"

l_.str.4:                               ; @.str.4
	.asciz	"event_mask0 = 0x%08x\n"

l_.str.5:                               ; @.str.5
	.asciz	"event_mask1 = 0x%08x\n"

	.comm	_C0_SETDM,4,2                   ; @C0_SETDM
	.comm	_BD_DONE,4,2                    ; @BD_DONE
	.comm	_BD_WRAP,4,2                    ; @BD_WRAP
	.comm	_BD_EXTD,4,2                    ; @BD_EXTD
	.no_dead_strip	_sdma_load_context
.subsections_via_symbols
