	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il3945_hw_txq_attach_buf_to_tfd ## -- Begin function il3945_hw_txq_attach_buf_to_tfd
	.p2align	4, 0x90
_il3945_hw_txq_attach_buf_to_tfd:       ## @il3945_hw_txq_attach_buf_to_tfd
	.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	%r9, -56(%rbp)                  ## 8-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r12d
	movq	(%rsi), %r14
	movq	8(%rsi), %r15
	shlq	$4, %r15
	leaq	(%r14,%r15), %r13
	testq	%r8, %r8
	je	LBB0_2
## %bb.1:
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
LBB0_2:
	movq	(%r13), %rdi
	callq	_le32_to_cpu
	movl	%eax, %edi
	callq	_TFD_CTL_COUNT_GET
	movl	%eax, %ebx
	movq	_NUM_TFD_CHUNKS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	testl	%ebx, %ebx
	js	LBB0_4
## %bb.3:
	cmpl	%esi, %ebx
	jge	LBB0_4
## %bb.5:
	movl	%r12d, %edi
	callq	_cpu_to_le32
	movq	8(%r14,%r15), %rcx
	movl	%ebx, %r12d
	shlq	$4, %r12
	movq	%rax, 8(%rcx,%r12)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_le32
	movq	8(%r14,%r15), %rcx
	movq	%rax, (%rcx,%r12)
	incl	%ebx
	movl	%ebx, %edi
	callq	_TFD_CTL_COUNT_SET
	movl	%eax, %ebx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_TFD_CTL_PAD_SET
	orl	%eax, %ebx
	movl	%ebx, %edi
	callq	_cpu_to_le32
	movq	%rax, (%r13)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_IL_ERR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_TFD_CHUNKS,4,2             ## @NUM_TFD_CHUNKS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error can not send more than %d chunks\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_il3945_hw_txq_attach_buf_to_tfd ; -- Begin function il3945_hw_txq_attach_buf_to_tfd
	.p2align	2
_il3945_hw_txq_attach_buf_to_tfd:       ; @il3945_hw_txq_attach_buf_to_tfd
	.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	x20, x5
	mov	x21, x3
	mov	x22, x2
	ldp	x24, x25, [x1]
	add	x19, x24, x25, lsl #4
	cbz	x4, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #16
	bl	_memset
LBB0_2:
	ldr	x0, [x19]
	bl	_le32_to_cpu
	bl	_TFD_CTL_COUNT_GET
Lloh0:
	adrp	x8, _NUM_TFD_CHUNKS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NUM_TFD_CHUNKS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	tbnz	w0, #31, LBB0_5
; %bb.3:
	mov	x23, x0
	cmp	w0, w1
	b.ge	LBB0_5
; %bb.4:
	mov	x0, x22
	bl	_cpu_to_le32
	add	x22, x24, x25, lsl #4
	ldr	x8, [x22, #8]
	mov	w9, w23
	lsl	x24, x9, #4
	add	x8, x8, x24
	str	x0, [x8, #8]
	mov	x0, x21
	bl	_cpu_to_le32
	ldr	x8, [x22, #8]
	str	x0, [x8, x24]
	add	w0, w23, #1
	bl	_TFD_CTL_COUNT_SET
	mov	x21, x0
	mov	x0, x20
	bl	_TFD_CTL_PAD_SET
	orr	w0, w0, w21
	bl	_cpu_to_le32
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19]
	b	LBB0_6
LBB0_5:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IL_ERR
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_TFD_CHUNKS,4,2             ; @NUM_TFD_CHUNKS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error can not send more than %d chunks\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
