	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b43legacy_attr_preamble_store
_b43legacy_attr_preamble_store:         ## @b43legacy_attr_preamble_store
	.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	%rcx, %r14
	movq	%rdx, %rbx
	callq	_dev_to_b43legacy_wldev
	movq	%rax, %r15
	movq	_CAP_NET_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_get_boolean
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_4
## %bb.3:
	movq	8(%r15), %rdi
	callq	_mutex_lock
	movq	8(%r15), %rdi
	addq	$4, %rdi
	callq	_spin_lock_irqsave
	xorl	%eax, %eax
	testl	%ebx, %ebx
	setne	%al
	movl	%eax, (%r15)
	movq	8(%r15), %rdi
	addq	$4, %rdi
	callq	_spin_unlock_irqrestore
	movq	8(%r15), %rdi
	callq	_mutex_unlock
	movl	%r14d, %ebx
	jmp	LBB0_4
LBB0_1:
	movq	_EPERM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CAP_NET_ADMIN,4,2              ## @CAP_NET_ADMIN
	.comm	_EPERM,4,2                      ## @EPERM
	.no_dead_strip	_b43legacy_attr_preamble_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function b43legacy_attr_preamble_store
_b43legacy_attr_preamble_store:         ; @b43legacy_attr_preamble_store
	.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, x3
	mov	x21, x2
	bl	_dev_to_b43legacy_wldev
	mov	x20, x0
Lloh0:
	adrp	x8, _CAP_NET_ADMIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CAP_NET_ADMIN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_capable
	cbz	w0, LBB0_3
; %bb.1:
	mov	x0, x21
	mov	x1, x19
	bl	_get_boolean
	mov	x21, x0
	tbnz	w0, #31, LBB0_4
; %bb.2:
	ldr	x0, [x20, #8]
	bl	_mutex_lock
	ldr	x8, [x20, #8]
	add	x0, x8, #4
	bl	_spin_lock_irqsave
	cmp	w21, #0
	cset	w8, ne
	str	w8, [x20]
	ldr	x8, [x20, #8]
	add	x0, x8, #4
	bl	_spin_unlock_irqrestore
	ldr	x0, [x20, #8]
	bl	_mutex_unlock
	mov	x21, x19
	b	LBB0_4
LBB0_3:
Lloh3:
	adrp	x8, _EPERM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_4:
	mov	x0, x21
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_CAP_NET_ADMIN,4,2              ; @CAP_NET_ADMIN
	.comm	_EPERM,4,2                      ; @EPERM
	.no_dead_strip	_b43legacy_attr_preamble_store
.subsections_via_symbols
