	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wmi_call                       ## -- Begin function wmi_call
	.p2align	4, 0x90
_wmi_call:                              ## @wmi_call
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movl	%edx, %r13d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_mutex_lock
	leaq	4(%rbx), %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, 32(%rbx)
	movl	%r13d, 24(%rbx)
	movq	16(%rbp), %rax
	movq	%rax, 16(%rbx)
	leaq	8(%rbx), %r14
	movq	24(%rbp), %rax
	movq	%rax, 8(%rbx)
	leaq	40(%rbx), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_reinit_completion
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, %rsi
	movl	%r13d, %edx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	callq	___wmi_send
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movl	32(%rbp), %r15d
	movl	%r15d, %edi
	callq	_msecs_to_jiffies
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movslq	%r15d, %r15
	movq	%rax, %rdi
	callq	_jiffies_to_msecs
	subq	%rax, %r15
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r13, %rdx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%r15, %r8
	callq	_wil_dbg_wmi
	xorl	%r15d, %r15d
	jmp	LBB0_4
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r13, %rdx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%r15d, %r8d
	callq	_wil_err
	movq	_ETIME@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_4:
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	$0, 32(%rbx)
	movq	_U8_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r14)
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wmi_call(0x%04x->0x%04x) timeout %d msec\n"

	.comm	_ETIME,4,2                      ## @ETIME
L_.str.1:                               ## @.str.1
	.asciz	"wmi_call(0x%04x->0x%04x) completed in %d msec\n"

	.comm	_U8_MAX,4,2                     ## @U8_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wmi_call                       ; -- Begin function wmi_call
	.p2align	2
_wmi_call:                              ; @wmi_call
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x7
	mov	x24, x6
	mov	x21, x5
	mov	x25, x4
	mov	x26, x3
	mov	x27, x2
	mov	x22, x1
	mov	x19, x0
	bl	_mutex_lock
	add	x20, x19, #4
	mov	x0, x20
	bl	_spin_lock_irqsave
	str	x21, [x19, #32]
	str	w27, [x19, #24]
	str	x24, [x19, #16]
	mov	x28, x19
	str	x23, [x28, #8]!
	add	x23, x19, #40
	mov	x0, x23
	bl	_reinit_completion
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	mov	x1, x22
	mov	x2, x27
	mov	x3, x26
	mov	x4, x25
	bl	___wmi_send
	mov	x24, x0
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	w24, [x29, #16]
	mov	x0, x24
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x23
	bl	_wait_for_completion_timeout
	cbz	x0, LBB0_3
; %bb.2:
	sxtw	x23, w24
	bl	_jiffies_to_msecs
	sub	x4, x23, x0
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	mov	x3, x21
	bl	_wil_dbg_wmi
	mov	w24, #0
	b	LBB0_4
LBB0_3:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	mov	x3, x21
	mov	x4, x24
	bl	_wil_err
Lloh4:
	adrp	x8, _ETIME@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ETIME@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_4:
	mov	x0, x20
	bl	_spin_lock_irqsave
	str	xzr, [x19, #32]
Lloh7:
	adrp	x8, _U8_MAX@GOTPAGE
Lloh8:
	ldr	x8, [x8, _U8_MAX@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x19, #24]
	stp	xzr, xzr, [x28]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wmi_call(0x%04x->0x%04x) timeout %d msec\n"

	.comm	_ETIME,4,2                      ; @ETIME
l_.str.1:                               ; @.str.1
	.asciz	"wmi_call(0x%04x->0x%04x) completed in %d msec\n"

	.comm	_U8_MAX,4,2                     ; @U8_MAX
.subsections_via_symbols
