	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prism54_set_policy
_prism54_set_policy:                    ## @prism54_set_policy
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	callq	_netdev_priv
	movq	%rax, %rbx
	leaq	24(%rax), %rdi
	callq	_prism54_clear_mac
	movq	(%r15), %rax
	movq	_MAC_POLICY_OPEN@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jl	LBB0_2
## %bb.1:
	movq	_MAC_POLICY_REJECT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jg	LBB0_2
## %bb.3:
	movq	%rbx, %r14
	addq	$8, %r14
	movq	%r14, %rdi
	callq	_down_write
	movq	(%r15), %rdi
	movq	%rdi, 24(%rbx)
	movq	(%rbx), %rax
	movq	_IW_MODE_MASTER@GOTPCREL(%rip), %rcx
	movq	_CARD_DEFAULT_MLME_MODE@GOTPCREL(%rip), %rdx
	movq	%rdx, %rsi
	cmpq	(%r12), %rdi
	je	LBB0_5
## %bb.4:
	movq	_DOT11_MLME_INTERMEDIATE@GOTPCREL(%rip), %rsi
LBB0_5:
	cmpq	(%rcx), %rax
	cmovneq	%rdx, %rsi
	movl	(%rsi), %eax
	movl	%eax, -36(%rbp)
	cmpq	$0, 16(%rbx)
	je	LBB0_7
## %bb.6:
	movq	_DOT11_MLME_EXTENDED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
LBB0_7:
	movq	_DOT11_OID_MLMEAUTOLEVEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_mgt_set
	movq	%rbx, %rdi
	callq	_mgt_commit
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_up_write
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.9:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_10:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_MAC_POLICY_OPEN,8,3            ## @MAC_POLICY_OPEN
	.comm	_MAC_POLICY_REJECT,8,3          ## @MAC_POLICY_REJECT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IW_MODE_MASTER,8,3             ## @IW_MODE_MASTER
	.comm	_DOT11_MLME_INTERMEDIATE,4,2    ## @DOT11_MLME_INTERMEDIATE
	.comm	_CARD_DEFAULT_MLME_MODE,4,2     ## @CARD_DEFAULT_MLME_MODE
	.comm	_DOT11_MLME_EXTENDED,4,2        ## @DOT11_MLME_EXTENDED
	.comm	_DOT11_OID_MLMEAUTOLEVEL,4,2    ## @DOT11_OID_MLMEAUTOLEVEL
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_prism54_set_policy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prism54_set_policy
_prism54_set_policy:                    ; @prism54_set_policy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x2
	bl	_netdev_priv
	mov	x19, x0
	add	x0, x0, #24
	bl	_prism54_clear_mac
	ldr	x8, [x21]
Lloh0:
	adrp	x22, _MAC_POLICY_OPEN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MAC_POLICY_OPEN@GOTPAGEOFF]
	ldr	x9, [x22]
Lloh2:
	adrp	x10, _MAC_POLICY_REJECT@GOTPAGE
Lloh3:
	ldr	x10, [x10, _MAC_POLICY_REJECT@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #0, ge
	b.le	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_2:
	add	x20, x19, #8
	mov	x0, x20
	bl	_down_write
	ldr	x8, [x21]
	str	x8, [x19, #24]
	ldr	x9, [x19]
Lloh7:
	adrp	x10, _IW_MODE_MASTER@GOTPAGE
Lloh8:
	ldr	x10, [x10, _IW_MODE_MASTER@GOTPAGEOFF]
Lloh9:
	ldr	x10, [x10]
	ldr	x11, [x22]
	cmp	x8, x11
	ccmp	x9, x10, #0, ne
Lloh10:
	adrp	x8, _CARD_DEFAULT_MLME_MODE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CARD_DEFAULT_MLME_MODE@GOTPAGEOFF]
Lloh12:
	adrp	x9, _DOT11_MLME_INTERMEDIATE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _DOT11_MLME_INTERMEDIATE@GOTPAGEOFF]
	csel	x8, x8, x9, ne
	ldr	w8, [x8]
	str	w8, [sp, #12]
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_4
; %bb.3:
Lloh14:
	adrp	x8, _DOT11_MLME_EXTENDED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DOT11_MLME_EXTENDED@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [sp, #12]
LBB0_4:
Lloh17:
	adrp	x8, _DOT11_OID_MLMEAUTOLEVEL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DOT11_OID_MLMEAUTOLEVEL@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_mgt_set
	mov	x0, x19
	bl	_mgt_commit
	mov	x19, x0
	mov	x0, x20
	bl	_up_write
	cbz	x19, LBB0_7
; %bb.5:
Lloh20:
	adrp	x8, _EIO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_7:
	mov	w0, #0
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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_MAC_POLICY_OPEN,8,3            ; @MAC_POLICY_OPEN
	.comm	_MAC_POLICY_REJECT,8,3          ; @MAC_POLICY_REJECT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IW_MODE_MASTER,8,3             ; @IW_MODE_MASTER
	.comm	_DOT11_MLME_INTERMEDIATE,4,2    ; @DOT11_MLME_INTERMEDIATE
	.comm	_CARD_DEFAULT_MLME_MODE,4,2     ; @CARD_DEFAULT_MLME_MODE
	.comm	_DOT11_MLME_EXTENDED,4,2        ; @DOT11_MLME_EXTENDED
	.comm	_DOT11_OID_MLMEAUTOLEVEL,4,2    ; @DOT11_OID_MLMEAUTOLEVEL
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_prism54_set_policy
.subsections_via_symbols
