	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdma_sendctrl
_sdma_sendctrl:                         ## @sdma_sendctrl
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	_SDMA_SENDCTRL_OP_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	andl	%esi, %r12d
	movl	%esi, %r13d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	_CTRL_SDMA_ENABLE_SMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SD
	movl	%eax, %ebx
	xorl	%r15d, %r15d
	testl	%r12d, %r12d
	cmovnel	%eax, %r12d
	cmovnel	%r15d, %ebx
	movq	_SDMA_SENDCTRL_OP_INTENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	andl	%r13d, %r14d
	movq	_CTRL_SDMA_INT_ENABLE_SMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SD
	movl	%eax, %r13d
	testl	%r14d, %r14d
	cmovnel	%eax, %r14d
	cmovnel	%r15d, %r13d
	orl	%r12d, %r14d
	orl	%ebx, %r13d
	movq	_SDMA_SENDCTRL_OP_HALT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	movq	_CTRL_SDMA_HALT_SMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SD
	testl	%ebx, %ebx
	cmovnel	%eax, %ebx
	cmovel	%eax, %r15d
	orl	%r14d, %ebx
	orl	%r13d, %r15d
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	leaq	4(%r12), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	orl	(%r12), %ebx
	notl	%r15d
	andl	%ebx, %r15d
	movl	%r15d, (%r12)
	movq	%r12, %r15
	movq	_SDMA_SENDCTRL_OP_CLEANUP@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	andl	(%rax), %ebx
	movq	_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SD
	movl	%eax, %r13d
	movl	(%r12), %r12d
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	movq	_CTRL_SDMA_CLEANUP_SMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SD
	orl	%eax, %r12d
LBB0_2:
	movq	%r15, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	callq	_write_sde_csr
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SDMA_SENDCTRL_OP_ENABLE,4,2    ## @SDMA_SENDCTRL_OP_ENABLE
	.comm	_CTRL_SDMA_ENABLE_SMASK,4,2     ## @CTRL_SDMA_ENABLE_SMASK
	.comm	_SDMA_SENDCTRL_OP_INTENABLE,4,2 ## @SDMA_SENDCTRL_OP_INTENABLE
	.comm	_CTRL_SDMA_INT_ENABLE_SMASK,4,2 ## @CTRL_SDMA_INT_ENABLE_SMASK
	.comm	_SDMA_SENDCTRL_OP_HALT,4,2      ## @SDMA_SENDCTRL_OP_HALT
	.comm	_CTRL_SDMA_HALT_SMASK,4,2       ## @CTRL_SDMA_HALT_SMASK
	.comm	_SDMA_SENDCTRL_OP_CLEANUP,4,2   ## @SDMA_SENDCTRL_OP_CLEANUP
	.comm	_CTRL,4,2                       ## @CTRL
	.comm	_CTRL_SDMA_CLEANUP_SMASK,4,2    ## @CTRL_SDMA_CLEANUP_SMASK
	.no_dead_strip	_sdma_sendctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdma_sendctrl
_sdma_sendctrl:                         ; @sdma_sendctrl
	.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
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _SDMA_SENDCTRL_OP_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDMA_SENDCTRL_OP_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
Lloh3:
	adrp	x8, _CTRL_SDMA_ENABLE_SMASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CTRL_SDMA_ENABLE_SMASK@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_SD
	tst	w20, w21
	csel	w20, wzr, w0, eq
	csel	w22, w0, wzr, eq
Lloh6:
	adrp	x8, _SDMA_SENDCTRL_OP_INTENABLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SDMA_SENDCTRL_OP_INTENABLE@GOTPAGEOFF]
Lloh8:
	ldr	w23, [x8]
Lloh9:
	adrp	x8, _CTRL_SDMA_INT_ENABLE_SMASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CTRL_SDMA_INT_ENABLE_SMASK@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_SD
	tst	w23, w21
	csel	w8, wzr, w0, eq
	orr	w20, w20, w8
	csel	w8, w0, wzr, eq
	orr	w22, w22, w8
Lloh12:
	adrp	x8, _SDMA_SENDCTRL_OP_HALT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SDMA_SENDCTRL_OP_HALT@GOTPAGEOFF]
Lloh14:
	ldr	w23, [x8]
Lloh15:
	adrp	x8, _CTRL_SDMA_HALT_SMASK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CTRL_SDMA_HALT_SMASK@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_SD
	tst	w23, w21
	csel	w8, wzr, w0, eq
	orr	w23, w20, w8
	csel	w8, w0, wzr, eq
	orr	w22, w22, w8
	add	x20, x19, #4
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	w8, [x19]
	orr	w8, w8, w23
	bic	w8, w8, w22
Lloh18:
	adrp	x9, _SDMA_SENDCTRL_OP_CLEANUP@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SDMA_SENDCTRL_OP_CLEANUP@GOTPAGEOFF]
	str	w8, [x19]
Lloh20:
	ldr	w8, [x9]
	and	w23, w8, w21
Lloh21:
	adrp	x8, _CTRL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CTRL@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	bl	_SD
	mov	x21, x0
	ldr	w22, [x19]
	cbz	w23, LBB0_2
; %bb.1:
Lloh24:
	adrp	x8, _CTRL_SDMA_CLEANUP_SMASK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _CTRL_SDMA_CLEANUP_SMASK@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	bl	_SD
	orr	w22, w0, w22
LBB0_2:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_write_sde_csr
	mov	x0, x20
	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
	b	_spin_unlock_irqrestore
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_SDMA_SENDCTRL_OP_ENABLE,4,2    ; @SDMA_SENDCTRL_OP_ENABLE
	.comm	_CTRL_SDMA_ENABLE_SMASK,4,2     ; @CTRL_SDMA_ENABLE_SMASK
	.comm	_SDMA_SENDCTRL_OP_INTENABLE,4,2 ; @SDMA_SENDCTRL_OP_INTENABLE
	.comm	_CTRL_SDMA_INT_ENABLE_SMASK,4,2 ; @CTRL_SDMA_INT_ENABLE_SMASK
	.comm	_SDMA_SENDCTRL_OP_HALT,4,2      ; @SDMA_SENDCTRL_OP_HALT
	.comm	_CTRL_SDMA_HALT_SMASK,4,2       ; @CTRL_SDMA_HALT_SMASK
	.comm	_SDMA_SENDCTRL_OP_CLEANUP,4,2   ; @SDMA_SENDCTRL_OP_CLEANUP
	.comm	_CTRL,4,2                       ; @CTRL
	.comm	_CTRL_SDMA_CLEANUP_SMASK,4,2    ; @CTRL_SDMA_CLEANUP_SMASK
	.no_dead_strip	_sdma_sendctrl
.subsections_via_symbols
