	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ieee80211_ioctl_getscanresults
_ieee80211_ioctl_getscanresults:        ## @ieee80211_ioctl_getscanresults
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$15, (%rsi)
	ja	LBB0_2
## %bb.1:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_2:
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	$0, -56(%rbp)
	movq	_get_scan_space@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	callq	_ieee80211_scan_iterate
	movl	-56(%rbp), %ebx
	movl	(%r15), %eax
	cmpl	%eax, %ebx
	jle	LBB0_4
## %bb.3:
	movl	%eax, -56(%rbp)
	movl	%eax, %ebx
LBB0_4:
	testl	%ebx, %ebx
	jle	LBB0_7
## %bb.5:
	movq	_M_TEMP@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_IEEE80211_M_NOWAIT@GOTPCREL(%rip), %rax
	movq	_IEEE80211_M_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	%ebx, %edi
	callq	_IEEE80211_MALLOC
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	%rax, %r12
	movq	%rax, -48(%rbp)
	movq	_get_scan_result@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	movq	%r14, %rdi
	callq	_ieee80211_scan_iterate
	subl	-56(%rbp), %ebx
	movl	%ebx, (%r15)
	movl	4(%r15), %esi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_copyout
	movl	%eax, %ebx
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_IEEE80211_FREE
	jmp	LBB0_10
LBB0_7:
	movl	$0, (%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_get_scan_space,4,2             ## @get_scan_space
	.comm	_M_TEMP,4,2                     ## @M_TEMP
	.comm	_IEEE80211_M_NOWAIT,4,2         ## @IEEE80211_M_NOWAIT
	.comm	_IEEE80211_M_ZERO,4,2           ## @IEEE80211_M_ZERO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_get_scan_result,4,2            ## @get_scan_result
	.no_dead_strip	_ieee80211_ioctl_getscanresults
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ieee80211_ioctl_getscanresults
_ieee80211_ioctl_getscanresults:        ; @ieee80211_ioctl_getscanresults
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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 w23, -56
	.cfi_offset w24, -64
	ldr	w8, [x1]
	cmp	w8, #15
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EFAULT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_9
LBB0_2:
	mov	x19, x1
	mov	x20, x0
	str	wzr, [sp]
Lloh2:
	adrp	x8, _get_scan_space@GOTPAGE
Lloh3:
	ldr	x8, [x8, _get_scan_space@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x2, sp
	bl	_ieee80211_scan_iterate
	ldr	w21, [sp]
	ldr	w8, [x19]
	cmp	w21, w8
	b.le	LBB0_4
; %bb.3:
	str	w8, [sp]
	mov	x21, x8
LBB0_4:
	cmp	w21, #1
	b.lt	LBB0_7
; %bb.5:
Lloh5:
	adrp	x23, _M_TEMP@GOTPAGE
Lloh6:
	ldr	x23, [x23, _M_TEMP@GOTPAGEOFF]
Lloh7:
	adrp	x8, _IEEE80211_M_NOWAIT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IEEE80211_M_NOWAIT@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _IEEE80211_M_ZERO@GOTPAGE
Lloh11:
	ldr	x9, [x9, _IEEE80211_M_ZERO@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x21
	bl	_IEEE80211_MALLOC
	cbz	x0, LBB0_8
; %bb.6:
	mov	x22, x0
	str	x0, [sp, #8]
Lloh13:
	adrp	x8, _get_scan_result@GOTPAGE
Lloh14:
	ldr	x8, [x8, _get_scan_result@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x20
	bl	_ieee80211_scan_iterate
	ldr	w8, [sp]
	sub	w2, w21, w8
	str	w2, [x19]
	ldr	w1, [x19, #4]
	mov	x0, x22
	bl	_copyout
	mov	x20, x0
	ldr	w1, [x23]
	mov	x0, x22
	bl	_IEEE80211_FREE
	b	LBB0_10
LBB0_7:
	mov	w20, #0
	str	wzr, [x19]
	b	LBB0_10
LBB0_8:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_9:
	ldr	w20, [x8]
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_get_scan_space,4,2             ; @get_scan_space
	.comm	_M_TEMP,4,2                     ; @M_TEMP
	.comm	_IEEE80211_M_NOWAIT,4,2         ; @IEEE80211_M_NOWAIT
	.comm	_IEEE80211_M_ZERO,4,2           ; @IEEE80211_M_ZERO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_get_scan_result,4,2            ; @get_scan_result
	.no_dead_strip	_ieee80211_ioctl_getscanresults
.subsections_via_symbols
