	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdma_set_desc_cnt
_sdma_set_desc_cnt:                     ## @sdma_set_desc_cnt
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rax
	movq	_HFI1_HAS_SDMA_TIMEOUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_1
## %bb.2:
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_DESC_CNT_CNT_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SD
	andl	%eax, %ebx
	movq	_DESC_CNT_CNT_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SD
	movl	%eax, %ecx
	shll	%cl, %ebx
	movq	_DESC_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_SD
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	%ebx, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_write_sde_csr                  ## TAILCALL
LBB0_1:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HFI1_HAS_SDMA_TIMEOUT,4,2      ## @HFI1_HAS_SDMA_TIMEOUT
	.comm	_DESC_CNT_CNT_MASK,4,2          ## @DESC_CNT_CNT_MASK
	.comm	_DESC_CNT_CNT_SHIFT,4,2         ## @DESC_CNT_CNT_SHIFT
	.comm	_DESC_CNT,4,2                   ## @DESC_CNT
	.no_dead_strip	_sdma_set_desc_cnt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdma_set_desc_cnt
_sdma_set_desc_cnt:                     ; @sdma_set_desc_cnt
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _HFI1_HAS_SDMA_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HFI1_HAS_SDMA_TIMEOUT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	x20, x1
	mov	x19, x0
Lloh3:
	adrp	x8, _DESC_CNT_CNT_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DESC_CNT_CNT_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_SD
	and	w20, w0, w20
Lloh6:
	adrp	x8, _DESC_CNT_CNT_SHIFT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DESC_CNT_CNT_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_SD
	lsl	w20, w20, w0
Lloh9:
	adrp	x8, _DESC_CNT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DESC_CNT@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_SD
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_write_sde_csr
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_HFI1_HAS_SDMA_TIMEOUT,4,2      ; @HFI1_HAS_SDMA_TIMEOUT
	.comm	_DESC_CNT_CNT_MASK,4,2          ; @DESC_CNT_CNT_MASK
	.comm	_DESC_CNT_CNT_SHIFT,4,2         ; @DESC_CNT_CNT_SHIFT
	.comm	_DESC_CNT,4,2                   ; @DESC_CNT
	.no_dead_strip	_sdma_set_desc_cnt
.subsections_via_symbols
