	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_p2p_buf_add_pref_channel_list  ## -- Begin function p2p_buf_add_pref_channel_list
	.p2align	4, 0x90
_p2p_buf_add_pref_channel_list:         ## @p2p_buf_add_pref_channel_list
	.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
	testl	%edx, %edx
	je	LBB0_8
## %bb.1:
	movq	%rsi, %rbx
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, %r15d
	xorl	%r14d, %r14d
	leaq	-44(%rbp), %r13
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx,%r14,4), %edi
	leaq	-48(%rbp), %rsi
	movq	%r13, %rdx
	callq	_p2p_freq_to_channel
	cmpq	$1, %rax
	adcl	$0, %r12d
	incq	%r14
	cmpq	%r14, %r15
	jne	LBB0_2
## %bb.3:
	leal	4(,%r12,4), %r12d
	movq	_WLAN_EID_VENDOR_SPECIFIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_wpabuf_put_u8
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_wpabuf_put_u8
	movq	_OUI_QCA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_wpabuf_put_be24
	movq	_QCA_VENDOR_ELEM_P2P_PREF_CHAN_LIST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_wpabuf_put_u8
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	cmpl	$2, %eax
	movl	$1, %r13d
	cmovael	%eax, %r13d
	xorl	%r15d, %r15d
	leaq	-44(%rbp), %r12
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	-48(%rbp), %esi
	movq	%r14, %rdi
	callq	_wpabuf_put_u8
	movl	-44(%rbp), %esi
	movq	%r14, %rdi
	callq	_wpabuf_put_u8
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r15
	cmpq	%r15, %r13
	je	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx,%r15,4), %edi
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdx
	callq	_p2p_freq_to_channel
	testq	%rax, %rax
	jns	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx,%r15,4), %edx
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	jmp	LBB0_7
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WLAN_EID_VENDOR_SPECIFIC,4,2   ## @WLAN_EID_VENDOR_SPECIFIC
	.comm	_OUI_QCA,4,2                    ## @OUI_QCA
	.comm	_QCA_VENDOR_ELEM_P2P_PREF_CHAN_LIST,4,2 ## @QCA_VENDOR_ELEM_P2P_PREF_CHAN_LIST
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unsupported frequency %u MHz"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_p2p_buf_add_pref_channel_list  ; -- Begin function p2p_buf_add_pref_channel_list
	.p2align	2
_p2p_buf_add_pref_channel_list:         ; @p2p_buf_add_pref_channel_list
	.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
	cbz	w2, LBB0_8
; %bb.1:
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	mov	w22, #0
	mov	w23, w2
	mov	x24, x1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24], #4
	add	x1, sp, #12
	add	x2, sp, #8
	bl	_p2p_freq_to_channel
	cmp	x0, #0
	cinc	w22, w22, eq
	subs	x23, x23, #1
	b.ne	LBB0_2
; %bb.3:
	lsl	w8, w22, #2
	add	w22, w8, #4
Lloh0:
	adrp	x8, _WLAN_EID_VENDOR_SPECIFIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WLAN_EID_VENDOR_SPECIFIC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_wpabuf_put_u8
	mov	x0, x20
	mov	x1, x22
	bl	_wpabuf_put_u8
Lloh3:
	adrp	x8, _OUI_QCA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OUI_QCA@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_wpabuf_put_be24
Lloh6:
	adrp	x8, _QCA_VENDOR_ELEM_P2P_PREF_CHAN_LIST@GOTPAGE
Lloh7:
	ldr	x8, [x8, _QCA_VENDOR_ELEM_P2P_PREF_CHAN_LIST@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_wpabuf_put_u8
	cmp	w21, #1
	csinc	w22, w21, wzr, hi
Lloh9:
	adrp	x23, _MSG_DEBUG@GOTPAGE
Lloh10:
	ldr	x23, [x23, _MSG_DEBUG@GOTPAGEOFF]
Lloh11:
	adrp	x21, l_.str@PAGE
Lloh12:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [sp, #12]
	mov	x0, x20
	bl	_wpabuf_put_u8
	ldr	w1, [sp, #8]
	mov	x0, x20
	bl	_wpabuf_put_u8
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x19, x19, #4
	subs	x22, x22, #1
	b.eq	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	add	x1, sp, #12
	add	x2, sp, #8
	bl	_p2p_freq_to_channel
	tbz	x0, #63, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x23]
	ldr	w2, [x19]
	mov	x1, x21
	bl	_wpa_printf
	b	LBB0_5
LBB0_8:
	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	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_WLAN_EID_VENDOR_SPECIFIC,4,2   ; @WLAN_EID_VENDOR_SPECIFIC
	.comm	_OUI_QCA,4,2                    ; @OUI_QCA
	.comm	_QCA_VENDOR_ELEM_P2P_PREF_CHAN_LIST,4,2 ; @QCA_VENDOR_ELEM_P2P_PREF_CHAN_LIST
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unsupported frequency %u MHz"

.subsections_via_symbols
