	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt7601u_init_wcid_attr_mem
_mt7601u_init_wcid_attr_mem:            ## @mt7601u_init_wcid_attr_mem
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_N_WCIDS@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	shll	$3, %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %rbx
	movl	(%r15), %ecx
	testl	%ecx, %ecx
	jle	LBB0_2
## %bb.5:
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, (%rbx,%rax,4)
	incq	%rax
	movslq	(%r15), %rcx
	addq	%rcx, %rcx
	cmpq	%rcx, %rax
	jl	LBB0_6
	jmp	LBB0_7
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_4
LBB0_2:
	addl	%ecx, %ecx
LBB0_7:
	movq	_MT_WCID_ATTR_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%rbx, %rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_mt7601u_burst_write_regs
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_kfree
	movl	%r14d, %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_N_WCIDS,4,2                    ## @N_WCIDS
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MT_WCID_ATTR_BASE,4,2          ## @MT_WCID_ATTR_BASE
	.no_dead_strip	_mt7601u_init_wcid_attr_mem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt7601u_init_wcid_attr_mem
_mt7601u_init_wcid_attr_mem:            ; @mt7601u_init_wcid_attr_mem
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x21, _N_WCIDS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _N_WCIDS@GOTPAGEOFF]
	ldr	w8, [x21]
	lsl	w0, w8, #3
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_kmalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	mov	x8, #0
	mov	w9, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	str	w9, [x20, x8, lsl #2]
	add	x8, x8, #1
	ldrsw	x10, [x21]
	lsl	x3, x10, #1
	cmp	x8, x3
	b.lt	LBB0_3
	b	LBB0_6
LBB0_4:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_5:
	lsl	w3, w8, #1
LBB0_6:
Lloh8:
	adrp	x8, _MT_WCID_ATTR_BASE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MT_WCID_ATTR_BASE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_mt7601u_burst_write_regs
	mov	x19, x0
	mov	x0, x20
	bl	_kfree
	mov	x0, x19
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_N_WCIDS,4,2                    ; @N_WCIDS
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MT_WCID_ATTR_BASE,4,2          ; @MT_WCID_ATTR_BASE
	.no_dead_strip	_mt7601u_init_wcid_attr_mem
.subsections_via_symbols
