	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wil_ring_init_tx_edma
_wil_ring_init_tx_edma:                 ## @wil_ring_init_tx_edma
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, -64(%rbp)                 ## 4-byte Spill
	movl	%esi, %ebx
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	callq	_vif_to_wil
	movq	%rax, %r13
	movq	24(%rax), %rax
	movq	32(%r13), %r12
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	movslq	%ebx, %r14
	leaq	(%r12,%r14,4), %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%r14, %r15
	shlq	$4, %r15
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%r15), %rbx
	leaq	16(%r13), %rdi
	callq	_lockdep_assert_held
	movl	12(%r13), %r9d
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	movl	%r14d, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	callq	_wil_dbg_misc
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_wil_tx_data_init
	movl	-64(%rbp), %eax                 ## 4-byte Reload
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movl	%eax, (%r12,%r14,4)
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_wil_ring_alloc_desc_ring
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.1:
	movl	-60(%rbp), %r12d                ## 4-byte Reload
	movq	(%r13), %rax
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rax
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%edx, (%rax)
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, 4(%rax)
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	cmpl	$0, (%rdi)
	jne	LBB0_3
## %bb.2:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
LBB0_3:
	movl	%r12d, %esi
	callq	_wil_wmi_tx_desc_ring_add
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	callq	_wil_err
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	leaq	(%r12,%r15), %r14
	addq	$4, %r14
	movq	%r14, %rdi
	callq	_spin_lock_bh
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
	movq	$0, 8(%r12,%r15)
	movq	%r14, %rdi
	callq	_spin_unlock_bh
	movq	%r13, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_wil_ring_free_edma
	movl	8(%r13), %eax
	movq	(%r13), %rcx
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rcx,%rdx,8), %rcx
	movl	%eax, (%rcx)
	movl	$0, 4(%rcx)
	jmp	LBB0_8
LBB0_5:
	xorl	%ebx, %ebx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, (%rax)
	je	LBB0_8
## %bb.6:
	movq	_agg_wsize@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	testq	%rdx, %rdx
	js	LBB0_8
## %bb.7:
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_wil_addba_tx_request
LBB0_8:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"init TX ring: ring_id=%u, cid=%u, tid=%u, sring_id=%u\n"

L_.str.1:                               ## @.str.1
	.asciz	"WMI_TX_DESC_RING_ADD_CMD failed\n"

	.comm	_agg_wsize,8,3                  ## @agg_wsize
	.no_dead_strip	_wil_ring_init_tx_edma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wil_ring_init_tx_edma
_wil_ring_init_tx_edma:                 ; @wil_ring_init_tx_edma
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x4
	mov	x24, x3
	mov	x25, x2
	mov	x21, x1
	mov	x26, x0
	bl	_vif_to_wil
	mov	x19, x0
	ldp	x27, x8, [x0, #24]
	add	x20, x8, w21, sxtw #2
	add	x22, x27, w21, sxtw #4
	add	x0, x0, #16
	bl	_lockdep_assert_held
	ldr	w5, [x19, #12]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	mov	x3, x24
	mov	x4, x23
	bl	_wil_dbg_misc
	mov	x0, x22
	bl	_wil_tx_data_init
	str	w25, [x20]
	mov	x0, x19
	mov	x1, x20
	bl	_wil_ring_alloc_desc_ring
	mov	x25, x0
	cbnz	w0, LBB0_8
; %bb.1:
	sxtw	x28, w21
	ldr	x8, [x19]
	ldr	x8, [x8, x28, lsl #3]
	stp	w24, w23, [x8]
	ldr	w8, [x26]
	cbnz	w8, LBB0_3
; %bb.2:
	mov	w8, #1
	str	w8, [x22]
LBB0_3:
	mov	x0, x26
	mov	x1, x21
	mov	x2, x24
	mov	x3, x23
	bl	_wil_wmi_tx_desc_ring_add
	mov	x25, x0
	cbz	w0, LBB0_5
; %bb.4:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_wil_err
	add	x23, x27, x28, lsl #4
	add	x21, x23, #4
	mov	x0, x21
	bl	_spin_lock_bh
	str	wzr, [x22]
	str	xzr, [x23, #8]
	mov	x0, x21
	bl	_spin_unlock_bh
	mov	x0, x19
	mov	x1, x20
	bl	_wil_ring_free_edma
	ldr	w8, [x19, #8]
	ldr	x9, [x19]
	ldr	x9, [x9, x28, lsl #3]
	stp	w8, wzr, [x9]
	b	LBB0_8
LBB0_5:
	ldr	w8, [x22]
	cbz	w8, LBB0_8
; %bb.6:
Lloh4:
	adrp	x8, _agg_wsize@GOTPAGE
Lloh5:
	ldr	x8, [x8, _agg_wsize@GOTPAGEOFF]
Lloh6:
	ldr	x2, [x8]
	tbnz	x2, #63, LBB0_8
; %bb.7:
	mov	x0, x19
	mov	x1, x21
	bl	_wil_addba_tx_request
	mov	w25, #0
LBB0_8:
	mov	x0, x25
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"init TX ring: ring_id=%u, cid=%u, tid=%u, sring_id=%u\n"

l_.str.1:                               ; @.str.1
	.asciz	"WMI_TX_DESC_RING_ADD_CMD failed\n"

	.comm	_agg_wsize,8,3                  ; @agg_wsize
	.no_dead_strip	_wil_ring_init_tx_edma
.subsections_via_symbols
