	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipw_wx_set_preamble
_ipw_wx_set_preamble:                   ## @ipw_wx_set_preamble
	.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, %rbx
	callq	_libipw_priv
	movq	%rax, %r14
	movl	(%rbx), %ebx
	movq	%rax, %r15
	addq	$4, %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.1:
	cmpl	$1, %ebx
	jne	LBB0_5
## %bb.2:
	movl	(%r14), %eax
	movq	_CFG_PREAMBLE_LONG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	jne	LBB0_7
## %bb.3:
	orl	%eax, %ecx
	movl	%ecx, (%r14)
	leaq	L_.str(%rip), %rdi
	callq	_IPW_DEBUG_ASSOC
	movq	%r14, %rdi
	callq	_ipw_disassociate
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movq	%r14, %rdi
	callq	_ipw_associate
	jmp	LBB0_7
LBB0_6:
	movq	_CFG_PREAMBLE_LONG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%r14)
LBB0_7:
	movq	%r15, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_5:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CFG_PREAMBLE_LONG,4,2          ## @CFG_PREAMBLE_LONG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[re]association triggered due to preamble change.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ipw_wx_set_preamble
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipw_wx_set_preamble
_ipw_wx_set_preamble:                   ; @ipw_wx_set_preamble
	.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
	bl	_libipw_priv
	mov	x20, x0
	ldr	w21, [x19]
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
	cbz	w21, LBB0_5
; %bb.1:
	cmp	w21, #1
	b.ne	LBB0_7
; %bb.2:
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _CFG_PREAMBLE_LONG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CFG_PREAMBLE_LONG@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_6
; %bb.3:
	orr	w8, w9, w8
	str	w8, [x20]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IPW_DEBUG_ASSOC
	mov	x0, x20
	bl	_ipw_disassociate
	cbnz	w0, LBB0_6
; %bb.4:
	mov	x0, x20
	bl	_ipw_associate
	b	LBB0_6
LBB0_5:
Lloh5:
	adrp	x8, _CFG_PREAMBLE_LONG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CFG_PREAMBLE_LONG@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [x20]
	bic	w8, w9, w8
	str	w8, [x20]
LBB0_6:
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	bl	_mutex_unlock
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_CFG_PREAMBLE_LONG,4,2          ; @CFG_PREAMBLE_LONG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[re]association triggered due to preamble change.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ipw_wx_set_preamble
.subsections_via_symbols
