	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_p2p_af_searching_channel
_brcmf_p2p_af_searching_channel:        ## @brcmf_p2p_af_searching_channel
	.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, %rbx
	movq	_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_brcmf_dbg
	movq	8(%rbx), %rax
	movq	_P2PAPI_BSSCFG_PRIMARY@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	48(%rbx), %r15
	movq	%r15, %rdi
	callq	_reinit_completion
	movq	_BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_set_bit
	movl	$1, 16(%rbx)
	movq	_P2P_INVALID_CHANNEL@GOTPCREL(%rip), %r14
	movq	(%r14), %rdx
	movq	%rdx, 24(%rbx)
	movq	_P2P_CHANNEL_SYNC_RETRY@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_14
## %bb.1:
	leaq	52(%rbx), %r12
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, 32(%rbx)
	movq	_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_brcmf_dbg
	movq	%r12, %rdi
	callq	_schedule_work
	movq	_P2P_AF_FRM_SCAN_MAX_WAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_wait_for_completion_timeout
	movq	24(%rbx), %rax
	cmpq	(%r14), %rax
	jne	LBB0_13
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_13
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	40(%rbx), %rdx
	testq	%rdx, %rdx
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_brcmf_dbg
	movl	$1, 32(%rbx)
	movq	%r12, %rdi
	callq	_schedule_work
	movq	_P2P_AF_FRM_SCAN_MAX_WAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_wait_for_completion_timeout
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	24(%rbx), %rax
	cmpq	(%r14), %rax
	jne	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r13
	movq	_BRCMF_VIF_STATUS_CONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_BRCMF_VIF_STATUS_CONNECTING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_11
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_P2P_DEFAULT_SLEEP_TIME_VSDB@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msleep
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_P2P_CHANNEL_SYNC_RETRY@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jge	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	24(%rbx), %rax
	cmpq	(%r14), %rax
	je	LBB0_2
LBB0_13:
	movq	24(%rbx), %rdx
LBB0_14:
	movq	_TRACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_brcmf_dbg
	movl	$0, 16(%rbx)
	movq	_BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_clear_bit
	movq	24(%rbx), %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRACE,4,2                      ## @TRACE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Enter\n"

	.comm	_P2PAPI_BSSCFG_PRIMARY,8,3      ## @P2PAPI_BSSCFG_PRIMARY
	.comm	_BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL,4,2 ## @BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL
	.comm	_P2P_INVALID_CHANNEL,8,3        ## @P2P_INVALID_CHANNEL
	.comm	_P2P_CHANNEL_SYNC_RETRY,8,3     ## @P2P_CHANNEL_SYNC_RETRY
L_.str.1:                               ## @.str.1
	.asciz	"Scheduling action frame for sending.. (%d)\n"

	.comm	_P2P_AF_FRM_SCAN_MAX_WAIT,4,2   ## @P2P_AF_FRM_SCAN_MAX_WAIT
L_.str.2:                               ## @.str.2
	.asciz	"Scheduling listen peer, channel=%d\n"

	.comm	_BRCMF_VIF_STATUS_CONNECTED,4,2 ## @BRCMF_VIF_STATUS_CONNECTED
	.comm	_BRCMF_VIF_STATUS_CONNECTING,4,2 ## @BRCMF_VIF_STATUS_CONNECTING
	.comm	_P2P_DEFAULT_SLEEP_TIME_VSDB,4,2 ## @P2P_DEFAULT_SLEEP_TIME_VSDB
L_.str.3:                               ## @.str.3
	.asciz	"Completed search/listen peer_chan=%d\n"

	.no_dead_strip	_brcmf_p2p_af_searching_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_p2p_af_searching_channel
_brcmf_p2p_af_searching_channel:        ; @brcmf_p2p_af_searching_channel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x0
Lloh0:
	adrp	x25, _TRACE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _TRACE@GOTPAGEOFF]
	ldr	w0, [x25]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_brcmf_dbg
	ldr	x8, [x19, #8]
Lloh4:
	adrp	x9, _P2PAPI_BSSCFG_PRIMARY@GOTPAGE
Lloh5:
	ldr	x9, [x9, _P2PAPI_BSSCFG_PRIMARY@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	ldr	x20, [x8, x9, lsl #3]
	add	x21, x19, #48
	mov	x0, x21
	bl	_reinit_completion
Lloh7:
	adrp	x26, _BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL@GOTPAGE
Lloh8:
	ldr	x26, [x26, _BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL@GOTPAGEOFF]
	ldr	w0, [x26]
	mov	x1, x19
	bl	_set_bit
	mov	w8, #1
	str	w8, [x19, #16]
Lloh9:
	adrp	x28, _P2P_INVALID_CHANNEL@GOTPAGE
Lloh10:
	ldr	x28, [x28, _P2P_INVALID_CHANNEL@GOTPAGEOFF]
	ldr	x8, [x28]
	str	x8, [x19, #24]
Lloh11:
	adrp	x24, _P2P_CHANNEL_SYNC_RETRY@GOTPAGE
Lloh12:
	ldr	x24, [x24, _P2P_CHANNEL_SYNC_RETRY@GOTPAGEOFF]
	ldr	x9, [x24]
	cmp	x9, #1
	b.lt	LBB0_14
; %bb.1:
	mov	x27, #0
	add	x22, x19, #52
Lloh13:
	adrp	x23, _P2P_AF_FRM_SCAN_MAX_WAIT@GOTPAGE
Lloh14:
	ldr	x23, [x23, _P2P_AF_FRM_SCAN_MAX_WAIT@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	str	wzr, [x19, #32]
	ldr	w0, [x25]
	str	x27, [sp]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_brcmf_dbg
	mov	x0, x22
	bl	_schedule_work
	ldr	w1, [x23]
	mov	x0, x21
	bl	_wait_for_completion_timeout
	ldr	x8, [x19, #24]
	ldr	x9, [x28]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x26]
	mov	x1, x19
	bl	_test_bit
	cbz	x0, LBB0_13
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x25]
	str	x8, [sp]
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_brcmf_dbg
	mov	w8, #1
	str	w8, [x19, #32]
	mov	x0, x22
	bl	_schedule_work
	ldr	w1, [x23]
	mov	x0, x21
	bl	_wait_for_completion_timeout
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #24]
	ldr	x9, [x28]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x26]
	mov	x1, x19
	bl	_test_bit
	cbz	x0, LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh19:
	adrp	x8, _BRCMF_VIF_STATUS_CONNECTED@GOTPAGE
Lloh20:
	ldr	x8, [x8, _BRCMF_VIF_STATUS_CONNECTED@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_test_bit
	cbnz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh22:
	adrp	x8, _BRCMF_VIF_STATUS_CONNECTING@GOTPAGE
Lloh23:
	ldr	x8, [x8, _BRCMF_VIF_STATUS_CONNECTING@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_test_bit
	cbz	x0, LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh25:
	adrp	x8, _P2P_DEFAULT_SLEEP_TIME_VSDB@GOTPAGE
Lloh26:
	ldr	x8, [x8, _P2P_DEFAULT_SLEEP_TIME_VSDB@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
	bl	_msleep
LBB0_11:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x27, x27, #1
	ldr	x8, [x24]
	cmp	x27, x8
	b.ge	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, #24]
	ldr	x9, [x28]
	cmp	x8, x9
	b.eq	LBB0_2
LBB0_13:
	ldr	x8, [x19, #24]
LBB0_14:
	ldr	w0, [x25]
	str	x8, [sp]
Lloh28:
	adrp	x1, l_.str.3@PAGE
Lloh29:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_brcmf_dbg
	str	wzr, [x19, #16]
	ldr	w0, [x26]
	mov	x1, x19
	bl	_clear_bit
	ldr	x0, [x19, #24]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_TRACE,4,2                      ; @TRACE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enter\n"

	.comm	_P2PAPI_BSSCFG_PRIMARY,8,3      ; @P2PAPI_BSSCFG_PRIMARY
	.comm	_BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL,4,2 ; @BRCMF_P2P_STATUS_FINDING_COMMON_CHANNEL
	.comm	_P2P_INVALID_CHANNEL,8,3        ; @P2P_INVALID_CHANNEL
	.comm	_P2P_CHANNEL_SYNC_RETRY,8,3     ; @P2P_CHANNEL_SYNC_RETRY
l_.str.1:                               ; @.str.1
	.asciz	"Scheduling action frame for sending.. (%d)\n"

	.comm	_P2P_AF_FRM_SCAN_MAX_WAIT,4,2   ; @P2P_AF_FRM_SCAN_MAX_WAIT
l_.str.2:                               ; @.str.2
	.asciz	"Scheduling listen peer, channel=%d\n"

	.comm	_BRCMF_VIF_STATUS_CONNECTED,4,2 ; @BRCMF_VIF_STATUS_CONNECTED
	.comm	_BRCMF_VIF_STATUS_CONNECTING,4,2 ; @BRCMF_VIF_STATUS_CONNECTING
	.comm	_P2P_DEFAULT_SLEEP_TIME_VSDB,4,2 ; @P2P_DEFAULT_SLEEP_TIME_VSDB
l_.str.3:                               ; @.str.3
	.asciz	"Completed search/listen peer_chan=%d\n"

	.no_dead_strip	_brcmf_p2p_af_searching_channel
.subsections_via_symbols
