	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wpa_supplicant_remove_network  ## -- Begin function wpa_supplicant_remove_network
	.p2align	4, 0x90
_wpa_supplicant_remove_network:         ## @wpa_supplicant_remove_network
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	24(%rdi), %edi
	callq	_wpa_config_get_network
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_wpas_notify_network_removed
	cmpq	%rbx, 56(%r15)
	jne	LBB0_4
## %bb.3:
	movq	$0, 56(%r15)
LBB0_4:
	movq	40(%r15), %rax
	cmpq	%rax, %rbx
	je	LBB0_6
## %bb.5:
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	cmpq	%rax, %rbx
	jne	LBB0_11
	jmp	LBB0_8
LBB0_1:
	movl	$-1, %ebx
	jmp	LBB0_16
LBB0_6:
	movl	28(%r15), %edi
	callq	_eapol_sm_invalidate_cached_session
	movq	40(%r15), %rax
	cmpq	%rax, %rbx
	jne	LBB0_11
LBB0_8:
	movl	32(%r15), %edi
	xorl	%esi, %esi
	callq	_wpa_sm_set_config
	movl	28(%r15), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_eapol_sm_notify_config
	movq	(%r15), %rax
	movq	_WPA_AUTHENTICATING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_10
## %bb.9:
	movl	$1, 8(%r15)
LBB0_10:
	movq	_WLAN_REASON_DEAUTH_LEAVING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_wpa_supplicant_deauthenticate
LBB0_11:
	movl	(%rbx), %r12d
	movl	24(%r15), %edi
	movl	%r14d, %esi
	callq	_wpa_config_remove_network
	testq	%rax, %rax
	js	LBB0_12
## %bb.13:
	xorl	%ebx, %ebx
	testl	%r12d, %r12d
	jne	LBB0_16
## %bb.14:
	cmpq	$0, 16(%r15)
	je	LBB0_16
## %bb.15:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	movq	%r15, %rdi
	callq	_wpa_supplicant_cancel_sched_scan
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_wpa_supplicant_req_scan
	jmp	LBB0_16
LBB0_12:
	movl	$-2, %ebx
LBB0_16:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WPA_AUTHENTICATING,8,3         ## @WPA_AUTHENTICATING
	.comm	_WLAN_REASON_DEAUTH_LEAVING,4,2 ## @WLAN_REASON_DEAUTH_LEAVING
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Stop ongoing sched_scan to remove network from filters"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wpa_supplicant_remove_network  ; -- Begin function wpa_supplicant_remove_network
	.p2align	2
_wpa_supplicant_remove_network:         ; @wpa_supplicant_remove_network
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	w0, [x0, #24]
	bl	_wpa_config_get_network
	cbz	x0, LBB0_14
; %bb.1:
	mov	x21, x0
	mov	x0, x19
	mov	x1, x21
	bl	_wpas_notify_network_removed
	ldr	x8, [x19, #56]
	cmp	x8, x21
	b.ne	LBB0_3
; %bb.2:
	str	xzr, [x19, #56]
LBB0_3:
	ldr	x8, [x19, #40]
	cmp	x21, x8
	ccmp	x8, #0, #4, ne
	b.ne	LBB0_5
; %bb.4:
	ldr	w0, [x19, #28]
	bl	_eapol_sm_invalidate_cached_session
	ldr	x8, [x19, #40]
LBB0_5:
	cmp	x21, x8
	b.ne	LBB0_9
; %bb.6:
	ldr	w0, [x19, #32]
	mov	x1, #0
	bl	_wpa_sm_set_config
	ldr	w0, [x19, #28]
	mov	x1, #0
	mov	x2, #0
	bl	_eapol_sm_notify_config
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _WPA_AUTHENTICATING@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WPA_AUTHENTICATING@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_8
; %bb.7:
	mov	w8, #1
	str	w8, [x19, #8]
LBB0_8:
Lloh3:
	adrp	x8, _WLAN_REASON_DEAUTH_LEAVING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WLAN_REASON_DEAUTH_LEAVING@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_wpa_supplicant_deauthenticate
LBB0_9:
	ldr	w21, [x21]
	ldr	w0, [x19, #24]
	mov	x1, x20
	bl	_wpa_config_remove_network
	tbnz	x0, #63, LBB0_15
; %bb.10:
	cbnz	w21, LBB0_13
; %bb.11:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_13
; %bb.12:
Lloh6:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	mov	x0, x19
	bl	_wpa_supplicant_cancel_sched_scan
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_wpa_supplicant_req_scan
LBB0_13:
	mov	w0, #0
	b	LBB0_16
LBB0_14:
	mov	w0, #-1
	b	LBB0_16
LBB0_15:
	mov	w0, #-2
LBB0_16:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_WPA_AUTHENTICATING,8,3         ; @WPA_AUTHENTICATING
	.comm	_WLAN_REASON_DEAUTH_LEAVING,4,2 ; @WLAN_REASON_DEAUTH_LEAVING
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Stop ongoing sched_scan to remove network from filters"

.subsections_via_symbols
