	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipw_wx_set_scan
_ipw_wx_set_scan:                       ## @ipw_wx_set_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r12
	callq	_libipw_priv
	movq	%rax, %rbx
	leaq	8(%rax), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	$1, (%rbx)
	cmpl	$24, (%r12)
	jne	LBB0_4
## %bb.1:
	movq	_IW_SCAN_THIS_ESSID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r12)
	je	LBB0_3
## %bb.2:
	movl	16(%r15), %edi
	movl	$4, %esi
	callq	_min
	movl	%eax, %r12d
	movl	24(%rbx), %edi
	movl	8(%r15), %esi
	movl	%eax, %edx
	callq	_memcpy
	movl	%r12d, 4(%rbx)
	addq	$20, %rbx
	jmp	LBB0_5
LBB0_4:
	addq	$12, %rbx
	jmp	LBB0_5
LBB0_3:
	movq	(%r15), %rax
	movq	_IW_SCAN_TYPE_PASSIVE@GOTPCREL(%rip), %rcx
	addq	$16, %rbx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	cmovneq	%rdx, %rbx
LBB0_5:
	movq	%r14, %rdi
	callq	_mutex_unlock
	leaq	L_.str(%rip), %rdi
	callq	_IPW_DEBUG_WX
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_schedule_delayed_work
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IW_SCAN_THIS_ESSID,4,2         ## @IW_SCAN_THIS_ESSID
	.comm	_IW_SCAN_TYPE_PASSIVE,8,3       ## @IW_SCAN_TYPE_PASSIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Start scan\n"

	.no_dead_strip	_ipw_wx_set_scan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipw_wx_set_scan
_ipw_wx_set_scan:                       ; @ipw_wx_set_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	x21, x3
	mov	x22, x2
	bl	_libipw_priv
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
	mov	w8, #1
	str	w8, [x20]
	ldr	w8, [x22]
	cmp	w8, #24
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [x22, #4]
Lloh0:
	adrp	x9, _IW_SCAN_THIS_ESSID@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IW_SCAN_THIS_ESSID@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
	ldr	w0, [x21, #16]
	mov	w1, #4
	bl	_min
	mov	x22, x0
	ldr	w0, [x20, #24]
	ldr	w1, [x21, #8]
	mov	x2, x22
	bl	_memcpy
	str	w22, [x20, #4]
	add	x20, x20, #20
	b	LBB0_5
LBB0_3:
	add	x20, x20, #12
	b	LBB0_5
LBB0_4:
	ldr	x8, [x21]
Lloh3:
	adrp	x9, _IW_SCAN_TYPE_PASSIVE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IW_SCAN_TYPE_PASSIVE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x10, x20, #16
	cmp	x8, x9
	csel	x20, x10, xzr, eq
LBB0_5:
	mov	x0, x19
	bl	_mutex_unlock
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IPW_DEBUG_WX
	mov	x0, x20
	mov	w1, #0
	bl	_schedule_delayed_work
	mov	w0, #0
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_IW_SCAN_THIS_ESSID,4,2         ; @IW_SCAN_THIS_ESSID
	.comm	_IW_SCAN_TYPE_PASSIVE,8,3       ; @IW_SCAN_TYPE_PASSIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Start scan\n"

	.no_dead_strip	_ipw_wx_set_scan
.subsections_via_symbols
