	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ieee80211_ioctl_chanswitch
_ieee80211_ioctl_chanswitch:            ## @ieee80211_ioctl_chanswitch
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$24, (%rsi)
	jne	LBB0_8
## %bb.1:
	movq	%rdi, %r15
	movq	16(%rdi), %r14
	movl	4(%rsi), %edi
	leaq	-48(%rbp), %rsi
	movl	$24, %edx
	callq	_copyin
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.2:
	movq	(%r15), %rax
	movq	_IEEE80211_M_HOSTAP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.3:
	movq	_IEEE80211_F_DOTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r15)
	je	LBB0_9
## %bb.4:
	movl	-36(%rbp), %edx
	movl	-32(%rbp), %esi
	movq	%r14, %rdi
	callq	_ieee80211_find_channel
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_IEEE80211_LOCK
	movq	_IEEE80211_F_CSAPENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_11
## %bb.6:
	cmpq	$0, -48(%rbp)
	je	LBB0_12
## %bb.7:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_14
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_15
LBB0_9:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_15
LBB0_10:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_15
LBB0_11:
	movl	-40(%rbp), %edx
	movq	-48(%rbp), %rcx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_ieee80211_csa_startswitch
	jmp	LBB0_13
LBB0_12:
	movq	%r14, %rdi
	callq	_ieee80211_csa_cancelswitch
LBB0_13:
	xorl	%ebx, %ebx
LBB0_14:
	movq	%r14, %rdi
	callq	_IEEE80211_UNLOCK
LBB0_15:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IEEE80211_M_HOSTAP,8,3         ## @IEEE80211_M_HOSTAP
	.comm	_IEEE80211_F_DOTH,4,2           ## @IEEE80211_F_DOTH
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_IEEE80211_F_CSAPENDING,4,2     ## @IEEE80211_F_CSAPENDING
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_ieee80211_ioctl_chanswitch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ieee80211_ioctl_chanswitch
_ieee80211_ioctl_chanswitch:            ; @ieee80211_ioctl_chanswitch
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	w8, [x1]
	cmp	w8, #24
	b.ne	LBB0_8
; %bb.1:
	mov	x21, x0
	ldr	x19, [x0, #16]
	ldr	w0, [x1, #4]
	add	x1, sp, #8
	mov	w2, #24
	bl	_copyin
	mov	x20, x0
	cbnz	w0, LBB0_15
; %bb.2:
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _IEEE80211_M_HOSTAP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IEEE80211_M_HOSTAP@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.3:
	ldr	w8, [x21, #8]
Lloh3:
	adrp	x9, _IEEE80211_F_DOTH@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IEEE80211_F_DOTH@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.4:
	ldp	w2, w1, [sp, #20]
	mov	x0, x19
	bl	_ieee80211_find_channel
	cbz	x0, LBB0_10
; %bb.5:
	mov	x20, x0
	mov	x0, x19
	bl	_IEEE80211_LOCK
	ldr	w8, [x19]
Lloh6:
	adrp	x9, _IEEE80211_F_CSAPENDING@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IEEE80211_F_CSAPENDING@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.6:
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_12
; %bb.7:
Lloh9:
	adrp	x8, _EBUSY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
	b	LBB0_14
LBB0_8:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w20, [x8]
	b	LBB0_15
LBB0_9:
Lloh15:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh17:
	ldr	w20, [x8]
	b	LBB0_15
LBB0_10:
Lloh18:
	adrp	x8, _ENOENT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh20:
	ldr	w20, [x8]
	b	LBB0_15
LBB0_11:
	ldr	w2, [sp, #16]
	ldr	x3, [sp, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_ieee80211_csa_startswitch
	b	LBB0_13
LBB0_12:
	mov	x0, x19
	bl	_ieee80211_csa_cancelswitch
LBB0_13:
	mov	w20, #0
LBB0_14:
	mov	x0, x19
	bl	_IEEE80211_UNLOCK
LBB0_15:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IEEE80211_M_HOSTAP,8,3         ; @IEEE80211_M_HOSTAP
	.comm	_IEEE80211_F_DOTH,4,2           ; @IEEE80211_F_DOTH
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_IEEE80211_F_CSAPENDING,4,2     ; @IEEE80211_F_CSAPENDING
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_ieee80211_ioctl_chanswitch
.subsections_via_symbols
