	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function asus_wmi_platform_init
_asus_wmi_platform_init:                ## @asus_wmi_platform_init
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	32(%rdi), %r14
	movq	_ASUS_WMI_METHODID_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-28(%rbp), %rcx
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_asus_wmi_evaluate_method
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	-28(%rbp), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_info
LBB0_2:
	movq	_ASUS_WMI_METHODID_SPEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-28(%rbp), %rcx
	xorl	%esi, %esi
	movl	$9, %edx
	callq	_asus_wmi_evaluate_method
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movl	-28(%rbp), %esi
	movzbl	%sil, %edx
	sarl	$16, %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_info
	movl	-28(%rbp), %eax
	movl	%eax, (%r15)
LBB0_4:
	movq	_ASUS_WMI_METHODID_SFUN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-28(%rbp), %rcx
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_asus_wmi_evaluate_method
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movl	-28(%rbp), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_info
	movl	-28(%rbp), %eax
	movl	%eax, 4(%r15)
LBB0_6:
	movq	_ASUS_WMI_MGMT_GUID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_wmi_get_acpi_device_uid
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %rbx
	movq	_ASUS_ACPI_UID_ASUSWMI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_dev_info
	movq	_ASUS_WMI_METHODID_DSTS@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_7:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_18
LBB0_9:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_info
	movq	_ASUS_WMI_METHODID_DCTS@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
	movl	%eax, 24(%r15)
	movq	16(%r15), %rax
	movl	8(%rax), %edi
	callq	_wmi_get_acpi_device_uid
	testq	%rax, %rax
	je	LBB0_15
## %bb.12:
	movq	_ASUS_ACPI_UID_ATK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_strcmp
	testl	%eax, %eax
	jne	LBB0_15
## %bb.13:
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_info
	movq	%r15, %rdi
	callq	_asus_wmi_notify_queue_flush
	testl	%eax, %eax
	jne	LBB0_15
## %bb.14:
	movl	$1, 8(%r15)
LBB0_15:
	movq	16(%r15), %rax
	movq	(%rax), %rax
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	js	LBB0_16
## %bb.17:
	movq	_ASUS_WMI_DEVID_CWAP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_asus_wmi_set_devstate
	jmp	LBB0_18
LBB0_16:
	xorl	%ebx, %ebx
LBB0_18:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ASUS_WMI_METHODID_INIT,4,2     ## @ASUS_WMI_METHODID_INIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Initialization: %#x\n"

	.comm	_ASUS_WMI_METHODID_SPEC,4,2     ## @ASUS_WMI_METHODID_SPEC
L_.str.1:                               ## @.str.1
	.asciz	"BIOS WMI version: %d.%d\n"

	.comm	_ASUS_WMI_METHODID_SFUN,4,2     ## @ASUS_WMI_METHODID_SFUN
L_.str.2:                               ## @.str.2
	.asciz	"SFUN value: %#x\n"

	.comm	_ASUS_WMI_MGMT_GUID,4,2         ## @ASUS_WMI_MGMT_GUID
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ASUS_ACPI_UID_ASUSWMI,4,2      ## @ASUS_ACPI_UID_ASUSWMI
L_.str.3:                               ## @.str.3
	.asciz	"Detected ASUSWMI, use DCTS\n"

	.comm	_ASUS_WMI_METHODID_DCTS,4,2     ## @ASUS_WMI_METHODID_DCTS
L_.str.4:                               ## @.str.4
	.asciz	"Detected %s, not ASUSWMI, use DSTS\n"

	.comm	_ASUS_WMI_METHODID_DSTS,4,2     ## @ASUS_WMI_METHODID_DSTS
	.comm	_ASUS_ACPI_UID_ATK,4,2          ## @ASUS_ACPI_UID_ATK
L_.str.5:                               ## @.str.5
	.asciz	"Detected ATK, enable event queue\n"

	.comm	_ASUS_WMI_DEVID_CWAP,4,2        ## @ASUS_WMI_DEVID_CWAP
	.no_dead_strip	_asus_wmi_platform_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function asus_wmi_platform_init
_asus_wmi_platform_init:                ; @asus_wmi_platform_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	ldr	x20, [x0, #32]
Lloh0:
	adrp	x8, _ASUS_WMI_METHODID_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ASUS_WMI_METHODID_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x3, sp, #12
	mov	w1, #0
	mov	w2, #0
	bl	_asus_wmi_evaluate_method
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	w1, [sp, #12]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
LBB0_2:
Lloh5:
	adrp	x8, _ASUS_WMI_METHODID_SPEC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ASUS_WMI_METHODID_SPEC@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	add	x3, sp, #12
	mov	w1, #0
	mov	w2, #9
	bl	_asus_wmi_evaluate_method
	cbnz	w0, LBB0_4
; %bb.3:
	ldr	w8, [sp, #12]
	asr	w1, w8, #16
	and	w8, w8, #0xff
	str	x8, [sp]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_info
	ldr	w8, [sp, #12]
	str	w8, [x19]
LBB0_4:
Lloh10:
	adrp	x8, _ASUS_WMI_METHODID_SFUN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ASUS_WMI_METHODID_SFUN@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	add	x3, sp, #12
	mov	w1, #0
	mov	w2, #0
	bl	_asus_wmi_evaluate_method
	cbnz	w0, LBB0_6
; %bb.5:
	ldr	w1, [sp, #12]
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_info
	ldr	w8, [sp, #12]
	str	w8, [x19, #4]
LBB0_6:
Lloh15:
	adrp	x8, _ASUS_WMI_MGMT_GUID@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ASUS_WMI_MGMT_GUID@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_wmi_get_acpi_device_uid
	cbz	x0, LBB0_9
; %bb.7:
	mov	x21, x0
Lloh18:
	adrp	x8, _ASUS_ACPI_UID_ASUSWMI@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ASUS_ACPI_UID_ASUSWMI@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	bl	_strcmp
	cbz	w0, LBB0_10
; %bb.8:
	str	x21, [sp]
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_info
Lloh23:
	adrp	x8, _ASUS_WMI_METHODID_DSTS@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ASUS_WMI_METHODID_DSTS@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
Lloh25:
	adrp	x8, _ENODEV@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_18
LBB0_10:
Lloh28:
	adrp	x1, l_.str.3@PAGE
Lloh29:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_info
Lloh30:
	adrp	x8, _ASUS_WMI_METHODID_DCTS@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ASUS_WMI_METHODID_DCTS@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	str	w8, [x19, #24]
	ldr	x8, [x19, #16]
	ldr	w0, [x8, #8]
	bl	_wmi_get_acpi_device_uid
	cbz	x0, LBB0_15
; %bb.12:
Lloh32:
	adrp	x8, _ASUS_ACPI_UID_ATK@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ASUS_ACPI_UID_ATK@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	bl	_strcmp
	cbnz	w0, LBB0_15
; %bb.13:
Lloh35:
	adrp	x1, l_.str.5@PAGE
Lloh36:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_dev_info
	mov	x0, x19
	bl	_asus_wmi_notify_queue_flush
	cbnz	w0, LBB0_15
; %bb.14:
	mov	w8, #1
	str	w8, [x19, #8]
LBB0_15:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	ldr	x1, [x8]
	tbnz	x1, #63, LBB0_17
; %bb.16:
Lloh37:
	adrp	x8, _ASUS_WMI_DEVID_CWAP@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ASUS_WMI_DEVID_CWAP@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x8]
	mov	x2, #0
	bl	_asus_wmi_set_devstate
LBB0_17:
	mov	w0, #0
LBB0_18:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_ASUS_WMI_METHODID_INIT,4,2     ; @ASUS_WMI_METHODID_INIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Initialization: %#x\n"

	.comm	_ASUS_WMI_METHODID_SPEC,4,2     ; @ASUS_WMI_METHODID_SPEC
l_.str.1:                               ; @.str.1
	.asciz	"BIOS WMI version: %d.%d\n"

	.comm	_ASUS_WMI_METHODID_SFUN,4,2     ; @ASUS_WMI_METHODID_SFUN
l_.str.2:                               ; @.str.2
	.asciz	"SFUN value: %#x\n"

	.comm	_ASUS_WMI_MGMT_GUID,4,2         ; @ASUS_WMI_MGMT_GUID
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ASUS_ACPI_UID_ASUSWMI,4,2      ; @ASUS_ACPI_UID_ASUSWMI
l_.str.3:                               ; @.str.3
	.asciz	"Detected ASUSWMI, use DCTS\n"

	.comm	_ASUS_WMI_METHODID_DCTS,4,2     ; @ASUS_WMI_METHODID_DCTS
l_.str.4:                               ; @.str.4
	.asciz	"Detected %s, not ASUSWMI, use DSTS\n"

	.comm	_ASUS_WMI_METHODID_DSTS,4,2     ; @ASUS_WMI_METHODID_DSTS
	.comm	_ASUS_ACPI_UID_ATK,4,2          ; @ASUS_ACPI_UID_ATK
l_.str.5:                               ; @.str.5
	.asciz	"Detected ATK, enable event queue\n"

	.comm	_ASUS_WMI_DEVID_CWAP,4,2        ; @ASUS_WMI_DEVID_CWAP
	.no_dead_strip	_asus_wmi_platform_init
.subsections_via_symbols
