	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scan_and_wait
_scan_and_wait:                         ## @scan_and_wait
	.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
	subq	$2136, %rsp                     ## imm = 0x858
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_PF_ROUTE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	testl	%eax, %eax
	js	LBB0_1
## %bb.3:
	movl	%eax, %ebx
	leaq	-2136(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movl	-2104(%rbp), %edi
	movq	_name@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edx
	callq	_strlcpy
	movq	_IEEE80211_IOC_SCAN_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -2108(%rbp)
	leaq	-2176(%rbp), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movq	_IEEE80211_IOC_SCAN_ACTIVE@GOTPCREL(%rip), %rax
	movq	_IEEE80211_IOC_SCAN_BGSCAN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_IEEE80211_IOC_SCAN_NOPICK@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_IEEE80211_IOC_SCAN_ONCE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, -2176(%rbp)
	movq	_IEEE80211_IOC_SCAN_FOREVER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -2152(%rbp)
	movq	$0, -2160(%rbp)
	movq	%r12, -2128(%rbp)
	movl	$40, -2132(%rbp)
	movq	_SIOCS80211@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	movq	%r15, %rdx
	callq	_ioctl
	testq	%rax, %rax
	jne	LBB0_10
## %bb.4:
	leaq	-2096(%rbp), %r14
	movq	_RTM_VERSION@GOTPCREL(%rip), %r15
	movq	_RTM_IEEE80211@GOTPCREL(%rip), %r12
	movq	_RTM_IEEE80211_SCAN@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movq	%r14, %rsi
	movl	$2048, %edx                     ## imm = 0x800
	callq	_read
	testq	%rax, %rax
	js	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-2088(%rbp), %rax
	cmpq	(%r15), %rax
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-2096(%rbp), %rax
	cmpq	(%r12), %rax
	jne	LBB0_5
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpq	(%r13), %rax
	jne	LBB0_5
LBB0_10:
	movl	%ebx, %edi
	callq	_close
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	addq	$2136, %rsp                     ## imm = 0x858
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.2:
	leaq	L_.str(%rip), %rdi
	addq	$2136, %rsp                     ## imm = 0x858
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_perror                         ## TAILCALL
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	callq	_perror
	jmp	LBB0_10
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PF_ROUTE,4,2                   ## @PF_ROUTE
	.comm	_SOCK_RAW,4,2                   ## @SOCK_RAW
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"socket(PF_ROUTE,SOCK_RAW)"

	.comm	_name,4,2                       ## @name
	.comm	_IEEE80211_IOC_SCAN_REQ,4,2     ## @IEEE80211_IOC_SCAN_REQ
	.comm	_IEEE80211_IOC_SCAN_ACTIVE,4,2  ## @IEEE80211_IOC_SCAN_ACTIVE
	.comm	_IEEE80211_IOC_SCAN_BGSCAN,4,2  ## @IEEE80211_IOC_SCAN_BGSCAN
	.comm	_IEEE80211_IOC_SCAN_NOPICK,4,2  ## @IEEE80211_IOC_SCAN_NOPICK
	.comm	_IEEE80211_IOC_SCAN_ONCE,4,2    ## @IEEE80211_IOC_SCAN_ONCE
	.comm	_IEEE80211_IOC_SCAN_FOREVER,4,2 ## @IEEE80211_IOC_SCAN_FOREVER
	.comm	_SIOCS80211,4,2                 ## @SIOCS80211
L_.str.1:                               ## @.str.1
	.asciz	"read(PF_ROUTE)"

	.comm	_RTM_VERSION,8,3                ## @RTM_VERSION
	.comm	_RTM_IEEE80211,8,3              ## @RTM_IEEE80211
	.comm	_RTM_IEEE80211_SCAN,8,3         ## @RTM_IEEE80211_SCAN
	.no_dead_strip	_scan_and_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scan_and_wait
_scan_and_wait:                         ; @scan_and_wait
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -56
	.cfi_offset w28, -64
	sub	sp, sp, #2144
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _PF_ROUTE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PF_ROUTE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _SOCK_RAW@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SOCK_RAW@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	tbnz	w0, #31, LBB0_8
; %bb.1:
	mov	x19, x0
	mov	w21, #40
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	ldr	w0, [sp, #40]
Lloh9:
	adrp	x8, _name@GOTPAGE
Lloh10:
	ldr	x8, [x8, _name@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	w2, #4
	bl	_strlcpy
Lloh12:
	adrp	x8, _IEEE80211_IOC_SCAN_REQ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IEEE80211_IOC_SCAN_REQ@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [sp, #36]
	add	x22, sp, #48
	add	x0, sp, #48
	mov	w1, #0
	mov	w2, #40
	bl	_memset
Lloh15:
	adrp	x8, _IEEE80211_IOC_SCAN_ACTIVE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IEEE80211_IOC_SCAN_ACTIVE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _IEEE80211_IOC_SCAN_BGSCAN@GOTPAGE
Lloh19:
	ldr	x9, [x9, _IEEE80211_IOC_SCAN_BGSCAN@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
Lloh21:
	adrp	x10, _IEEE80211_IOC_SCAN_NOPICK@GOTPAGE
Lloh22:
	ldr	x10, [x10, _IEEE80211_IOC_SCAN_NOPICK@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh23:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh24:
	adrp	x9, _IEEE80211_IOC_SCAN_ONCE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _IEEE80211_IOC_SCAN_ONCE@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [sp, #48]
Lloh27:
	adrp	x8, _IEEE80211_IOC_SCAN_FOREVER@GOTPAGE
Lloh28:
	ldr	x8, [x8, _IEEE80211_IOC_SCAN_FOREVER@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	str	w8, [sp, #72]
	str	xzr, [sp, #64]
	str	x22, [sp, #16]
	str	w21, [sp, #12]
Lloh30:
	adrp	x8, _SIOCS80211@GOTPAGE
Lloh31:
	ldr	x8, [x8, _SIOCS80211@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	bl	_ioctl
	cbnz	x0, LBB0_6
; %bb.2:
Lloh33:
	adrp	x20, _RTM_VERSION@GOTPAGE
Lloh34:
	ldr	x20, [x20, _RTM_VERSION@GOTPAGEOFF]
Lloh35:
	adrp	x21, _RTM_IEEE80211@GOTPAGE
Lloh36:
	ldr	x21, [x21, _RTM_IEEE80211@GOTPAGEOFF]
Lloh37:
	adrp	x22, _RTM_IEEE80211_SCAN@GOTPAGE
Lloh38:
	ldr	x22, [x22, _RTM_IEEE80211_SCAN@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #88
	mov	x0, x19
	mov	w2, #2048
	bl	_read
	tbnz	x0, #63, LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #96]
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #88]
	ldr	x9, [x21]
	ldr	x10, [x22]
	cmp	x8, x9
	ccmp	x8, x10, #0, eq
	b.ne	LBB0_3
LBB0_6:
	mov	x0, x19
	bl	_close
	ldur	x8, [x29, #-56]
Lloh39:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh40:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh41:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.7:
	add	sp, sp, #2144
	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
	ldp	x28, x27, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_8:
	ldur	x8, [x29, #-56]
Lloh42:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh43:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh44:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.9:
Lloh45:
	adrp	x0, l_.str@PAGE
Lloh46:
	add	x0, x0, l_.str@PAGEOFF
	add	sp, sp, #2144
	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
	ldp	x28, x27, [sp], #64             ; 16-byte Folded Reload
	b	_perror
LBB0_10:
Lloh47:
	adrp	x0, l_.str.1@PAGE
Lloh48:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror
	b	LBB0_6
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_PF_ROUTE,4,2                   ; @PF_ROUTE
	.comm	_SOCK_RAW,4,2                   ; @SOCK_RAW
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"socket(PF_ROUTE,SOCK_RAW)"

	.comm	_name,4,2                       ; @name
	.comm	_IEEE80211_IOC_SCAN_REQ,4,2     ; @IEEE80211_IOC_SCAN_REQ
	.comm	_IEEE80211_IOC_SCAN_ACTIVE,4,2  ; @IEEE80211_IOC_SCAN_ACTIVE
	.comm	_IEEE80211_IOC_SCAN_BGSCAN,4,2  ; @IEEE80211_IOC_SCAN_BGSCAN
	.comm	_IEEE80211_IOC_SCAN_NOPICK,4,2  ; @IEEE80211_IOC_SCAN_NOPICK
	.comm	_IEEE80211_IOC_SCAN_ONCE,4,2    ; @IEEE80211_IOC_SCAN_ONCE
	.comm	_IEEE80211_IOC_SCAN_FOREVER,4,2 ; @IEEE80211_IOC_SCAN_FOREVER
	.comm	_SIOCS80211,4,2                 ; @SIOCS80211
l_.str.1:                               ; @.str.1
	.asciz	"read(PF_ROUTE)"

	.comm	_RTM_VERSION,8,3                ; @RTM_VERSION
	.comm	_RTM_IEEE80211,8,3              ; @RTM_IEEE80211
	.comm	_RTM_IEEE80211_SCAN,8,3         ; @RTM_IEEE80211_SCAN
	.no_dead_strip	_scan_and_wait
.subsections_via_symbols
