	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function user_sdma_txadd_ahg
_user_sdma_txadd_ahg:                   ## @user_sdma_txadd_ahg
	.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	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r13
	leaq	8(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	callq	_le16_to_cpu
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_pad_len
	movq	8(%r13), %rdi
	movl	%eax, %esi
	callq	_get_lrh_len
	movq	%rax, %r14
	movq	16(%r13), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	addq	$8, %r12
	movq	%r12, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	$8, %edx
	callq	_memcpy
	movl	%ebx, %edi
	callq	_PBC2LRH
	cmpq	%r14, %rax
	je	LBB0_2
## %bb.1:
	andl	$61440, %ebx                    ## imm = 0xF000
	movq	%r14, %rdi
	callq	_LRH2PBC
	orl	%eax, %ebx
	movl	%ebx, %edi
	callq	_cpu_to_le16
	movq	(%r12), %rcx
	movl	%eax, (%rcx)
LBB0_2:
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	movq	%r15, %rcx
	callq	_check_header_template
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movq	_SDMA_TXREQ_F_AHG_COPY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	$8, %r15d
	movl	(%r13), %ecx
	movq	_user_sdma_txreq_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %edx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%rax
	pushq	$0
	callq	_sdma_txinit_ahg
	addq	$16, %rsp
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r12, %rdx
	movl	$8, %ecx
	callq	_sdma_txadd_kvaddr
	movl	%eax, %ebx
	movl	$0, %eax
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.5:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_sdma_txclean
	movl	%ebx, %eax
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDMA_TXREQ_F_AHG_COPY,4,2      ## @SDMA_TXREQ_F_AHG_COPY
	.comm	_user_sdma_txreq_cb,4,2         ## @user_sdma_txreq_cb
	.no_dead_strip	_user_sdma_txadd_ahg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function user_sdma_txadd_ahg
_user_sdma_txadd_ahg:                   ; @user_sdma_txadd_ahg
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x22, x0
	mov	x25, x0
	ldr	x8, [x25, #8]!
	ldr	w0, [x8]
	bl	_le16_to_cpu
	mov	x24, x0
	mov	x0, x21
	bl	_pad_len
	mov	x1, x0
	ldr	x0, [x25]
	bl	_get_lrh_len
	mov	x23, x0
	ldr	x26, [x25, #8]
	add	x20, x19, #8
	mov	x0, x20
	mov	x1, x25
	mov	w2, #8
	bl	_memcpy
	mov	x0, x24
	bl	_PBC2LRH
	cmp	x0, x23
	b.eq	LBB0_2
; %bb.1:
	and	w24, w24, #0xf000
	mov	x0, x23
	bl	_LRH2PBC
	orr	w0, w0, w24
	bl	_cpu_to_le16
	ldr	x8, [x20]
	str	w0, [x8]
LBB0_2:
	mov	x0, x22
	mov	x1, x20
	mov	x2, x23
	mov	x3, x21
	bl	_check_header_template
	mov	x23, x0
	cbnz	w0, LBB0_6
; %bb.3:
Lloh0:
	adrp	x8, _SDMA_TXREQ_F_AHG_COPY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDMA_TXREQ_F_AHG_COPY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	w2, w21, #8
	ldr	w3, [x22]
Lloh3:
	adrp	x8, _user_sdma_txreq_cb@GOTPAGE
Lloh4:
	ldr	x8, [x8, _user_sdma_txreq_cb@GOTPAGEOFF]
Lloh5:
	ldr	w7, [x8]
	mov	x0, x19
	mov	w4, #0
	mov	x5, #0
	mov	w6, #0
	bl	_sdma_txinit_ahg
	mov	x23, x0
	cbnz	w0, LBB0_6
; %bb.4:
	ldr	w0, [x26]
	mov	x1, x19
	mov	x2, x20
	mov	w3, #8
	bl	_sdma_txadd_kvaddr
	mov	x23, x0
	cbz	w0, LBB0_6
; %bb.5:
	ldr	w0, [x26]
	mov	x1, x19
	bl	_sdma_txclean
LBB0_6:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SDMA_TXREQ_F_AHG_COPY,4,2      ; @SDMA_TXREQ_F_AHG_COPY
	.comm	_user_sdma_txreq_cb,4,2         ; @user_sdma_txreq_cb
	.no_dead_strip	_user_sdma_txadd_ahg
.subsections_via_symbols
