	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__sdma_txreq_ahgadd             ## -- Begin function _sdma_txreq_ahgadd
	.p2align	4, 0x90
__sdma_txreq_ahgadd:                    ## @_sdma_txreq_ahgadd
	.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
	movl	%r8d, %r15d
	movq	%rcx, %r14
	movl	%edx, %ebx
	movl	%esi, %r12d
	movq	%rdi, %r13
	cmpl	$10, %esi
	setge	%al
	testb	$3, %r15b
	setne	%cl
	cmpl	$4, %r8d
	sete	%dl
	orb	%al, %cl
	orb	%dl, %cl
	movzbl	%cl, %edi
	callq	_WARN_ON_ONCE
	xorl	%edx, %edx
	cmpl	$6, %r12d
	setl	%al
	cmpl	$1, %r12d
	jne	LBB0_1
## %bb.2:
	movq	_SDMA_AHG_APPLY_UPDATE1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	jmp	LBB0_3
LBB0_1:
	movb	%al, %dl
	orl	$128, %edx
LBB0_3:
	movl	8(%r13), %eax
	leal	1(%rax), %ecx
	movl	%ecx, 8(%r13)
	cmpl	$128, %edx
	je	LBB0_7
## %bb.4:
	cmpl	$129, %edx
	jne	LBB0_5
## %bb.6:
	movq	(%r13), %r8
	jmp	LBB0_8
LBB0_7:
	addl	$2, %eax
	movl	%eax, 8(%r13)
	movq	(%r13), %r8
	movq	16(%r8), %rcx
	movq	$0, (%rcx)
	movl	8(%r13), %ecx
LBB0_8:
	incl	%ecx
	movl	%ecx, 8(%r13)
	movq	8(%r8), %rcx
	movq	$0, (%rcx)
	jmp	LBB0_9
LBB0_5:
	movq	(%r13), %r8
LBB0_9:
	sarl	$2, %r15d
	movq	_SDMA_DESC1_HEADER_INDEX_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %ebx
	movq	_SDMA_DESC1_HEADER_INDEX_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %ebx
	movq	_SDMA_DESC1_HEADER_DWS_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %r15d
	movq	_SDMA_DESC1_HEADER_DWS_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r15d
	movq	_SDMA_DESC1_HEADER_MODE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %edx
	movq	_SDMA_DESC1_HEADER_MODE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	movq	_SDMA_DESC1_HEADER_UPDATE1_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	andl	(%r14), %esi
	movq	_SDMA_DESC1_HEADER_UPDATE1_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	orl	%ebx, %r15d
	orl	%r15d, %esi
	orl	%edx, %esi
	movq	(%r8), %rcx
	orl	%esi, 4(%rcx)
	cmpl	$2, %r12d
	jl	LBB0_12
## %bb.10:
	decl	%r12d
	xorl	%edx, %edx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	testl	%ecx, %ecx
	sete	%bl
	movl	%edx, %edi
	andl	$2, %edi
	testq	%rdi, %rdi
	sete	%al
	andb	%bl, %al
	movzbl	%al, %eax
	addl	%eax, %esi
	movl	4(%r14,%rdx,4), %eax
	shll	%cl, %eax
	movq	(%r8,%rsi,8), %rbx
	orl	%eax, (%rbx,%rdi,2)
	incq	%rdx
	addl	$32, %ecx
	andl	$63, %ecx
	cmpq	%rdx, %r12
	jne	LBB0_11
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDMA_AHG_APPLY_UPDATE1,4,2     ## @SDMA_AHG_APPLY_UPDATE1
	.comm	_SDMA_DESC1_HEADER_INDEX_MASK,4,2 ## @SDMA_DESC1_HEADER_INDEX_MASK
	.comm	_SDMA_DESC1_HEADER_INDEX_SHIFT,4,2 ## @SDMA_DESC1_HEADER_INDEX_SHIFT
	.comm	_SDMA_DESC1_HEADER_DWS_MASK,4,2 ## @SDMA_DESC1_HEADER_DWS_MASK
	.comm	_SDMA_DESC1_HEADER_DWS_SHIFT,4,2 ## @SDMA_DESC1_HEADER_DWS_SHIFT
	.comm	_SDMA_DESC1_HEADER_MODE_MASK,4,2 ## @SDMA_DESC1_HEADER_MODE_MASK
	.comm	_SDMA_DESC1_HEADER_MODE_SHIFT,4,2 ## @SDMA_DESC1_HEADER_MODE_SHIFT
	.comm	_SDMA_DESC1_HEADER_UPDATE1_MASK,4,2 ## @SDMA_DESC1_HEADER_UPDATE1_MASK
	.comm	_SDMA_DESC1_HEADER_UPDATE1_SHIFT,4,2 ## @SDMA_DESC1_HEADER_UPDATE1_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__sdma_txreq_ahgadd             ; -- Begin function _sdma_txreq_ahgadd
	.p2align	2
__sdma_txreq_ahgadd:                    ; @_sdma_txreq_ahgadd
	.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, x4
	mov	x19, x3
	mov	x22, x2
	mov	x20, x1
	mov	x23, x0
	tst	w4, #0x3
	ccmp	w1, #9, #0, eq
	ccmp	w4, #4, #4, le
	cset	w0, eq
	bl	_WARN_ON_ONCE
Lloh0:
	adrp	x8, _SDMA_AHG_APPLY_UPDATE1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDMA_AHG_APPLY_UPDATE1@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	cmp	w20, #6
	mov	w8, #128
	cinc	w10, w8, lt
	subs	w8, w20, #1
	csel	w10, w9, w10, eq
	ldr	w9, [x23, #8]
	add	w11, w9, #1
	str	w11, [x23, #8]
	cmp	w10, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w10, #129
	b.ne	LBB0_5
; %bb.2:
	ldr	x9, [x23]
	b	LBB0_4
LBB0_3:
	add	w9, w9, #2
	str	w9, [x23, #8]
	ldr	x9, [x23]
	ldr	x11, [x9, #16]
	str	xzr, [x11]
	ldr	w11, [x23, #8]
LBB0_4:
	add	w11, w11, #1
	str	w11, [x23, #8]
	ldr	x11, [x9, #8]
	str	xzr, [x11]
	b	LBB0_6
LBB0_5:
	ldr	x9, [x23]
LBB0_6:
Lloh3:
	adrp	x11, _SDMA_DESC1_HEADER_INDEX_MASK@GOTPAGE
Lloh4:
	ldr	x11, [x11, _SDMA_DESC1_HEADER_INDEX_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
Lloh6:
	adrp	x12, _SDMA_DESC1_HEADER_INDEX_SHIFT@GOTPAGE
Lloh7:
	ldr	x12, [x12, _SDMA_DESC1_HEADER_INDEX_SHIFT@GOTPAGEOFF]
	and	w11, w11, w22
Lloh8:
	ldr	w12, [x12]
	lsl	w11, w11, w12
Lloh9:
	adrp	x12, _SDMA_DESC1_HEADER_DWS_MASK@GOTPAGE
Lloh10:
	ldr	x12, [x12, _SDMA_DESC1_HEADER_DWS_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w12, [x12]
	and	w12, w12, w21, asr #2
Lloh12:
	adrp	x13, _SDMA_DESC1_HEADER_DWS_SHIFT@GOTPAGE
Lloh13:
	ldr	x13, [x13, _SDMA_DESC1_HEADER_DWS_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w13, [x13]
	lsl	w12, w12, w13
	orr	w11, w12, w11
Lloh15:
	adrp	x12, _SDMA_DESC1_HEADER_MODE_MASK@GOTPAGE
Lloh16:
	ldr	x12, [x12, _SDMA_DESC1_HEADER_MODE_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w12, [x12]
	and	w10, w12, w10
Lloh18:
	adrp	x12, _SDMA_DESC1_HEADER_MODE_SHIFT@GOTPAGE
Lloh19:
	ldr	x12, [x12, _SDMA_DESC1_HEADER_MODE_SHIFT@GOTPAGEOFF]
Lloh20:
	ldr	w12, [x12]
	lsl	w10, w10, w12
	orr	w10, w11, w10
	ldr	w11, [x19]
Lloh21:
	adrp	x12, _SDMA_DESC1_HEADER_UPDATE1_MASK@GOTPAGE
Lloh22:
	ldr	x12, [x12, _SDMA_DESC1_HEADER_UPDATE1_MASK@GOTPAGEOFF]
Lloh23:
	ldr	w12, [x12]
	and	w11, w12, w11
Lloh24:
	adrp	x12, _SDMA_DESC1_HEADER_UPDATE1_SHIFT@GOTPAGE
Lloh25:
	ldr	x12, [x12, _SDMA_DESC1_HEADER_UPDATE1_SHIFT@GOTPAGEOFF]
Lloh26:
	ldr	w12, [x12]
	lsl	w11, w11, w12
	orr	w10, w10, w11
	ldr	x11, [x9]
	ldr	w12, [x11, #4]
	orr	w10, w10, w12
	str	w10, [x11, #4]
	cmp	w20, #2
	b.lt	LBB0_9
; %bb.7:
	mov	x13, #0
	mov	w10, #0
	mov	w12, #0
	add	x11, x19, #4
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	tst	x13, #0x2
	ccmp	w12, #0, #0, eq
	cinc	w10, w10, eq
	ldr	w14, [x11, x13, lsl #2]
	ubfx	x15, x13, #1, #1
	add	x16, x13, #1
	lsl	w13, w14, w12
	ldr	x14, [x9, w10, uxtw #3]
	lsl	x15, x15, #2
	ldr	w17, [x14, x15]
	orr	w13, w17, w13
	str	w13, [x14, x15]
	add	w12, w12, #32
	and	w12, w12, #0x3f
	mov	x13, x16
	cmp	x8, x16
	b.ne	LBB0_8
LBB0_9:
	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	Lloh24, Lloh25, Lloh26
	.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
	.cfi_endproc
                                        ; -- End function
	.comm	_SDMA_AHG_APPLY_UPDATE1,4,2     ; @SDMA_AHG_APPLY_UPDATE1
	.comm	_SDMA_DESC1_HEADER_INDEX_MASK,4,2 ; @SDMA_DESC1_HEADER_INDEX_MASK
	.comm	_SDMA_DESC1_HEADER_INDEX_SHIFT,4,2 ; @SDMA_DESC1_HEADER_INDEX_SHIFT
	.comm	_SDMA_DESC1_HEADER_DWS_MASK,4,2 ; @SDMA_DESC1_HEADER_DWS_MASK
	.comm	_SDMA_DESC1_HEADER_DWS_SHIFT,4,2 ; @SDMA_DESC1_HEADER_DWS_SHIFT
	.comm	_SDMA_DESC1_HEADER_MODE_MASK,4,2 ; @SDMA_DESC1_HEADER_MODE_MASK
	.comm	_SDMA_DESC1_HEADER_MODE_SHIFT,4,2 ; @SDMA_DESC1_HEADER_MODE_SHIFT
	.comm	_SDMA_DESC1_HEADER_UPDATE1_MASK,4,2 ; @SDMA_DESC1_HEADER_UPDATE1_MASK
	.comm	_SDMA_DESC1_HEADER_UPDATE1_SHIFT,4,2 ; @SDMA_DESC1_HEADER_UPDATE1_SHIFT
.subsections_via_symbols
