	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wpa_driver_ndis_scan
_wpa_driver_ndis_scan:                  ## @wpa_driver_ndis_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	cmpq	$0, 8(%rdi)
	je	LBB0_1
## %bb.6:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wpa_driver_ndis_scan_native80211 ## TAILCALL
LBB0_1:
	cmpl	$0, (%rbx)
	jne	LBB0_5
## %bb.2:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	movq	%rbx, %rdi
	callq	_wpa_driver_ndis_disconnect
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_wpa_printf
LBB0_4:
	movl	$1, (%rbx)
LBB0_5:
	movq	_OID_802_11_BSSID_LIST_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%rbx, %rdi
	movl	$4, %ecx
	callq	_ndis_set_oid
	movl	%eax, %r14d
	movq	_wpa_driver_ndis_scan_timeout@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	4(%rbx), %edx
	movq	%rbx, %rsi
	callq	_eloop_cancel_timeout
	movl	(%r15), %edx
	movl	4(%rbx), %r8d
	movl	$7, %edi
	xorl	%esi, %esi
	movq	%rbx, %rcx
	callq	_eloop_register_timeout
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	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	"NDIS: turning radio on before the first scan"

L_.str.1:                               ## @.str.1
	.asciz	"NDIS: failed to enable radio"

	.comm	_OID_802_11_BSSID_LIST_SCAN,4,2 ## @OID_802_11_BSSID_LIST_SCAN
L_.str.2:                               ## @.str.2
	.asciz	"    "

	.comm	_wpa_driver_ndis_scan_timeout,4,2 ## @wpa_driver_ndis_scan_timeout
	.no_dead_strip	_wpa_driver_ndis_scan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wpa_driver_ndis_scan
_wpa_driver_ndis_scan:                  ; @wpa_driver_ndis_scan
	.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	x19, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	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
	b	_wpa_driver_ndis_scan_native80211
LBB0_2:
	ldr	w8, [x19]
	cbnz	w8, LBB0_6
; %bb.3:
Lloh0:
	adrp	x20, _MSG_DEBUG@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	mov	x0, x19
	bl	_wpa_driver_ndis_disconnect
	tbz	x0, #63, LBB0_5
; %bb.4:
	ldr	w0, [x20]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
LBB0_5:
	mov	w8, #1
	str	w8, [x19]
LBB0_6:
Lloh6:
	adrp	x8, _OID_802_11_BSSID_LIST_SCAN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OID_802_11_BSSID_LIST_SCAN@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str.2@PAGE
Lloh10:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	w3, #4
	bl	_ndis_set_oid
	mov	x20, x0
Lloh11:
	adrp	x21, _wpa_driver_ndis_scan_timeout@GOTPAGE
Lloh12:
	ldr	x21, [x21, _wpa_driver_ndis_scan_timeout@GOTPAGEOFF]
	ldr	w0, [x21]
	ldr	w2, [x19, #4]
	mov	x1, x19
	bl	_eloop_cancel_timeout
	ldr	w2, [x21]
	ldr	w4, [x19, #4]
	mov	w0, #7
	mov	w1, #0
	mov	x3, x19
	bl	_eloop_register_timeout
	mov	x0, x20
	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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NDIS: turning radio on before the first scan"

l_.str.1:                               ; @.str.1
	.asciz	"NDIS: failed to enable radio"

	.comm	_OID_802_11_BSSID_LIST_SCAN,4,2 ; @OID_802_11_BSSID_LIST_SCAN
l_.str.2:                               ; @.str.2
	.asciz	"    "

	.comm	_wpa_driver_ndis_scan_timeout,4,2 ; @wpa_driver_ndis_scan_timeout
	.no_dead_strip	_wpa_driver_ndis_scan
.subsections_via_symbols
