	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wpa_driver_privsep_get_scan_results2
_wpa_driver_privsep_get_scan_results2:  ## @wpa_driver_privsep_get_scan_results2
	.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
	movq	%rdi, %rbx
	movq	$60000, -56(%rbp)               ## imm = 0xEA60
	movl	$60000, %edi                    ## imm = 0xEA60
	callq	_os_malloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %r14
	movq	_PRIVSEP_CMD_GET_SCAN_RESULTS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r15d, %r15d
	leaq	-56(%rbp), %r9
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	%r14, %r8
	callq	_wpa_priv_cmd
	testl	%eax, %eax
	js	LBB0_20
## %bb.2:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	-56(%rbp), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	-56(%rbp), %rbx
	cmpq	$3, %rbx
	ja	LBB0_5
## %bb.3:
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r15d, %r15d
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_wpa_printf
	jmp	LBB0_20
LBB0_4:
	xorl	%r15d, %r15d
	jmp	LBB0_21
LBB0_5:
	leaq	-44(%rbp), %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_os_memcpy
	cmpl	$1000, -44(%rbp)                ## imm = 0x3E8
	ja	LBB0_19
## %bb.7:
	movl	$24, %edi
	callq	_os_zalloc
	testq	%rax, %rax
	je	LBB0_19
## %bb.8:
	movq	%rax, %r15
	movl	-44(%rbp), %edi
	movl	$8, %esi
	callq	_os_calloc
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	je	LBB0_18
## %bb.9:
	movslq	-44(%rbp), %rax
	cmpq	%rax, (%r15)
	jae	LBB0_20
## %bb.10:
	leaq	(%rbx,%rbx,2), %rax
	leaq	(%r14,%rax,8), %r12
	movq	%r14, %rbx
	addq	$96, %rbx
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rax
	subq	%rbx, %rax
	cmpq	$97, %rax
	jl	LBB0_20
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	leaq	-48(%rbp), %rdi
	movq	%rbx, %rsi
	movl	$4, %edx
	callq	_os_memcpy
	movl	-48(%rbp), %esi
	cmpq	$10000, %rsi                    ## imm = 0x2710
	ja	LBB0_20
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	addq	$96, %rbx
	movq	%r12, %rax
	subq	%rbx, %rax
	sarq	$3, %rax
	movabsq	$-6148914691236517205, %rcx     ## imm = 0xAAAAAAAAAAAAAAAB
	imulq	%rcx, %rax
	cmpq	%rsi, %rax
	jl	LBB0_20
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%rbx, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_os_memdup
	testq	%rax, %rax
	je	LBB0_20
## %bb.15:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%rax, %r13
	movslq	-48(%rbp), %r9
	movslq	8(%rax), %rcx
	movslq	12(%rax), %r8
	leaq	(%rcx,%r8), %rax
	addq	$24, %rax
	cmpq	%r9, %rax
	ja	LBB0_22
## %bb.16:                              ##   in Loop: Header=BB0_11 Depth=1
	leaq	(%r9,%r9,2), %rax
	leaq	(%rbx,%rax,8), %rbx
	movq	(%r15), %rax
	movq	16(%r15), %rcx
	leaq	1(%rax), %rdx
	movq	%rdx, (%r15)
	movq	%r13, (%rcx,%rax,8)
	movslq	-44(%rbp), %rax
	cmpq	%rax, %rdx
	jb	LBB0_11
	jmp	LBB0_20
LBB0_18:
	movq	%r15, %rdi
	callq	_os_free
LBB0_19:
	xorl	%r15d, %r15d
LBB0_20:
	movq	%r14, %rdi
	callq	_os_free
LBB0_21:
	movq	%r15, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	$24, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
                                        ## kill: def $r8d killed $r8d killed $r8
                                        ## kill: def $r9d killed $r9d killed $r9
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	%r13, %rdi
	callq	_os_free
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_PRIVSEP_CMD_GET_SCAN_RESULTS,4,2 ## @PRIVSEP_CMD_GET_SCAN_RESULTS
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"privsep: Received %lu bytes of scan results"

L_.str.1:                               ## @.str.1
	.asciz	"privsep: Invalid scan result len %lu"

	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
L_.str.2:                               ## @.str.2
	.asciz	"privsep: Invalid scan result len (%d + %d + %d > %d)"

	.no_dead_strip	_wpa_driver_privsep_get_scan_results2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wpa_driver_privsep_get_scan_results2
_wpa_driver_privsep_get_scan_results2:  ; @wpa_driver_privsep_get_scan_results2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x0
	mov	w8, #60000
	str	x8, [sp, #32]
	mov	w0, #60000
	bl	_os_malloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _PRIVSEP_CMD_GET_SCAN_RESULTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PRIVSEP_CMD_GET_SCAN_RESULTS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x5, sp, #32
	mov	x0, x20
	mov	x2, #0
	mov	w3, #0
	mov	x4, x19
	bl	_wpa_priv_cmd
	tbnz	w0, #31, LBB0_6
; %bb.2:
Lloh3:
	adrp	x20, _MSG_DEBUG@GOTPAGE
Lloh4:
	ldr	x20, [x20, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x20]
	ldr	w2, [sp, #32]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	ldr	x21, [sp, #32]
	cmp	x21, #3
	b.hi	LBB0_5
; %bb.3:
	ldr	w0, [x20]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_wpa_printf
	b	LBB0_6
LBB0_4:
	mov	x20, #0
	b	LBB0_8
LBB0_5:
	add	x0, sp, #44
	mov	x1, x19
	mov	w2, #4
	bl	_os_memcpy
	ldr	w8, [sp, #44]
	cmp	w8, #1000
	b.ls	LBB0_9
LBB0_6:
	mov	x20, #0
LBB0_7:
	mov	x0, x19
	bl	_os_free
LBB0_8:
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_9:
	mov	w0, #24
	bl	_os_zalloc
	mov	x20, x0
	cbz	x0, LBB0_7
; %bb.10:
	ldr	w0, [sp, #44]
	mov	w1, #8
	bl	_os_calloc
	str	x0, [x20, #16]
	cbz	x0, LBB0_19
; %bb.11:
	ldr	x8, [x20]
	ldrsw	x9, [sp, #44]
	cmp	x8, x9
	b.hs	LBB0_7
; %bb.12:
	mov	w8, #24
	madd	x23, x21, x8, x19
	add	x22, x19, #96
	mov	w24, #10000
	mov	x25, #-6148914691236517206
	movk	x25, #43691
	mov	w26, #24
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	sub	x8, x23, x22
	cmp	x8, #97
	b.lt	LBB0_7
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	add	x0, sp, #28
	mov	x1, x22
	mov	w2, #4
	bl	_os_memcpy
	ldr	w1, [sp, #28]
	cmp	w1, w24
	b.hi	LBB0_7
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	add	x22, x22, #96
	sub	x8, x23, x22
	asr	x8, x8, #3
	mul	x8, x8, x25
	cmp	x8, x1
	b.lt	LBB0_7
; %bb.16:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x22
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_os_memdup
	cbz	x0, LBB0_7
; %bb.17:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x21, x0
	ldrsw	x9, [sp, #28]
	ldpsw	x8, x10, [x0, #8]
	add	x11, x8, x10
	add	x11, x11, #24
	cmp	x11, x9
	b.hi	LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_13 Depth=1
	madd	x22, x9, x26, x22
	ldr	x8, [x20, #16]
	ldr	x9, [x20]
	add	x10, x9, #1
	str	x10, [x20]
	str	x21, [x8, x9, lsl #3]
	ldrsw	x8, [sp, #44]
	cmp	x10, x8
	b.lo	LBB0_13
	b	LBB0_7
LBB0_19:
	mov	x0, x20
	bl	_os_free
	b	LBB0_6
LBB0_20:
Lloh9:
	adrp	x11, _MSG_ERROR@GOTPAGE
Lloh10:
	ldr	x11, [x11, _MSG_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x11]
                                        ; kill: def $w10 killed $w10 killed $x10 def $x10
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	stp	x10, x9, [sp, #8]
	str	x8, [sp]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w2, #24
	bl	_wpa_printf
	mov	x0, x21
	bl	_os_free
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PRIVSEP_CMD_GET_SCAN_RESULTS,4,2 ; @PRIVSEP_CMD_GET_SCAN_RESULTS
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"privsep: Received %lu bytes of scan results"

l_.str.1:                               ; @.str.1
	.asciz	"privsep: Invalid scan result len %lu"

	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"privsep: Invalid scan result len (%d + %d + %d > %d)"

	.no_dead_strip	_wpa_driver_privsep_get_scan_results2
.subsections_via_symbols
