	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_p2p_peer_channels_check        ## -- Begin function p2p_peer_channels_check
	.p2align	4, 0x90
_p2p_peer_channels_check:               ## @p2p_peer_channels_check
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r13
	movq	%rcx, %rbx
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	%rdx, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_os_memset
	movl	$-1, %eax
	cmpq	$3, %r13
	jl	LBB0_13
## %bb.1:
	movl	16(%r15), %edi
	movq	%rbx, %rsi
	movl	$3, %edx
	callq	_os_memcpy
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	movl	$3, %ecx
	callq	_wpa_hexdump_ascii
	cmpl	$4, 8(%rbx)
	je	LBB0_4
## %bb.2:
	movq	(%r14), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	movl	$2, %edx
	callq	_os_memcmp
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	(%r14), %rax
	movq	(%rax), %rax
	movl	(%rax), %edx
	movl	4(%rax), %ecx
	movl	(%rbx), %r8d
	movl	4(%rbx), %r9d
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_p2p_info
	jmp	LBB0_12
LBB0_4:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	leaq	(%rbx,%r13,4), %r13
	addq	$12, %rbx
	movq	_P2P_MAX_REG_CLASSES@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rax
	subq	%rbx, %rax
	cmpq	$9, %rax
	jl	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r15), %rcx
	movq	8(%r15), %rax
	movl	(%rbx), %edx
	leaq	(%rcx,%rcx,2), %rcx
	movl	%edx, 8(%rax,%rcx,4)
	movslq	4(%rbx), %r12
	addq	$8, %rbx
	movq	%r13, %rdx
	subq	%rbx, %rdx
	sarq	$2, %rdx
	cmpq	%r12, %rdx
	jl	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_P2P_MAX_REG_CLASS_CHANNELS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmpl	%edx, %r12d
	cmovll	%r12d, %edx
	movl	%edx, (%rax,%rcx,4)
	movl	4(%rax,%rcx,4), %edi
	movq	%rbx, %rsi
	callq	_os_memcpy
	leaq	(%rbx,%r12,4), %rbx
	movq	(%r15), %rax
	incq	%rax
	movq	%rax, (%r15)
	cmpq	(%r14), %rax
	jne	LBB0_5
LBB0_9:
	leaq	-72(%rbp), %rdx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_p2p_channels_intersect
	movl	(%rbx), %edx
	movl	(%r15), %ecx
	movl	-72(%rbp), %r8d
	leaq	L_.str.3(%rip), %rsi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_p2p_dbg
	xorl	%eax, %eax
	cmpq	$0, -72(%rbp)
	jne	LBB0_13
## %bb.10:
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	jmp	LBB0_11
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
LBB0_11:
	xorl	%eax, %eax
	callq	_p2p_info
LBB0_12:
	movl	$-1, %eax
LBB0_13:
	addq	$40, %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	"P2P: Peer country"

L_.str.1:                               ## @.str.1
	.asciz	"Mismatching country (ours=%c%c peer's=%c%c)"

L_.str.2:                               ## @.str.2
	.asciz	"Invalid peer Channel List"

	.comm	_P2P_MAX_REG_CLASS_CHANNELS,4,2 ## @P2P_MAX_REG_CLASS_CHANNELS
	.comm	_P2P_MAX_REG_CLASSES,8,3        ## @P2P_MAX_REG_CLASSES
L_.str.3:                               ## @.str.3
	.asciz	"Own reg_classes %d peer reg_classes %d intersection reg_classes %d"

L_.str.4:                               ## @.str.4
	.asciz	"No common channels found"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_p2p_peer_channels_check        ; -- Begin function p2p_peer_channels_check
	.p2align	2
_p2p_peer_channels_check:               ; @p2p_peer_channels_check
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x4
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	x0, x2
	mov	w1, #0
	mov	w2, #16
	bl	_os_memset
	cmp	x23, #3
	b.lt	LBB0_13
; %bb.1:
	ldr	w0, [x20, #16]
	mov	x1, x22
	mov	w2, #3
	bl	_os_memcpy
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
	mov	x2, x22
	mov	w3, #3
	bl	_wpa_hexdump_ascii
	ldr	w8, [x22, #8]
	cmp	w8, #4
	b.eq	LBB0_4
; %bb.2:
	ldr	x8, [x19]
	ldr	x1, [x8]
	mov	x0, x22
	mov	w2, #2
	bl	_os_memcmp
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldp	w9, w8, [x8]
	ldp	w10, w11, [x22]
	stp	x10, x11, [sp, #16]
	stp	x9, x8, [sp]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_4:
	add	x8, x22, #12
	mov	w24, #12
Lloh7:
	adrp	x25, _P2P_MAX_REG_CLASS_CHANNELS@GOTPAGE
Lloh8:
	ldr	x25, [x25, _P2P_MAX_REG_CLASS_CHANNELS@GOTPAGEOFF]
Lloh9:
	adrp	x26, _P2P_MAX_REG_CLASSES@GOTPAGE
Lloh10:
	ldr	x26, [x26, _P2P_MAX_REG_CLASSES@GOTPAGEOFF]
	add	x23, x22, x23, lsl #2
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	sub	x9, x23, x8
	cmp	x9, #9
	b.lt	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldp	x10, x9, [x20]
	ldr	w11, [x8]
	madd	x12, x10, x24, x9
	str	w11, [x12, #8]
	add	x22, x8, #8
	ldrsw	x27, [x8, #4]
	sub	x8, x23, x22
	cmp	x27, x8, asr #2
	b.gt	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x25]
	cmp	w27, w8
	csel	w2, w27, w8, lt
	madd	x8, x10, x24, x9
	str	w2, [x8]
	ldr	w0, [x8, #4]
	mov	x1, x22
	bl	_os_memcpy
	add	x8, x22, x27, lsl #2
	ldr	x9, [x20]
	add	x9, x9, #1
	str	x9, [x20]
	ldr	x10, [x26]
	cmp	x9, x10
	b.ne	LBB0_5
LBB0_8:
	add	x2, sp, #32
	mov	x0, x21
	mov	x1, x20
	bl	_p2p_channels_intersect
	ldr	w2, [x21]
	ldr	w3, [x20]
	ldr	w4, [sp, #32]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_p2p_dbg
	ldr	x8, [sp, #32]
	cbz	x8, LBB0_11
; %bb.9:
	mov	w0, #0
	b	LBB0_14
LBB0_10:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_11:
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_12:
	mov	x0, x19
	bl	_p2p_info
LBB0_13:
	mov	w0, #-1
LBB0_14:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"P2P: Peer country"

l_.str.1:                               ; @.str.1
	.asciz	"Mismatching country (ours=%c%c peer's=%c%c)"

l_.str.2:                               ; @.str.2
	.asciz	"Invalid peer Channel List"

	.comm	_P2P_MAX_REG_CLASS_CHANNELS,4,2 ; @P2P_MAX_REG_CLASS_CHANNELS
	.comm	_P2P_MAX_REG_CLASSES,8,3        ; @P2P_MAX_REG_CLASSES
l_.str.3:                               ; @.str.3
	.asciz	"Own reg_classes %d peer reg_classes %d intersection reg_classes %d"

l_.str.4:                               ; @.str.4
	.asciz	"No common channels found"

.subsections_via_symbols
