	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dfs_get_valid_channel
_dfs_get_valid_channel:                 ## @dfs_get_valid_channel
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r13d
	movq	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	$0, -48(%rbp)
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	movl	$0, (%r12)
	movq	$0, (%r15)
	movq	$0, (%r14)
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	(%rax), %rax
	movq	_HOSTAPD_MODE_IEEE80211A@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.2:
	movl	%r13d, %ecx
	xorl	%r13d, %r13d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	callq	_dfs_find_channel
	testl	%eax, %eax
	je	LBB0_8
## %bb.3:
	movl	%eax, %r13d
	leaq	-56(%rbp), %rdi
	movl	$4, %esi
	callq	_os_get_random
	testq	%rax, %rax
	js	LBB0_7
## %bb.4:
	movl	-56(%rbp), %eax
	cltd
	idivl	%r13d
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	callq	_dfs_find_channel
	movq	(%rbx), %rax
	xorl	%edx, %edx
	cmpq	$0, (%rax)
	setne	%dl
	movl	%edx, (%r12)
	movq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	movq	%r15, %rcx
	movq	%r14, %r8
	callq	_dfs_adjust_center_freq
	movq	-48(%rbp), %r13
	jmp	LBB0_8
LBB0_7:
	xorl	%r13d, %r13d
LBB0_8:
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DFS: Selecting random channel"

	.comm	_HOSTAPD_MODE_IEEE80211A,8,3    ## @HOSTAPD_MODE_IEEE80211A
	.no_dead_strip	_dfs_get_valid_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dfs_get_valid_channel
_dfs_get_valid_channel:                 ; @dfs_get_valid_channel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x23, x4
	mov	x19, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	str	xzr, [sp, #8]
Lloh0:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	str	wzr, [x22]
	str	xzr, [x20]
	str	xzr, [x19]
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _HOSTAPD_MODE_IEEE80211A@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HOSTAPD_MODE_IEEE80211A@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
	mov	x0, x21
	mov	x1, #0
	mov	w2, #0
	mov	x3, x23
	bl	_dfs_find_channel
	cbz	w0, LBB0_5
; %bb.3:
	mov	x24, x0
	add	x0, sp, #4
	mov	w1, #4
	bl	_os_get_random
	tbnz	x0, #63, LBB0_5
; %bb.4:
	ldr	w8, [sp, #4]
	sdiv	w9, w8, w24
	msub	w2, w9, w24, w8
	add	x1, sp, #8
	mov	x0, x21
	mov	x3, x23
	bl	_dfs_find_channel
	ldr	x8, [x21]
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w2, ne
	str	w2, [x22]
	ldr	x1, [sp, #8]
	mov	x0, x21
	mov	x3, x20
	mov	x4, x19
	bl	_dfs_adjust_center_freq
	ldr	x0, [sp, #8]
	b	LBB0_6
LBB0_5:
	mov	x0, #0
LBB0_6:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DFS: Selecting random channel"

	.comm	_HOSTAPD_MODE_IEEE80211A,8,3    ; @HOSTAPD_MODE_IEEE80211A
	.no_dead_strip	_dfs_get_valid_channel
.subsections_via_symbols
