	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wl3501_mgmt_scan_confirm
_wl3501_mgmt_scan_confirm:              ## @wl3501_mgmt_scan_confirm
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rdi
	callq	_pr_debug
	leaq	-56(%rbp), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$40, %ecx
	callq	_wl3501_get_from_wla
	movq	-56(%rbp), %rax
	movq	_WL3501_STATUS_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_debug
	movq	(%r14), %rax
	movq	_IW_MODE_INFRA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	_WL3501_MGMT_CAPABILITY_ESS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, -48(%rbp)
	jne	LBB0_6
LBB0_3:
	movq	_IW_MODE_ADHOC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movq	_WL3501_MGMT_CAPABILITY_IBSS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, -48(%rbp)
	jne	LBB0_6
LBB0_5:
	movq	_IW_MODE_AUTO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_30
LBB0_6:
	movl	48(%r14), %edx
	testl	%edx, %edx
	je	LBB0_12
## %bb.7:
	cmpl	$3, %edx
	jne	LBB0_10
## %bb.8:
	movl	52(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	$3, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_12
## %bb.9:
	movl	48(%r14), %edx
LBB0_10:
	cmpl	-24(%rbp), %edx
	jne	LBB0_30
## %bb.11:
	movl	52(%r14), %edi
	movq	-32(%rbp), %rsi
	callq	_memcmp
	testq	%rax, %rax
	jne	LBB0_30
LBB0_12:
	cmpq	$0, 8(%r14)
	je	LBB0_13
## %bb.14:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	40(%r14), %rax
	movl	4(%rax,%rbx,8), %edi
	movl	-36(%rbp), %esi
	callq	_ether_addr_equal_unaligned
	testq	%rax, %rax
	jne	LBB0_30
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	incq	%rbx
	cmpq	8(%r14), %rbx
	jb	LBB0_15
## %bb.17:
	leaq	-1(%rbx), %rax
	cmpq	$18, %rax
	jbe	LBB0_18
	jmp	LBB0_30
LBB0_19:
	movq	_WL3501_STATUS_TIMEOUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_30
## %bb.20:
	leaq	L_.str.3(%rip), %rdi
	callq	_pr_debug
	movq	$0, 16(%r14)
	cmpq	$0, 8(%r14)
	je	LBB0_26
## %bb.21:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_wl3501_mgmt_join
	testl	%eax, %eax
	je	LBB0_23
## %bb.24:                              ##   in Loop: Header=BB0_22 Depth=1
	incq	%rbx
	movq	8(%r14), %rax
	cmpq	%rax, %rbx
	jb	LBB0_22
	jmp	LBB0_25
LBB0_23:
	movq	8(%r14), %rax
LBB0_25:
	movq	%rbx, 16(%r14)
	cmpq	%rax, %rbx
	jne	LBB0_30
LBB0_26:
	movq	(%r14), %rax
	movq	_IW_MODE_INFRA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_29
## %bb.27:
	movq	24(%r14), %rax
	leaq	1(%rax), %rcx
	movq	%rcx, 24(%r14)
	movq	_WL3501_MAX_ADHOC_TRIES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_28
LBB0_29:
	movq	%r14, %rdi
	movl	$100, %esi
	callq	_wl3501_mgmt_scan
	jmp	LBB0_30
LBB0_13:
	xorl	%ebx, %ebx
LBB0_18:
	shlq	$3, %rbx
	addq	40(%r14), %rbx
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$73, %edx
	callq	_memcpy
	incq	8(%r14)
	movl	-44(%rbp), %eax
	movl	%eax, 32(%r14)
	jmp	LBB0_30
LBB0_28:
	movq	%r14, %rdi
	callq	_wl3501_mgmt_start
LBB0_30:
	addq	$48, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"entry"

	.comm	_WL3501_STATUS_SUCCESS,8,3      ## @WL3501_STATUS_SUCCESS
L_.str.1:                               ## @.str.1
	.asciz	"success"

	.comm	_IW_MODE_INFRA,8,3              ## @IW_MODE_INFRA
	.comm	_WL3501_MGMT_CAPABILITY_ESS,4,2 ## @WL3501_MGMT_CAPABILITY_ESS
	.comm	_IW_MODE_ADHOC,8,3              ## @IW_MODE_ADHOC
	.comm	_WL3501_MGMT_CAPABILITY_IBSS,4,2 ## @WL3501_MGMT_CAPABILITY_IBSS
	.comm	_IW_MODE_AUTO,8,3               ## @IW_MODE_AUTO
L_.str.2:                               ## @.str.2
	.asciz	"ANY"

	.comm	_WL3501_STATUS_TIMEOUT,8,3      ## @WL3501_STATUS_TIMEOUT
L_.str.3:                               ## @.str.3
	.asciz	"timeout"

	.comm	_WL3501_MAX_ADHOC_TRIES,8,3     ## @WL3501_MAX_ADHOC_TRIES
	.no_dead_strip	_wl3501_mgmt_scan_confirm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wl3501_mgmt_scan_confirm
_wl3501_mgmt_scan_confirm:              ; @wl3501_mgmt_scan_confirm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x20
	mov	w3, #40
	bl	_wl3501_get_from_wla
	ldr	x8, [sp, #8]
Lloh2:
	adrp	x9, _WL3501_STATUS_SUCCESS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _WL3501_STATUS_SUCCESS@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.1:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
	ldr	x8, [x19]
Lloh7:
	adrp	x9, _IW_MODE_INFRA@GOTPAGE
Lloh8:
	ldr	x9, [x9, _IW_MODE_INFRA@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	ldr	w9, [sp, #16]
Lloh10:
	adrp	x10, _WL3501_MGMT_CAPABILITY_ESS@GOTPAGE
Lloh11:
	ldr	x10, [x10, _WL3501_MGMT_CAPABILITY_ESS@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	tst	w10, w9
	b.ne	LBB0_11
LBB0_3:
Lloh13:
	adrp	x9, _IW_MODE_ADHOC@GOTPAGE
Lloh14:
	ldr	x9, [x9, _IW_MODE_ADHOC@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.4:
	ldr	w9, [sp, #16]
Lloh16:
	adrp	x10, _WL3501_MGMT_CAPABILITY_IBSS@GOTPAGE
Lloh17:
	ldr	x10, [x10, _WL3501_MGMT_CAPABILITY_IBSS@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	and	w9, w10, w9
Lloh19:
	adrp	x10, _IW_MODE_AUTO@GOTPAGE
Lloh20:
	ldr	x10, [x10, _IW_MODE_AUTO@GOTPAGEOFF]
Lloh21:
	ldr	x10, [x10]
	cmp	w9, #0
	ccmp	x8, x10, #4, eq
	b.eq	LBB0_11
	b	LBB0_30
LBB0_5:
Lloh22:
	adrp	x9, _WL3501_STATUS_TIMEOUT@GOTPAGE
Lloh23:
	ldr	x9, [x9, _WL3501_STATUS_TIMEOUT@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_30
; %bb.6:
Lloh25:
	adrp	x0, l_.str.3@PAGE
Lloh26:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_debug
	str	xzr, [x19, #16]
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_26
; %bb.7:
	mov	x20, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_wl3501_mgmt_join
	cbz	w0, LBB0_24
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x20, x20, #1
	ldr	x8, [x19, #8]
	cmp	x20, x8
	b.lo	LBB0_8
	b	LBB0_25
LBB0_10:
Lloh27:
	adrp	x9, _IW_MODE_AUTO@GOTPAGE
Lloh28:
	ldr	x9, [x9, _IW_MODE_AUTO@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_30
LBB0_11:
	ldr	w2, [x19, #48]
	cbz	w2, LBB0_17
; %bb.12:
	cmp	w2, #3
	b.ne	LBB0_15
; %bb.13:
	ldr	w0, [x19, #52]
Lloh30:
	adrp	x1, l_.str.2@PAGE
Lloh31:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_memcmp
	cbz	x0, LBB0_17
; %bb.14:
	ldr	w2, [x19, #48]
LBB0_15:
	ldr	w8, [sp, #40]
	cmp	w2, w8
	b.ne	LBB0_30
; %bb.16:
	ldr	w0, [x19, #52]
	ldr	x1, [sp, #32]
	bl	_memcmp
	cbnz	x0, LBB0_30
LBB0_17:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_23
; %bb.18:
	mov	x21, #-1
	mov	w20, #4
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #40]
	ldr	w0, [x8, x20]
	ldr	w1, [sp, #28]
	bl	_ether_addr_equal_unaligned
	cbnz	x0, LBB0_30
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	ldr	x9, [x19, #8]
	add	x8, x21, #1
	add	x10, x21, #2
	add	x20, x20, #8
	mov	x21, x8
	cmp	x10, x9
	b.lo	LBB0_19
; %bb.21:
	cmp	x8, #18
	b.hi	LBB0_30
; %bb.22:
	add	x8, x8, #1
LBB0_23:
	ldr	x9, [x19, #40]
	add	x0, x9, x8, lsl #3
	add	x8, sp, #8
	add	x1, x8, #16
	mov	w2, #73
	bl	_memcpy
	ldr	x8, [x19, #8]
	add	x8, x8, #1
	str	x8, [x19, #8]
	ldr	w8, [sp, #20]
	str	w8, [x19, #32]
	b	LBB0_30
LBB0_24:
	ldr	x8, [x19, #8]
LBB0_25:
	str	x20, [x19, #16]
	cmp	x20, x8
	b.ne	LBB0_30
LBB0_26:
	ldr	x8, [x19]
Lloh32:
	adrp	x9, _IW_MODE_INFRA@GOTPAGE
Lloh33:
	ldr	x9, [x9, _IW_MODE_INFRA@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_28
; %bb.27:
	ldr	x8, [x19, #24]
	add	x9, x8, #1
	str	x9, [x19, #24]
Lloh35:
	adrp	x9, _WL3501_MAX_ADHOC_TRIES@GOTPAGE
Lloh36:
	ldr	x9, [x9, _WL3501_MAX_ADHOC_TRIES@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_29
LBB0_28:
	mov	x0, x19
	mov	w1, #100
	bl	_wl3501_mgmt_scan
	b	LBB0_30
LBB0_29:
	mov	x0, x19
	bl	_wl3501_mgmt_start
LBB0_30:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"entry"

	.comm	_WL3501_STATUS_SUCCESS,8,3      ; @WL3501_STATUS_SUCCESS
l_.str.1:                               ; @.str.1
	.asciz	"success"

	.comm	_IW_MODE_INFRA,8,3              ; @IW_MODE_INFRA
	.comm	_WL3501_MGMT_CAPABILITY_ESS,4,2 ; @WL3501_MGMT_CAPABILITY_ESS
	.comm	_IW_MODE_ADHOC,8,3              ; @IW_MODE_ADHOC
	.comm	_WL3501_MGMT_CAPABILITY_IBSS,4,2 ; @WL3501_MGMT_CAPABILITY_IBSS
	.comm	_IW_MODE_AUTO,8,3               ; @IW_MODE_AUTO
l_.str.2:                               ; @.str.2
	.asciz	"ANY"

	.comm	_WL3501_STATUS_TIMEOUT,8,3      ; @WL3501_STATUS_TIMEOUT
l_.str.3:                               ; @.str.3
	.asciz	"timeout"

	.comm	_WL3501_MAX_ADHOC_TRIES,8,3     ; @WL3501_MAX_ADHOC_TRIES
	.no_dead_strip	_wl3501_mgmt_scan_confirm
.subsections_via_symbols
