	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt76u_alloc_rx
_mt76u_alloc_rx:                        ## @mt76u_alloc_rx
	.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
	movq	8(%rdi), %r14
	movq	_MT_RXQ_MAIN@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movl	(%rdi), %edi
	movq	_MCU_RESP_URB_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	callq	_devm_kmalloc
	movl	%eax, 16(%r12)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	leaq	(%rbx,%rbx,2), %r15
	leaq	(%r14,%r15,8), %rdi
	addq	$20, %rdi
	callq	_spin_lock_init
	movl	(%r12), %edi
	movq	_MT_NUM_RX_ENTRIES@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	(%r13), %ecx
	movl	$4, %edx
	callq	_devm_kcalloc
	movq	%rax, 8(%r14,%r15,8)
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movl	(%rbx), %ecx
	movl	%ecx, (%r14,%r15,8)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 16(%r14,%r15,8)
	testl	%ecx, %ecx
	jle	LBB0_9
## %bb.4:
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_mt76u_rx_urb_alloc
	testl	%eax, %eax
	js	LBB0_8
## %bb.5:
	leaq	(%r14,%r15,8), %r14
	addq	$8, %r14
	movl	$4, %esi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	incq	%rbx
	movslq	-8(%r14), %rax
	cmpq	%rax, %rbx
	jge	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	leaq	4(%rsi), %r15
	addq	(%r14), %rsi
	movq	%r12, %rdi
	callq	_mt76u_rx_urb_alloc
	movq	%r15, %rsi
	testl	%eax, %eax
	jns	LBB0_6
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mt76u_submit_rx_buffers        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MT_RXQ_MAIN,8,3                ## @MT_RXQ_MAIN
	.comm	_MCU_RESP_URB_SIZE,4,2          ## @MCU_RESP_URB_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MT_NUM_RX_ENTRIES,4,2          ## @MT_NUM_RX_ENTRIES
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.no_dead_strip	_mt76u_alloc_rx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt76u_alloc_rx
_mt76u_alloc_rx:                        ; @mt76u_alloc_rx
	.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
	ldr	x21, [x0, #8]
Lloh0:
	adrp	x8, _MT_RXQ_MAIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT_RXQ_MAIN@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	ldr	w0, [x0]
Lloh3:
	adrp	x8, _MCU_RESP_URB_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MCU_RESP_URB_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x23]
	bl	_devm_kmalloc
	str	w0, [x19, #16]
	cbz	w0, LBB0_7
; %bb.1:
	mov	w8, #24
	madd	x20, x22, x8, x21
	add	x0, x20, #20
	bl	_spin_lock_init
	ldr	w0, [x19]
Lloh8:
	adrp	x24, _MT_NUM_RX_ENTRIES@GOTPAGE
Lloh9:
	ldr	x24, [x24, _MT_NUM_RX_ENTRIES@GOTPAGEOFF]
	ldr	w1, [x24]
	ldr	w3, [x23]
	mov	w2, #4
	bl	_devm_kcalloc
	str	x0, [x20, #8]!
	cbz	x0, LBB0_7
; %bb.2:
	ldr	w8, [x24]
	mov	w9, #24
	madd	x21, x22, x9, x21
	str	w8, [x21]
Lloh10:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	str	w9, [x21, #16]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.3:
	mov	x1, x0
	mov	x0, x19
	bl	_mt76u_rx_urb_alloc
	tbnz	w0, #31, LBB0_8
; %bb.4:
	mov	x22, #0
	mov	w8, #4
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x22, x22, #1
	ldrsw	x9, [x21]
	cmp	x22, x9
	b.ge	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x8, #4
	ldr	x9, [x20]
	add	x1, x9, x8
	mov	x0, x19
	bl	_mt76u_rx_urb_alloc
	mov	x8, x23
	tbz	w0, #31, LBB0_5
	b	LBB0_8
LBB0_7:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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
LBB0_9:
	mov	x0, x19
	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
	b	_mt76u_submit_rx_buffers
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MT_RXQ_MAIN,8,3                ; @MT_RXQ_MAIN
	.comm	_MCU_RESP_URB_SIZE,4,2          ; @MCU_RESP_URB_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MT_NUM_RX_ENTRIES,4,2          ; @MT_NUM_RX_ENTRIES
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.no_dead_strip	_mt76u_alloc_rx
.subsections_via_symbols
