	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wmi_sched_scan_set_plans
_wmi_sched_scan_set_plans:              ## @wmi_sched_scan_set_plans
	.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	%rdx, %r14
	movq	%rsi, %r12
	movq	_WMI_MAX_PLANS_NUM@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	cmpl	%ecx, %eax
	jge	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	%ecx, %edx
	movl	%eax, %ecx
	callq	_wil_dbg_wmi
	movl	(%rbx), %ecx
LBB0_2:
	testl	%ecx, %ecx
	jle	LBB0_5
## %bb.3:
	movl	%ecx, %r15d
	shlq	$3, %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r14,%rbx), %edi
	callq	_cpu_to_le16
	movq	(%r12), %rcx
	movq	%rax, 8(%rcx,%rbx,2)
	movl	(%r14,%rbx), %edi
	callq	_cpu_to_le16
	movq	(%r12), %rcx
	movq	%rax, (%rcx,%rbx,2)
	addq	$8, %rbx
	cmpq	%rbx, %r15
	jne	LBB0_4
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WMI_MAX_PLANS_NUM,4,2          ## @WMI_MAX_PLANS_NUM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"too many plans (%d), use first %d\n"

	.no_dead_strip	_wmi_sched_scan_set_plans
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wmi_sched_scan_set_plans
_wmi_sched_scan_set_plans:              ; @wmi_sched_scan_set_plans
	.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	x20, x2
	mov	x19, x1
Lloh0:
	adrp	x21, _WMI_MAX_PLANS_NUM@GOTPAGE
Lloh1:
	ldr	x21, [x21, _WMI_MAX_PLANS_NUM@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, w3
	b.ge	LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x3
	mov	x3, x8
	bl	_wil_dbg_wmi
	ldr	w3, [x21]
LBB0_2:
	cmp	w3, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x21, #0
	mov	w8, w3
	add	x20, x20, #4
	lsl	x22, x8, #4
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20]
	bl	_cpu_to_le16
	ldr	x8, [x19]
	add	x8, x8, x21
	str	x0, [x8, #8]
	ldur	w0, [x20, #-4]
	bl	_cpu_to_le16
	ldr	x8, [x19]
	str	x0, [x8, x21]
	add	x20, x20, #8
	add	x21, x21, #16
	cmp	x22, x21
	b.ne	LBB0_4
LBB0_5:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_WMI_MAX_PLANS_NUM,4,2          ; @WMI_MAX_PLANS_NUM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"too many plans (%d), use first %d\n"

	.no_dead_strip	_wmi_sched_scan_set_plans
.subsections_via_symbols
