	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p2p_prepare_channel_pref
_p2p_prepare_channel_pref:              ## @p2p_prepare_channel_pref
	.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
	movl	%ecx, %r12d
	movl	%edx, %ecx
	movl	%esi, %ebx
	movq	%rdi, %r15
	testl	%esi, %esi
	movl	%esi, %r14d
	cmovel	%edx, %r14d
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	movl	%r12d, %r8d
	xorl	%eax, %eax
	callq	_p2p_dbg
	leaq	-40(%rbp), %rsi
	leaq	-36(%rbp), %rdx
	movl	%r14d, %edi
	callq	_p2p_freq_to_channel
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movq	8(%r15), %rdi
	movl	-40(%rbp), %esi
	movl	-36(%rbp), %edx
	callq	_p2p_channels_includes
	testl	%eax, %eax
	je	LBB0_3
LBB0_6:
	movl	-40(%rbp), %eax
	movl	%eax, (%r15)
	movl	-36(%rbp), %ecx
	movl	%ecx, 4(%r15)
	testl	%ebx, %ebx
	je	LBB0_8
## %bb.7:
	movl	$1, 16(%r15)
	movq	24(%r15), %rdx
	movl	$1, (%rdx)
	movl	%eax, 4(%rdx)
	movq	8(%rdx), %rax
	movl	%ecx, (%rax)
	jmp	LBB0_9
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_p2p_dbg
	movl	$-1, %eax
	jmp	LBB0_10
LBB0_3:
	testl	%r12d, %r12d
	je	LBB0_4
LBB0_5:
	movl	-40(%rbp), %ecx
	movl	-36(%rbp), %r8d
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_p2p_dbg
	movl	$-1, %eax
	jmp	LBB0_10
LBB0_8:
	movq	8(%r15), %rsi
	addq	$16, %r15
	movq	%r15, %rdi
	movl	$4, %edx
	callq	_os_memcpy
LBB0_9:
	xorl	%eax, %eax
LBB0_10:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	8(%r15), %rdi
	addq	$4, %rdi
	movl	-40(%rbp), %esi
	movl	-36(%rbp), %edx
	callq	_p2p_channels_includes
	testl	%eax, %eax
	jne	LBB0_6
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Prepare channel pref - force_freq=%u pref_freq=%u go=%d"

L_.str.1:                               ## @.str.1
	.asciz	"Unsupported frequency %u MHz"

L_.str.2:                               ## @.str.2
	.asciz	"Frequency %u MHz (oper_class %u channel %u) not allowed for P2P"

	.no_dead_strip	_p2p_prepare_channel_pref
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p2p_prepare_channel_pref
_p2p_prepare_channel_pref:              ; @p2p_prepare_channel_pref
	.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
	mov	x22, x3
                                        ; kill: def $w2 killed $w2 def $x2
	mov	x21, x1
	mov	x19, x0
	cmp	w1, #0
	csel	w20, w2, w1, eq
	stp	x2, x22, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_p2p_dbg
	add	x1, sp, #28
	add	x2, sp, #24
	mov	x0, x20
	bl	_p2p_freq_to_channel
	tbnz	x0, #63, LBB0_4
; %bb.1:
	ldr	x0, [x19, #8]
	ldp	w2, w1, [sp, #24]
	bl	_p2p_channels_includes
	cbz	w0, LBB0_5
LBB0_2:
	ldp	w9, w8, [sp, #24]
	stp	w8, w9, [x19]
	cbz	w21, LBB0_8
; %bb.3:
	mov	w0, #0
	mov	w10, #1
	str	w10, [x19, #16]
	ldr	x11, [x19, #24]
	stp	w10, w8, [x11]
	ldr	x8, [x11, #8]
	str	w9, [x8]
	b	LBB0_9
LBB0_4:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_5:
	cbz	w22, LBB0_10
LBB0_6:
	ldp	w9, w8, [sp, #24]
	stp	x8, x9, [sp]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_7:
	mov	x0, x19
	mov	x2, x20
	bl	_p2p_dbg
	mov	w0, #-1
	b	LBB0_9
LBB0_8:
	add	x0, x19, #16
	ldr	x1, [x19, #8]
	mov	w2, #4
	bl	_os_memcpy
	mov	w0, #0
LBB0_9:
	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
LBB0_10:
	ldr	x8, [x19, #8]
	add	x0, x8, #4
	ldp	w2, w1, [sp, #24]
	bl	_p2p_channels_includes
	cbnz	w0, LBB0_2
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Prepare channel pref - force_freq=%u pref_freq=%u go=%d"

l_.str.1:                               ; @.str.1
	.asciz	"Unsupported frequency %u MHz"

l_.str.2:                               ; @.str.2
	.asciz	"Frequency %u MHz (oper_class %u channel %u) not allowed for P2P"

	.no_dead_strip	_p2p_prepare_channel_pref
.subsections_via_symbols
