	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wil_ring_alloc_desc_ring
_wil_ring_alloc_desc_ring:              ## @wil_ring_alloc_desc_ring
	.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	%rsi, %r14
	movq	%rdi, %rbx
	callq	_wil_to_dev
	movq	%rax, %r12
	movslq	(%r14), %r13
	leaq	L_.str(%rip), %rsi
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_wil_dbg_misc
	movl	$1, %edi
	callq	_BUILD_BUG_ON
	xorps	%xmm0, %xmm0
	movups	%xmm0, 56(%r14)
	movl	(%r14), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	shlq	$2, %r13
	leaq	24(%r14), %rax
	movl	(%r15), %ecx
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%rax, %r13
	movq	%rax, %rdx
	callq	_dma_alloc_coherent
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	cmpq	$0, 32(%r14)
	je	LBB0_3
## %bb.4:
	leaq	48(%r14), %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$1, %esi
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_dma_alloc_coherent
	movq	%rax, 40(%r14)
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	16(%r14), %rax
	cmpq	$0, 32(%r14)
	leaq	L_.str.3(%rip), %rcx
	leaq	L_.str.2(%rip), %rdx
	cmoveq	%rcx, %rdx
	jmp	LBB0_6
LBB0_3:
	leaq	L_.str.3(%rip), %rdx
LBB0_6:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	(%r14), %ecx
	movq	8(%r14), %rsi
	movq	%rsi, (%rsp)
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%rax, %r8
	movq	%r13, %r9
	xorl	%eax, %eax
	callq	_wil_dbg_misc
	jmp	LBB0_10
LBB0_7:
	movl	(%r14), %esi
	shll	$2, %esi
	movq	16(%r14), %rdx
	movl	24(%r14), %ecx
	movq	%r12, %rdi
	callq	_dma_free_coherent
	movq	$0, 16(%r14)
LBB0_8:
	movq	8(%r14), %rdi
	callq	_kfree
	movq	$0, 8(%r14)
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$24, %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	"alloc_desc_ring:\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.1:                               ## @.str.1
	.asciz	"%s ring[%d] 0x%p:%pad 0x%p\n"

L_.str.2:                               ## @.str.2
	.asciz	"RX"

L_.str.3:                               ## @.str.3
	.asciz	"TX"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_wil_ring_alloc_desc_ring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wil_ring_alloc_desc_ring
_wil_ring_alloc_desc_ring:              ; @wil_ring_alloc_desc_ring
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x1
	mov	x20, x0
	bl	_wil_to_dev
	mov	x21, x0
	ldrsw	x22, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_wil_dbg_misc
	mov	w0, #1
	bl	_BUILD_BUG_ON
	stp	xzr, xzr, [x19, #56]
	ldr	w0, [x19]
Lloh2:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_8
; %bb.1:
	lsl	x1, x22, #2
	add	x22, x19, #24
	ldr	w3, [x24]
	mov	x0, x21
	mov	x2, x22
	bl	_dma_alloc_coherent
	str	x0, [x19, #16]
	cbz	x0, LBB0_7
; %bb.2:
	ldr	x8, [x19, #32]
Lloh4:
	adrp	x23, l_.str.3@PAGE
Lloh5:
	add	x23, x23, l_.str.3@PAGEOFF
	cbz	x8, LBB0_5
; %bb.3:
	add	x2, x19, #48
	ldr	w3, [x24]
	mov	x0, x21
	mov	w1, #1
	bl	_dma_alloc_coherent
	str	x0, [x19, #40]
	cbz	x0, LBB0_6
; %bb.4:
	ldr	x8, [x19, #32]
	ldr	x0, [x19, #16]
Lloh6:
	adrp	x9, l_.str.2@PAGE
Lloh7:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	x8, #0
	csel	x23, x23, x9, eq
LBB0_5:
	ldr	x8, [x19, #8]
	ldr	w9, [x19]
	stp	x22, x8, [sp, #24]
	stp	x9, x0, [sp, #8]
	str	x23, [sp]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_wil_dbg_misc
	mov	w0, #0
	b	LBB0_9
LBB0_6:
	ldr	w8, [x19]
	lsl	w1, w8, #2
	ldr	x2, [x19, #16]
	ldr	w3, [x19, #24]
	mov	x0, x21
	bl	_dma_free_coherent
	str	xzr, [x19, #16]
LBB0_7:
	ldr	x0, [x19, #8]
	bl	_kfree
	str	xzr, [x19, #8]
LBB0_8:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"alloc_desc_ring:\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.1:                               ; @.str.1
	.asciz	"%s ring[%d] 0x%p:%pad 0x%p\n"

l_.str.2:                               ; @.str.2
	.asciz	"RX"

l_.str.3:                               ; @.str.3
	.asciz	"TX"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_wil_ring_alloc_desc_ring
.subsections_via_symbols
