	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wmid3_set_device_status
_wmid3_set_device_status:               ## @wmid3_set_device_status
	.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	$152, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	$1, -72(%rbp)
	movq	_commun_func_bitmap@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -68(%rbp)
	movq	_commun_fn_key_number@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -64(%rbp)
	movl	$12, -192(%rbp)
	leaq	-72(%rbp), %rdx
	movq	%rdx, -184(%rbp)
	movq	$0, -176(%rbp)
	movl	$2, -56(%rbp)
	movl	%eax, -52(%rbp)
	movl	%ecx, -48(%rbp)
	movl	$12, -168(%rbp)
	leaq	-56(%rbp), %rax
	movq	%rax, -160(%rbp)
	movq	$0, -152(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -144(%rbp)
	movq	$0, -128(%rbp)
	movq	_ACPI_ALLOCATE_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -144(%rbp)
	movaps	%xmm0, -112(%rbp)
	movq	$0, -96(%rbp)
	movl	%eax, -112(%rbp)
	movq	_WMID_GUID3@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	-192(%rbp), %rcx
	leaq	-144(%rbp), %r8
	xorl	%esi, %esi
	movl	$2, %edx
	callq	_wmi_evaluate_method
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	jne	LBB0_11
## %bb.1:
	movq	-136(%rbp), %r12
	testq	%r12, %r12
	je	LBB0_10
## %bb.2:
	movq	(%r12), %rsi
	movq	_ACPI_TYPE_BUFFER@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_8
## %bb.3:
	cmpl	$8, %esi
	jne	LBB0_7
## %bb.4:
	movq	8(%r12), %rax
	movl	(%rax), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	8(%rax), %rcx
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	16(%rax), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_kfree
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	movq	%rsi, %rax
	orq	%rdx, %rax
	je	LBB0_12
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
LBB0_6:
	xorl	%eax, %eax
	callq	_pr_warn
	jmp	LBB0_11
LBB0_7:
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_pr_warn
LBB0_8:
	movq	%r12, %rdi
LBB0_9:
	callq	_kfree
LBB0_10:
	movq	_AE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$152, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, %eax
	orl	%r14d, %eax
	notl	%r14d
	andl	%ecx, %r14d
	testq	%r15, %r15
	cmovnel	%eax, %r14d
	movl	%r14d, -52(%rbp)
	movl	(%r13), %edi
	leaq	-168(%rbp), %rcx
	leaq	-112(%rbp), %r8
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_wmi_evaluate_method
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	jne	LBB0_11
## %bb.13:
	movq	-104(%rbp), %r14
	testq	%r14, %r14
	je	LBB0_10
## %bb.14:
	movq	(%r14), %rsi
	movq	_ACPI_TYPE_BUFFER@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_19
## %bb.15:
	cmpl	$4, %esi
	jne	LBB0_18
## %bb.16:
	movq	8(%r14), %rax
	movq	8(%rax), %r15
	movq	16(%rax), %r12
	movq	%r14, %rdi
	callq	_kfree
	movq	%r12, %rax
	orq	%r15, %rax
	je	LBB0_11
## %bb.17:
	leaq	L_.str.2(%rip), %rdi
	movl	%r12d, %esi
	movq	%r15, %rdx
	jmp	LBB0_6
LBB0_18:
	leaq	L_.str(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_pr_warn
LBB0_19:
	movq	%r14, %rdi
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_commun_func_bitmap,4,2         ## @commun_func_bitmap
	.comm	_commun_fn_key_number,4,2       ## @commun_fn_key_number
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ## @ACPI_ALLOCATE_BUFFER
	.comm	_WMID_GUID3,4,2                 ## @WMID_GUID3
	.comm	_AE_ERROR,4,2                   ## @AE_ERROR
	.comm	_ACPI_TYPE_BUFFER,8,3           ## @ACPI_TYPE_BUFFER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown buffer length %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Get Current Device Status failed: 0x%x - 0x%x\n"

L_.str.2:                               ## @.str.2
	.asciz	"Set Device Status failed: 0x%x - 0x%x\n"

	.no_dead_strip	_wmid3_set_device_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wmid3_set_device_status
_wmid3_set_device_status:               ; @wmid3_set_device_status
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #240
	.cfi_def_cfa_offset 240
	stp	x28, x27, [sp, #144]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #160]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #176]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #192]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #208]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #224]            ; 16-byte Folded Spill
	add	x29, sp, #224
	.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	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _commun_func_bitmap@GOTPAGE
Lloh1:
	ldr	x8, [x8, _commun_func_bitmap@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	w9, #1
Lloh3:
	adrp	x10, _commun_fn_key_number@GOTPAGE
Lloh4:
	ldr	x10, [x10, _commun_fn_key_number@GOTPAGEOFF]
	stp	w9, w8, [x29, #-96]
Lloh5:
	ldr	w9, [x10]
	stur	w9, [x29, #-88]
	mov	w10, #12
	str	w10, [sp, #104]
	sub	x11, x29, #96
	stp	x11, xzr, [sp, #112]
	mov	w11, #2
	stp	w11, w8, [sp, #88]
	str	w9, [sp, #96]
	str	w10, [sp, #64]
	add	x8, sp, #88
	stp	x8, xzr, [sp, #72]
	stp	xzr, xzr, [sp, #40]
	str	xzr, [sp, #56]
Lloh6:
	adrp	x8, _ACPI_ALLOCATE_BUFFER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ACPI_ALLOCATE_BUFFER@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [sp, #40]
	stp	xzr, xzr, [sp, #16]
	str	xzr, [sp, #32]
	str	w8, [sp, #16]
Lloh9:
	adrp	x24, _WMID_GUID3@GOTPAGE
Lloh10:
	ldr	x24, [x24, _WMID_GUID3@GOTPAGEOFF]
	ldr	w0, [x24]
	add	x3, sp, #104
	add	x4, sp, #40
	mov	w1, #0
	mov	w2, #2
	bl	_wmi_evaluate_method
	mov	x19, x0
	bl	_ACPI_FAILURE
	cbnz	x0, LBB0_11
; %bb.1:
	ldr	x22, [sp, #48]
	cbz	x22, LBB0_10
; %bb.2:
	ldr	x1, [x22]
Lloh11:
	adrp	x25, _ACPI_TYPE_BUFFER@GOTPAGE
Lloh12:
	ldr	x25, [x25, _ACPI_TYPE_BUFFER@GOTPAGEOFF]
	ldr	x8, [x25]
	cmp	x1, x8
	b.ne	LBB0_8
; %bb.3:
	cmp	w1, #8
	b.ne	LBB0_7
; %bb.4:
	ldr	x8, [x22, #8]
	ldr	w27, [x8]
	ldp	x26, x23, [x8, #8]
	mov	x0, x22
	bl	_kfree
	orr	x8, x23, x26
	cbz	x8, LBB0_12
; %bb.5:
	str	x26, [sp]
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x23
LBB0_6:
	bl	_pr_warn
	b	LBB0_11
LBB0_7:
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_pr_warn
LBB0_8:
	mov	x0, x22
LBB0_9:
	bl	_kfree
LBB0_10:
Lloh17:
	adrp	x8, _AE_ERROR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AE_ERROR@GOTPAGEOFF]
Lloh19:
	ldr	w19, [x8]
LBB0_11:
	mov	x0, x19
	ldp	x29, x30, [sp, #224]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #208]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #192]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #176]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #160]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #240
	ret
LBB0_12:
	orr	w8, w27, w21
	bic	w9, w27, w21
	cmp	x20, #0
	csel	w8, w9, w8, eq
	str	w8, [sp, #92]
	ldr	w0, [x24]
	add	x3, sp, #64
	add	x4, sp, #16
	mov	w1, #0
	mov	w2, #1
	bl	_wmi_evaluate_method
	mov	x19, x0
	bl	_ACPI_FAILURE
	cbnz	x0, LBB0_11
; %bb.13:
	ldr	x20, [sp, #24]
	cbz	x20, LBB0_10
; %bb.14:
	ldr	x1, [x20]
	ldr	x8, [x25]
	cmp	x1, x8
	b.ne	LBB0_19
; %bb.15:
	cmp	w1, #4
	b.ne	LBB0_18
; %bb.16:
	ldr	x8, [x20, #8]
	ldp	x22, x21, [x8, #8]
	mov	x0, x20
	bl	_kfree
	orr	x8, x21, x22
	cbz	x8, LBB0_11
; %bb.17:
	str	x22, [sp]
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	b	LBB0_6
LBB0_18:
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_pr_warn
LBB0_19:
	mov	x0, x20
	b	LBB0_9
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_commun_func_bitmap,4,2         ; @commun_func_bitmap
	.comm	_commun_fn_key_number,4,2       ; @commun_fn_key_number
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ; @ACPI_ALLOCATE_BUFFER
	.comm	_WMID_GUID3,4,2                 ; @WMID_GUID3
	.comm	_AE_ERROR,4,2                   ; @AE_ERROR
	.comm	_ACPI_TYPE_BUFFER,8,3           ; @ACPI_TYPE_BUFFER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown buffer length %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Get Current Device Status failed: 0x%x - 0x%x\n"

l_.str.2:                               ; @.str.2
	.asciz	"Set Device Status failed: 0x%x - 0x%x\n"

	.no_dead_strip	_wmid3_set_device_status
.subsections_via_symbols
