	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function prism2_ioctl_siwscan
_prism2_ioctl_siwscan:                  ## @prism2_ioctl_siwscan
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rdx, %r14
	movq	%rdi, %r12
	callq	_netdev_priv
	movq	%rax, %rcx
	xorl	%eax, %eax
	cmpl	$16, (%r14)
	movq	(%rcx), %r13
	movl	$0, %edx
	cmovaeq	%rbx, %rdx
	movq	(%r13), %rcx
	movq	_IW_MODE_MASTER@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	jne	LBB0_2
## %bb.1:
	movl	$0, (%r14)
	jmp	LBB0_19
LBB0_2:
	cmpl	$0, 20(%r13)
	je	LBB0_10
## %bb.3:
	testq	%rdx, %rdx
	je	LBB0_12
## %bb.4:
	movq	_IW_SCAN_THIS_ESSID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r14)
	je	LBB0_12
## %bb.5:
	movq	(%rdx), %r15
	movq	8(%rdx), %r14
	testq	%r15, %r15
	je	LBB0_13
## %bb.6:
	movq	_IW_MODE_INFRA@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_8
## %bb.7:
	movq	_IW_MODE_ADHOC@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_9
LBB0_8:
	movq	8(%r13), %rbx
	movl	$1, %edi
	movl	$3, %esi
	movl	$1, %edx
	callq	_PRISM2_FW_VER
	cmpq	%rax, %rbx
	jge	LBB0_14
LBB0_9:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	jmp	LBB0_11
LBB0_10:
	movq	_ENETDOWN@GOTPCREL(%rip), %rcx
LBB0_11:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_19
LBB0_12:
	xorl	%r14d, %r14d
LBB0_13:
	xorl	%r15d, %r15d
LBB0_14:
	movq	8(%r13), %rbx
	movl	$1, %edi
	movl	$3, %esi
	movl	$1, %edx
	callq	_PRISM2_FW_VER
	movq	%r12, %rdi
	cmpq	%rax, %rbx
	jge	LBB0_16
## %bb.15:
	callq	_prism2_request_scan
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	jne	LBB0_19
	jmp	LBB0_18
LBB0_16:
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_prism2_request_hostscan
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	jne	LBB0_19
LBB0_18:
	movq	_jiffies@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r13)
	xorl	%eax, %eax
LBB0_19:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IW_MODE_MASTER,8,3             ## @IW_MODE_MASTER
	.comm	_ENETDOWN,4,2                   ## @ENETDOWN
	.comm	_IW_SCAN_THIS_ESSID,4,2         ## @IW_SCAN_THIS_ESSID
	.comm	_IW_MODE_INFRA,8,3              ## @IW_MODE_INFRA
	.comm	_IW_MODE_ADHOC,8,3              ## @IW_MODE_ADHOC
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_jiffies,4,2                    ## @jiffies
	.no_dead_strip	_prism2_ioctl_siwscan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function prism2_ioctl_siwscan
_prism2_ioctl_siwscan:                  ; @prism2_ioctl_siwscan
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [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 w23, -56
	.cfi_offset w24, -64
	mov	x21, x3
	mov	x20, x2
	mov	x19, x0
	bl	_netdev_priv
	ldr	x22, [x0]
	ldr	w8, [x20]
	cmp	w8, #16
	csel	x9, xzr, x21, lo
	ldr	x8, [x22]
Lloh0:
	adrp	x10, _IW_MODE_MASTER@GOTPAGE
Lloh1:
	ldr	x10, [x10, _IW_MODE_MASTER@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x8, x10
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	str	wzr, [x20]
	b	LBB0_16
LBB0_2:
	ldr	w10, [x22, #20]
	cbz	w10, LBB0_9
; %bb.3:
	cbz	x9, LBB0_11
; %bb.4:
	ldr	w10, [x20, #4]
Lloh3:
	adrp	x11, _IW_SCAN_THIS_ESSID@GOTPAGE
Lloh4:
	ldr	x11, [x11, _IW_SCAN_THIS_ESSID@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	tst	w11, w10
	b.eq	LBB0_11
; %bb.5:
	ldp	x21, x20, [x9]
	cbz	x21, LBB0_12
; %bb.6:
Lloh6:
	adrp	x9, _IW_MODE_INFRA@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IW_MODE_INFRA@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, _IW_MODE_ADHOC@GOTPAGE
Lloh10:
	ldr	x10, [x10, _IW_MODE_ADHOC@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_8
; %bb.7:
	ldr	x23, [x22, #8]
	mov	w0, #1
	mov	w1, #3
	mov	w2, #1
	bl	_PRISM2_FW_VER
	cmp	x23, x0
	b.ge	LBB0_12
LBB0_8:
Lloh12:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh14:
	adrp	x8, _ENETDOWN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENETDOWN@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_16
LBB0_11:
	mov	x20, #0
	mov	x21, #0
LBB0_12:
	ldr	x23, [x22, #8]
	mov	w0, #1
	mov	w1, #3
	mov	w2, #1
	bl	_PRISM2_FW_VER
	cmp	x23, x0
	b.ge	LBB0_14
; %bb.13:
	mov	x0, x19
	bl	_prism2_request_scan
	cbnz	w0, LBB0_16
	b	LBB0_15
LBB0_14:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_prism2_request_hostscan
	cbnz	w0, LBB0_16
LBB0_15:
Lloh16:
	adrp	x8, _jiffies@GOTPAGE
Lloh17:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x22, #16]
LBB0_16:
	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	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_IW_MODE_MASTER,8,3             ; @IW_MODE_MASTER
	.comm	_ENETDOWN,4,2                   ; @ENETDOWN
	.comm	_IW_SCAN_THIS_ESSID,4,2         ; @IW_SCAN_THIS_ESSID
	.comm	_IW_MODE_INFRA,8,3              ; @IW_MODE_INFRA
	.comm	_IW_MODE_ADHOC,8,3              ; @IW_MODE_ADHOC
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_jiffies,4,2                    ; @jiffies
	.no_dead_strip	_prism2_ioctl_siwscan
.subsections_via_symbols
