	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wsm_scan                       ## -- Begin function wsm_scan
	.p2align	4, 0x90
_wsm_scan:                              ## @wsm_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
	cmpl	$49, (%rsi)
	jge	LBB0_1
## %bb.2:
	movq	%rsi, %r15
	cmpl	$3, 4(%rsi)
	jge	LBB0_1
## %bb.3:
	cmpl	$2, 8(%r15)
	jl	LBB0_4
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rdi, %r14
	callq	_wsm_cmd_lock
	movl	8(%r15), %esi
	movq	%r14, %rdi
	callq	_WSM_PUT8
	movl	12(%r15), %esi
	movq	%r14, %rdi
	callq	_WSM_PUT8
	movl	16(%r15), %esi
	movq	%r14, %rdi
	callq	_WSM_PUT8
	movl	20(%r15), %esi
	movq	%r14, %rdi
	callq	_WSM_PUT8
	movl	48(%r15), %esi
	movq	%r14, %rdi
	callq	_WSM_PUT32
	movl	24(%r15), %esi
	movq	%r14, %rdi
	callq	_WSM_PUT8
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_WSM_PUT8
	movl	4(%r15), %esi
	movq	%r14, %rdi
	callq	_WSM_PUT8
	movl	28(%r15), %esi
	movq	%r14, %rdi
	callq	_WSM_PUT8
	cmpl	$0, (%r15)
	jle	LBB0_7
## %bb.5:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	40(%r15), %rax
	movl	8(%rax,%rbx), %esi
	movq	%r14, %rdi
	callq	_WSM_PUT16
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_WSM_PUT16
	movq	40(%r15), %rax
	movl	4(%rax,%rbx), %esi
	movq	%r14, %rdi
	callq	_WSM_PUT32
	movq	40(%r15), %rax
	movl	(%rax,%rbx), %esi
	movq	%r14, %rdi
	callq	_WSM_PUT32
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_WSM_PUT32
	incq	%r12
	movslq	(%r15), %rax
	addq	$12, %rbx
	cmpq	%rax, %r12
	jl	LBB0_6
LBB0_7:
	cmpl	$0, 4(%r15)
	jle	LBB0_10
## %bb.8:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r15), %rax
	movl	8(%rax,%rbx), %esi
	movq	%r14, %rdi
	callq	_WSM_PUT32
	movq	32(%r15), %rax
	movq	(%rax,%rbx), %rsi
	movq	%r14, %rdi
	movl	$8, %edx
	callq	_WSM_PUT
	incq	%r12
	movslq	4(%r15), %rax
	addq	$16, %rbx
	cmpq	%rax, %r12
	jl	LBB0_9
LBB0_10:
	movq	_WSM_START_SCAN_REQ_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_WSM_CMD_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_wsm_cmd_send
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_wsm_cmd_unlock
	movl	%ebx, %eax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_WSM_START_SCAN_REQ_ID,4,2      ## @WSM_START_SCAN_REQ_ID
	.comm	_WSM_CMD_TIMEOUT,4,2            ## @WSM_CMD_TIMEOUT
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wsm_scan                       ; -- Begin function wsm_scan
	.p2align	2
_wsm_scan:                              ; @wsm_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
	ldr	w8, [x1]
	cmp	w8, #49
	b.ge	LBB0_3
; %bb.1:
	mov	x20, x1
	ldr	w8, [x1, #4]
	cmp	w8, #2
	b.gt	LBB0_3
; %bb.2:
	ldr	w8, [x20, #8]
	cmp	w8, #1
	b.le	LBB0_5
LBB0_3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	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
LBB0_5:
	mov	x19, x0
	bl	_wsm_cmd_lock
	ldr	w1, [x20, #8]
	mov	x0, x19
	bl	_WSM_PUT8
	ldr	w1, [x20, #12]
	mov	x0, x19
	bl	_WSM_PUT8
	ldr	w1, [x20, #16]
	mov	x0, x19
	bl	_WSM_PUT8
	ldr	w1, [x20, #20]
	mov	x0, x19
	bl	_WSM_PUT8
	ldr	w1, [x20, #48]
	mov	x0, x19
	bl	_WSM_PUT32
	ldr	w1, [x20, #24]
	mov	x0, x19
	bl	_WSM_PUT8
	ldr	w1, [x20]
	mov	x0, x19
	bl	_WSM_PUT8
	ldr	w1, [x20, #4]
	mov	x0, x19
	bl	_WSM_PUT8
	ldr	w1, [x20, #28]
	mov	x0, x19
	bl	_WSM_PUT8
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.6:
	mov	x21, #0
	mov	x22, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #40]
	add	x8, x8, x21
	ldr	w1, [x8, #8]
	mov	x0, x19
	bl	_WSM_PUT16
	mov	x0, x19
	mov	w1, #0
	bl	_WSM_PUT16
	ldr	x8, [x20, #40]
	add	x8, x8, x21
	ldr	w1, [x8, #4]
	mov	x0, x19
	bl	_WSM_PUT32
	ldr	x8, [x20, #40]
	ldr	w1, [x8, x21]
	mov	x0, x19
	bl	_WSM_PUT32
	mov	x0, x19
	mov	w1, #0
	bl	_WSM_PUT32
	add	x22, x22, #1
	ldrsw	x8, [x20]
	add	x21, x21, #12
	cmp	x22, x8
	b.lt	LBB0_7
LBB0_8:
	ldr	w8, [x20, #4]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.9:
	mov	x21, #0
	mov	x22, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #32]
	add	x8, x8, x21
	ldr	w1, [x8, #8]
	mov	x0, x19
	bl	_WSM_PUT32
	ldr	x8, [x20, #32]
	ldr	x1, [x8, x21]
	mov	x0, x19
	mov	w2, #8
	bl	_WSM_PUT
	add	x22, x22, #1
	ldrsw	x8, [x20, #4]
	add	x21, x21, #16
	cmp	x22, x8
	b.lt	LBB0_10
LBB0_11:
Lloh3:
	adrp	x8, _WSM_START_SCAN_REQ_ID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WSM_START_SCAN_REQ_ID@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
Lloh6:
	adrp	x8, _WSM_CMD_TIMEOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WSM_CMD_TIMEOUT@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
	mov	x0, x19
	mov	x1, x19
	mov	x2, #0
	bl	_wsm_cmd_send
	mov	x20, x0
	mov	x0, x19
	bl	_wsm_cmd_unlock
	mov	x0, x20
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_WSM_START_SCAN_REQ_ID,4,2      ; @WSM_START_SCAN_REQ_ID
	.comm	_WSM_CMD_TIMEOUT,4,2            ; @WSM_CMD_TIMEOUT
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
