	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wpas_select_network_from_last_scan
_wpas_select_network_from_last_scan:    ## @wpas_select_network_from_last_scan
	.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, %r12d
	movl	%esi, %r15d
	movq	%rdi, %r13
	movq	$0, -48(%rbp)
	callq	_wpas_reenabled_network_time
	testl	%eax, %eax
	jle	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%r14d, %r14d
	movq	%r13, %rdi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_wpa_dbg
	movq	_wpas_network_reenabled@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_eloop_cancel_timeout
	movl	(%r15), %edx
	movl	%ebx, %edi
	xorl	%esi, %esi
	movq	%r13, %rcx
	xorl	%r8d, %r8d
	callq	_eloop_register_timeout
	jmp	LBB0_19
LBB0_2:
	xorl	%r14d, %r14d
	cmpq	$0, 88(%r13)
	jne	LBB0_19
## %bb.3:
	movq	$0, 32(%r13)
	leaq	-48(%rbp), %rsi
	movq	%r13, %rdi
	callq	_wpa_supplicant_pick_network
	testq	%rax, %rax
	je	LBB0_13
## %bb.4:
	movq	%rax, %rbx
	movq	-48(%rbp), %rdx
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_wpa_supplicant_need_to_roam
	testl	%eax, %eax
	je	LBB0_5
## %bb.7:
	movq	-48(%rbp), %rdx
	cmpq	72(%r13), %rdx
	je	LBB0_10
## %bb.8:
	movq	(%r13), %rax
	movq	_WPA_AUTHENTICATING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_10
## %bb.9:
	movl	$1, 8(%r13)
	movq	_WLAN_REASON_DEAUTH_LEAVING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_wpa_supplicant_deauthenticate
	movq	-48(%rbp), %rdx
LBB0_10:
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_wpa_supplicant_connect
	testq	%rax, %rax
	js	LBB0_11
## %bb.12:
	movl	$1, %r14d
	jmp	LBB0_5
LBB0_13:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	L_.str.2(%rip), %rdx
	xorl	%r14d, %r14d
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_wpa_dbg
	movq	%r13, %rdi
	callq	_wpa_supplicant_pick_new_network
	movq	%rax, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movl	(%rbx), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_wpa_dbg
	movq	-48(%rbp), %rdx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_wpa_supplicant_associate
LBB0_5:
	testl	%r15d, %r15d
	je	LBB0_19
## %bb.6:
	movq	%r13, %rdi
	callq	_wpa_supplicant_rsn_preauth_scan_results
	jmp	LBB0_19
LBB0_11:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_wpa_dbg
	movl	$-1, %r14d
	jmp	LBB0_19
LBB0_15:
	testl	%r12d, %r12d
	je	LBB0_19
## %bb.16:
	movl	12(%r13), %ebx
	movq	%r13, %rdi
	callq	_wpa_supplicant_req_sched_scan
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movq	%r13, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_wpa_supplicant_req_new_scan
LBB0_18:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_WPA_EVENT_NETWORK_NOT_FOUND@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_wpa_msg_ctrl
LBB0_19:
	movl	%r14d, %eax
	addq	$8, %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	"Postpone network selection by %d seconds since all networks are disabled"

	.comm	_wpas_network_reenabled,4,2     ## @wpas_network_reenabled
	.comm	_WPA_AUTHENTICATING,8,3         ## @WPA_AUTHENTICATING
	.comm	_WLAN_REASON_DEAUTH_LEAVING,4,2 ## @WLAN_REASON_DEAUTH_LEAVING
L_.str.1:                               ## @.str.1
	.asciz	"Connect failed"

L_.str.2:                               ## @.str.2
	.asciz	"No suitable network found"

L_.str.3:                               ## @.str.3
	.asciz	"Setup a new network"

	.comm	_MSG_INFO,4,2                   ## @MSG_INFO
	.comm	_WPA_EVENT_NETWORK_NOT_FOUND,4,2 ## @WPA_EVENT_NETWORK_NOT_FOUND
	.no_dead_strip	_wpas_select_network_from_last_scan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wpas_select_network_from_last_scan
_wpas_select_network_from_last_scan:    ; @wpas_select_network_from_last_scan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x22, x2
	mov	x20, x1
	mov	x19, x0
	str	xzr, [sp, #8]
	bl	_wpas_reenabled_network_time
	cmp	w0, #1
	b.lt	LBB0_2
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	str	x21, [sp]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_wpa_dbg
Lloh5:
	adrp	x20, _wpas_network_reenabled@GOTPAGE
Lloh6:
	ldr	x20, [x20, _wpas_network_reenabled@GOTPAGEOFF]
	ldr	w0, [x20]
	mov	x1, x19
	mov	x2, #0
	bl	_eloop_cancel_timeout
	ldr	w2, [x20]
	mov	x0, x21
	mov	w1, #0
	mov	x3, x19
	mov	x4, #0
	bl	_eloop_register_timeout
	b	LBB0_3
LBB0_2:
	ldr	x8, [x19, #88]
	cbz	x8, LBB0_5
LBB0_3:
	mov	w0, #0
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_5:
	str	xzr, [x19, #32]
	add	x1, sp, #8
	mov	x0, x19
	bl	_wpa_supplicant_pick_network
	cbz	x0, LBB0_13
; %bb.6:
	mov	x21, x0
	ldr	x2, [sp, #8]
	mov	x0, x19
	mov	x1, x21
	bl	_wpa_supplicant_need_to_roam
	cbz	w0, LBB0_15
; %bb.7:
	ldr	x2, [sp, #8]
	ldr	x8, [x19, #72]
	cmp	x2, x8
	b.eq	LBB0_10
; %bb.8:
	ldr	x8, [x19]
Lloh7:
	adrp	x9, _WPA_AUTHENTICATING@GOTPAGE
Lloh8:
	ldr	x9, [x9, _WPA_AUTHENTICATING@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_10
; %bb.9:
	mov	w8, #1
	str	w8, [x19, #8]
Lloh10:
	adrp	x8, _WLAN_REASON_DEAUTH_LEAVING@GOTPAGE
Lloh11:
	ldr	x8, [x8, _WLAN_REASON_DEAUTH_LEAVING@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_wpa_supplicant_deauthenticate
	ldr	x2, [sp, #8]
LBB0_10:
	mov	x0, x19
	mov	x1, x21
	bl	_wpa_supplicant_connect
	tbnz	x0, #63, LBB0_17
; %bb.11:
	cbz	w20, LBB0_22
; %bb.12:
	mov	x0, x19
	bl	_wpa_supplicant_rsn_preauth_scan_results
	mov	w0, #1
	b	LBB0_4
LBB0_13:
Lloh13:
	adrp	x21, _MSG_DEBUG@GOTPAGE
Lloh14:
	ldr	x21, [x21, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh15:
	adrp	x2, l_.str.2@PAGE
Lloh16:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_wpa_dbg
	mov	x0, x19
	bl	_wpa_supplicant_pick_new_network
	str	x0, [sp, #8]
	cbz	x0, LBB0_18
; %bb.14:
	ldr	w1, [x21]
Lloh17:
	adrp	x2, l_.str.3@PAGE
Lloh18:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_wpa_dbg
	ldr	x2, [sp, #8]
	mov	x0, x19
	mov	x1, #0
	bl	_wpa_supplicant_associate
LBB0_15:
	cbz	w20, LBB0_3
; %bb.16:
	mov	x0, x19
	bl	_wpa_supplicant_rsn_preauth_scan_results
	b	LBB0_3
LBB0_17:
Lloh19:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x2, l_.str.1@PAGE
Lloh23:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_wpa_dbg
	mov	w0, #-1
	b	LBB0_4
LBB0_18:
	cbz	w22, LBB0_3
; %bb.19:
	ldr	w20, [x19, #12]
	mov	x0, x19
	bl	_wpa_supplicant_req_sched_scan
	cbz	x0, LBB0_21
; %bb.20:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_wpa_supplicant_req_new_scan
LBB0_21:
Lloh24:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
Lloh27:
	adrp	x8, _WPA_EVENT_NETWORK_NOT_FOUND@GOTPAGE
Lloh28:
	ldr	x8, [x8, _WPA_EVENT_NETWORK_NOT_FOUND@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_wpa_msg_ctrl
	b	LBB0_3
LBB0_22:
	mov	w0, #1
	b	LBB0_4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Postpone network selection by %d seconds since all networks are disabled"

	.comm	_wpas_network_reenabled,4,2     ; @wpas_network_reenabled
	.comm	_WPA_AUTHENTICATING,8,3         ; @WPA_AUTHENTICATING
	.comm	_WLAN_REASON_DEAUTH_LEAVING,4,2 ; @WLAN_REASON_DEAUTH_LEAVING
l_.str.1:                               ; @.str.1
	.asciz	"Connect failed"

l_.str.2:                               ; @.str.2
	.asciz	"No suitable network found"

l_.str.3:                               ; @.str.3
	.asciz	"Setup a new network"

	.comm	_MSG_INFO,4,2                   ; @MSG_INFO
	.comm	_WPA_EVENT_NETWORK_NOT_FOUND,4,2 ; @WPA_EVENT_NETWORK_NOT_FOUND
	.no_dead_strip	_wpas_select_network_from_last_scan
.subsections_via_symbols
