	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ieee80211_dfs_pickchannel      ## -- Begin function ieee80211_dfs_pickchannel
	.p2align	4, 0x90
_ieee80211_dfs_pickchannel:             ## @ieee80211_dfs_pickchannel
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	16(%rdi), %rax
	movq	_IEEE80211_CHAN_ALL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	andl	(%rax), %ebx
	movl	%ebx, %esi
	callq	_ieee80211_scan_pickchannel
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_13
## %bb.1:
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	leaq	-44(%rbp), %rdi
	movl	$4, %esi
	callq	_get_random_bytes
	movl	(%r15), %ecx
	movl	-44(%rbp), %eax
	cltd
	idivl	%ecx
	movl	%edx, -44(%rbp)
	testl	%ecx, %ecx
	js	LBB0_7
## %bb.2:
	movslq	%edx, %r13
	leaq	(,%r13,4), %rbx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r13
	movslq	(%r15), %rax
	addq	$4, %rbx
	cmpq	%rax, %r13
	jge	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %r14
	leaq	(%r14,%rbx), %r12
	movq	%r12, %rdi
	callq	_IEEE80211_IS_CHAN_RADAR
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r14,%rbx), %eax
	notl	%eax
	testl	%eax, -48(%rbp)                 ## 4-byte Folded Reload
	jne	LBB0_5
	jmp	LBB0_13
LBB0_6:
	movl	-44(%rbp), %edx
LBB0_7:
	testl	%edx, %edx
	jle	LBB0_12
## %bb.8:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%r13
	movslq	-44(%rbp), %rax
	addq	$4, %rbx
	cmpq	%rax, %r13
	jge	LBB0_12
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %r14
	leaq	(%r14,%rbx), %r12
	movq	%r12, %rdi
	callq	_IEEE80211_IS_CHAN_RADAR
	testl	%eax, %eax
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r14,%rbx), %eax
	notl	%eax
	testl	%eax, -48(%rbp)                 ## 4-byte Folded Reload
	jne	LBB0_11
	jmp	LBB0_13
LBB0_12:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_ic_printf
	xorl	%r12d, %r12d
LBB0_13:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_CHAN_ALL,4,2         ## @IEEE80211_CHAN_ALL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HELP, no channel located to switch to!\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ieee80211_dfs_pickchannel      ; -- Begin function ieee80211_dfs_pickchannel
	.p2align	2
_ieee80211_dfs_pickchannel:             ; @ieee80211_dfs_pickchannel
	.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	x19, x0
	ldr	x8, [x0, #16]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _IEEE80211_CHAN_ALL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IEEE80211_CHAN_ALL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w20, w9, w8
	mov	x1, x20
	bl	_ieee80211_scan_pickchannel
	cbnz	x0, LBB0_15
; %bb.1:
	add	x0, sp, #12
	mov	w1, #4
	bl	_get_random_bytes
	ldr	w9, [x19]
	ldr	w8, [sp, #12]
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	str	w8, [sp, #12]
	tbnz	w9, #31, LBB0_8
; %bb.2:
	sxtw	x21, w8
	sbfiz	x22, x8, #2, #32
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x19]
	add	x22, x22, #4
	cmp	x21, x8
	b.ge	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x23, [x19, #8]
	add	x0, x23, x22
	bl	_IEEE80211_IS_CHAN_RADAR
	cbnz	w0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x23, x22]
	bics	wzr, w20, w8
	b.ne	LBB0_3
; %bb.6:
	add	x0, x23, x22
	b	LBB0_15
LBB0_7:
	ldr	w8, [sp, #12]
LBB0_8:
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.9:
	mov	x21, #0
	mov	x22, #0
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [sp, #12]
	add	x21, x21, #4
	cmp	x22, x8
	b.ge	LBB0_14
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x23, [x19, #8]
	add	x0, x23, x21
	bl	_IEEE80211_IS_CHAN_RADAR
	cbnz	w0, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [x23, x21]
	bics	wzr, w20, w8
	b.ne	LBB0_10
; %bb.13:
	add	x0, x23, x21
	b	LBB0_15
LBB0_14:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ic_printf
	mov	x0, #0
LBB0_15:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_CHAN_ALL,4,2         ; @IEEE80211_CHAN_ALL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HELP, no channel located to switch to!\n"

.subsections_via_symbols
