	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wpas_p2p_pick_best_used_freq
_wpas_p2p_pick_best_used_freq:          ## @wpas_p2p_pick_best_used_freq
	.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
	movl	%edx, %r14d
	movq	%rsi, %r13
	movq	%rdi, %r15
	xorl	%eax, %eax
	movl	$0, %ebx
	testl	%edx, %edx
	je	LBB0_6
## %bb.1:
	movl	%r14d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movl	(%rax), %edi
	movl	(%r13,%rbx,8), %esi
	callq	_p2p_supported_freq
	testq	%rax, %rax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_2
## %bb.4:
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_5:
	xorl	%eax, %eax
LBB0_6:
	cmpl	%r14d, %ebx
	je	LBB0_15
## %bb.7:
	leal	1(%rbx), %eax
	cmpl	%r14d, %eax
	jae	LBB0_14
## %bb.8:
	movl	%eax, %r12d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%r12
	cmpl	%r14d, %r12d
	jae	LBB0_14
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movl	(%rax), %edi
	movl	(%r13,%r12,8), %esi
	callq	_p2p_supported_freq
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	4(%r13,%r12,8), %eax
	movq	_WPA_FREQ_USED_BY_INFRA_STATION@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_WPA_FREQ_USED_BY_P2P_CLIENT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	cmovnel	%r12d, %ebx
	jmp	LBB0_12
LBB0_13:
	movl	%r12d, %ebx
LBB0_14:
	movl	%ebx, %eax
	movl	(%r13,%rax,8), %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WPA_FREQ_USED_BY_INFRA_STATION,4,2 ## @WPA_FREQ_USED_BY_INFRA_STATION
	.comm	_WPA_FREQ_USED_BY_P2P_CLIENT,4,2 ## @WPA_FREQ_USED_BY_P2P_CLIENT
	.no_dead_strip	_wpas_p2p_pick_best_used_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wpas_p2p_pick_best_used_freq
_wpas_p2p_pick_best_used_freq:          ; @wpas_p2p_pick_best_used_freq
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	cbz	w2, LBB0_4
; %bb.1:
	mov	x22, #0
	mov	w23, w20
	mov	x24, x19
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	w0, [x8]
	ldr	w1, [x24]
	bl	_p2p_supported_freq
	cbnz	x0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x22, #1
	add	x24, x24, #8
	cmp	x23, x22
	b.ne	LBB0_2
	b	LBB0_6
LBB0_4:
	mov	w22, #0
LBB0_5:
	cmp	w22, w20
	b.ne	LBB0_7
LBB0_6:
	mov	w0, #0
	b	LBB0_15
LBB0_7:
	add	w23, w22, #1
	cmp	w23, w20
	b.hs	LBB0_14
; %bb.8:
	add	x8, x19, w23, uxtw #3
	add	x24, x8, #4
Lloh0:
	adrp	x25, _WPA_FREQ_USED_BY_INFRA_STATION@GOTPAGE
Lloh1:
	ldr	x25, [x25, _WPA_FREQ_USED_BY_INFRA_STATION@GOTPAGEOFF]
Lloh2:
	adrp	x26, _WPA_FREQ_USED_BY_P2P_CLIENT@GOTPAGE
Lloh3:
	ldr	x26, [x26, _WPA_FREQ_USED_BY_P2P_CLIENT@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	w23, w23, #1
	add	x24, x24, #8
	cmp	w23, w20
	b.hs	LBB0_14
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	w0, [x8]
	ldur	w1, [x24, #-4]
	bl	_p2p_supported_freq
	cbz	x0, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x24]
	ldr	w9, [x25]
	tst	w9, w8
	b.ne	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w9, [x26]
	tst	w9, w8
	csel	w22, w22, w23, eq
	b	LBB0_9
LBB0_13:
	mov	x22, x23
LBB0_14:
	mov	w8, w22
	lsl	x8, x8, #3
	ldr	w0, [x19, x8]
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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_WPA_FREQ_USED_BY_INFRA_STATION,4,2 ; @WPA_FREQ_USED_BY_INFRA_STATION
	.comm	_WPA_FREQ_USED_BY_P2P_CLIENT,4,2 ; @WPA_FREQ_USED_BY_P2P_CLIENT
	.no_dead_strip	_wpas_p2p_pick_best_used_freq
.subsections_via_symbols
