	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wil_tx_init_edma
_wil_tx_init_edma:                      ## @wil_tx_init_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_wil_find_free_sring
	movl	%eax, %r14d
	movl	(%r12), %ecx
	movq	_WIL_SRING_SIZE_ORDER_MIN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jl	LBB0_2
## %bb.1:
	movq	_WIL_SRING_SIZE_ORDER_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jle	LBB0_3
LBB0_2:
	movq	_WIL_TX_SRING_SIZE_ORDER_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, (%r12)
LBB0_3:
	movl	$1, %ebx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	callq	_wil_dbg_misc
	testl	%r14d, %r14d
	js	LBB0_4
## %bb.5:
	movq	8(%r12), %r13
	movl	%r14d, %r15d
	shlq	$4, %r15
	leaq	(%r15,%r13), %rsi
	movl	$0, (%r13,%r15)
	movl	%ebx, 4(%r13,%r15)
	movl	$4, 8(%r13,%r15)
	movq	%r12, %rdi
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	callq	_wil_sring_alloc
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_wil_wmi_tx_sring_cfg
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movl	%eax, %ebx
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_wil_sring_free
	jmp	LBB0_9
LBB0_4:
	movl	%r14d, %ebx
	jmp	LBB0_9
LBB0_7:
	movl	$1, 12(%r13,%r15)
	movl	%r14d, 4(%r12)
	xorl	%ebx, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WIL_SRING_SIZE_ORDER_MIN,4,2   ## @WIL_SRING_SIZE_ORDER_MIN
	.comm	_WIL_SRING_SIZE_ORDER_MAX,4,2   ## @WIL_SRING_SIZE_ORDER_MAX
	.comm	_WIL_TX_SRING_SIZE_ORDER_DEFAULT,4,2 ## @WIL_TX_SRING_SIZE_ORDER_DEFAULT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"init TX sring: size=%u, ring_id=%u\n"

	.no_dead_strip	_wil_tx_init_edma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wil_tx_init_edma
_wil_tx_init_edma:                      ; @wil_tx_init_edma
	.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	x19, x0
	bl	_wil_find_free_sring
	mov	x20, x0
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _WIL_SRING_SIZE_ORDER_MIN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WIL_SRING_SIZE_ORDER_MIN@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _WIL_SRING_SIZE_ORDER_MAX@GOTPAGE
Lloh4:
	ldr	x10, [x10, _WIL_SRING_SIZE_ORDER_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #0, ge
	b.le	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _WIL_TX_SRING_SIZE_ORDER_DEFAULT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WIL_TX_SRING_SIZE_ORDER_DEFAULT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_2:
	mov	w9, #1
	lsl	w21, w9, w8
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	mov	x3, x20
	bl	_wil_dbg_misc
	tbnz	w20, #31, LBB0_6
; %bb.3:
	ldr	x23, [x19, #8]
	add	x22, x23, w20, uxtw #4
	stp	wzr, w21, [x22]
	mov	w8, #4
	str	w8, [x22, #8]
	mov	x0, x19
	mov	x1, x22
	bl	_wil_sring_alloc
	mov	x21, x0
	cbnz	w0, LBB0_8
; %bb.4:
	mov	x0, x19
	mov	x1, x20
	bl	_wil_wmi_tx_sring_cfg
	mov	x21, x0
	cbz	w0, LBB0_7
; %bb.5:
	mov	x0, x19
	mov	x1, x22
	bl	_wil_sring_free
	b	LBB0_8
LBB0_6:
	mov	x21, x20
	b	LBB0_8
LBB0_7:
	mov	w8, w20
	add	x8, x23, x8, lsl #4
	mov	w9, #1
	str	w9, [x8, #12]
	str	w20, [x19, #4]
LBB0_8:
	mov	x0, x21
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_WIL_SRING_SIZE_ORDER_MIN,4,2   ; @WIL_SRING_SIZE_ORDER_MIN
	.comm	_WIL_SRING_SIZE_ORDER_MAX,4,2   ; @WIL_SRING_SIZE_ORDER_MAX
	.comm	_WIL_TX_SRING_SIZE_ORDER_DEFAULT,4,2 ; @WIL_TX_SRING_SIZE_ORDER_DEFAULT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"init TX sring: size=%u, ring_id=%u\n"

	.no_dead_strip	_wil_tx_init_edma
.subsections_via_symbols
