	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wlan_config_set_dchannel
_wlan_config_set_dchannel:              ## @wlan_config_set_dchannel
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movl	$0, -36(%rbp)
	movq	$4, -48(%rbp)
	callq	_wlan_get_channel_list
	movl	$-1, %r15d
	testq	%rax, %rax
	js	LBB0_4
## %bb.1:
	cmpq	%r14, (%rbx)
	jl	LBB0_4
## %bb.2:
	movq	8(%rbx), %rax
	leaq	(%r14,%rax), %rsi
	decq	%rsi
	leaq	-40(%rbp), %r12
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_memcpy
	movl	24(%rbx), %edi
	movq	_IEEE80211_IOC_CURCHAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	leaq	-48(%rbp), %r8
	movq	%r12, %rcx
	movl	$1, %r9d
	callq	_wlan_ioctl
	testq	%rax, %rax
	js	LBB0_4
## %bb.3:
	movq	%r14, 16(%rbx)
	xorl	%r15d, %r15d
LBB0_4:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_IOC_CURCHAN,4,2      ## @IEEE80211_IOC_CURCHAN
	.no_dead_strip	_wlan_config_set_dchannel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wlan_config_set_dchannel
_wlan_config_set_dchannel:              ; @wlan_config_set_dchannel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x1
	mov	x20, x0
	stur	wzr, [x29, #-20]
	mov	w8, #4
	str	x8, [sp, #16]
	bl	_wlan_get_channel_list
	tbnz	x0, #63, LBB0_4
; %bb.1:
	ldr	x8, [x20]
	cmp	x8, x19
	b.lt	LBB0_4
; %bb.2:
	ldr	x8, [x20, #8]
	add	x8, x19, x8
	sub	x1, x8, #1
	add	x0, sp, #8
	mov	w2, #4
	bl	_memcpy
	ldr	w0, [x20, #24]
Lloh0:
	adrp	x8, _IEEE80211_IOC_CURCHAN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE80211_IOC_CURCHAN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	sub	x2, x29, #20
	add	x3, sp, #8
	add	x4, sp, #16
	mov	w5, #1
	bl	_wlan_ioctl
	tbnz	x0, #63, LBB0_4
; %bb.3:
	mov	w0, #0
	str	x19, [x20, #16]
	b	LBB0_5
LBB0_4:
	mov	w0, #-1
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_IOC_CURCHAN,4,2      ; @IEEE80211_IOC_CURCHAN
	.no_dead_strip	_wlan_config_set_dchannel
.subsections_via_symbols
