	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wlan_config_get_dchannel
_wlan_config_get_dchannel:              ## @wlan_config_get_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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	$0, -28(%rbp)
	movq	$16, -40(%rbp)
	callq	_wlan_get_channel_list
	movl	$-1, %ebx
	testq	%rax, %rax
	js	LBB0_9
## %bb.1:
	leaq	-56(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	24(%r14), %edi
	movq	_IEEE80211_IOC_CURCHAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	leaq	-40(%rbp), %r8
	movq	%r15, %rcx
	xorl	%r9d, %r9d
	callq	_wlan_ioctl
	testq	%rax, %rax
	js	LBB0_9
## %bb.2:
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	-56(%rbp), %rcx
	movq	-48(%rbp), %rdx
	movq	16(%r14), %rsi
	negq	%rax
	addq	$8, %rsi
	movl	$1, %edi
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	leaq	(%rax,%rdi), %rbx
	incq	%rbx
	incq	%rdi
	addq	$16, %rsi
	cmpq	$1, %rbx
	je	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	-8(%rsi), %rcx
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	(%rsi), %rdx
	jne	LBB0_7
## %bb.6:
	movq	%rdi, 8(%r14)
LBB0_8:
	xorl	%ebx, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	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_get_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_get_dchannel
_wlan_config_get_dchannel:              ; @wlan_config_get_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, x0
	stur	wzr, [x29, #-20]
	mov	w8, #16
	str	x8, [sp, #16]
	bl	_wlan_get_channel_list
	tbnz	x0, #63, LBB0_8
; %bb.1:
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldr	w0, [x19, #24]
Lloh0:
	adrp	x8, _IEEE80211_IOC_CURCHAN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE80211_IOC_CURCHAN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	sub	x2, x29, #20
	mov	x3, sp
	add	x4, sp, #16
	mov	w5, #0
	bl	_wlan_ioctl
	tbnz	x0, #63, LBB0_8
; %bb.2:
	ldr	x8, [x19]
	cbz	x8, LBB0_9
; %bb.3:
	mov	x9, #0
	ldr	x12, [x19, #16]
	ldp	x10, x11, [sp]
	add	x12, x12, #8
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x9, #1
	add	x12, x12, #16
	cmp	x8, x9
	b.eq	LBB0_9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x13, [x12, #-8]
	cmp	x10, x13
	b.ne	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x13, [x12]
	cmp	x11, x13
	b.ne	LBB0_4
; %bb.7:
	mov	w0, #0
	add	x8, x9, #1
	str	x8, [x19, #8]
	b	LBB0_10
LBB0_8:
	mov	w0, #-1
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
	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_get_dchannel
.subsections_via_symbols
