	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function asus_wmi_add
_asus_wmi_add:                          ## @asus_wmi_add
	.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, %rbx
	movl	(%rdi), %edi
	callq	_to_platform_driver
	movq	%rax, %rdi
	callq	_to_asus_wmi_driver
	movq	%rax, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%r15, 16(%rax)
	movq	%rbx, 8(%rax)
	movq	%rbx, 24(%r15)
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_platform_set_drvdata
	movq	16(%r15), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	16(%r14), %rdi
	callq	*%rax
LBB0_4:
	movq	%r14, %rdi
	callq	_asus_wmi_platform_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_39
## %bb.5:
	movq	%r14, %rdi
	callq	_fan_boost_mode_check_present
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_39
## %bb.6:
	movq	8(%r14), %rdi
	callq	_asus_wmi_sysfs_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_39
## %bb.7:
	movq	%r14, %rdi
	callq	_asus_wmi_input_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_38
## %bb.8:
	movq	%r14, %rdi
	callq	_asus_wmi_fan_init
	movq	%r14, %rdi
	callq	_asus_wmi_hwmon_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_37
## %bb.9:
	movq	%r14, %rdi
	callq	_asus_wmi_led_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_37
## %bb.10:
	movq	_ASUS_WMI_DEVID_WLAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	callq	_asus_wmi_get_devstate
	movq	_ASUS_WMI_DSTS_PRESENCE_BIT@GOTPCREL(%rip), %rax
	movq	_ASUS_WMI_DSTS_USER_BIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	16(%r14), %rax
	testl	%ecx, -28(%rbp)
	je	LBB0_12
## %bb.11:
	movl	$1, (%rax)
	jmp	LBB0_13
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_40
LBB0_12:
	cmpl	$0, (%rax)
	je	LBB0_14
LBB0_13:
	xorl	%eax, %eax
	callq	_ashs_present
	testq	%rax, %rax
	jne	LBB0_15
LBB0_14:
	movq	%r14, %rdi
	callq	_asus_wmi_rfkill_init
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_36
LBB0_15:
	movq	16(%r14), %rax
	movq	8(%rax), %rax
	cmpq	$0, 32(%rax)
	je	LBB0_17
## %bb.16:
	xorl	%eax, %eax
	callq	_asus_wmi_set_als
LBB0_17:
	movq	_DMI_CHASSIS_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_dmi_get_system_info
	testq	%rax, %rax
	je	LBB0_20
## %bb.18:
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	callq	_strcmp
	testl	%eax, %eax
	jne	LBB0_20
## %bb.19:
	movq	_acpi_backlight_vendor@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_acpi_video_set_dmi_backlight_type
LBB0_20:
	movq	16(%r14), %rax
	movq	8(%rax), %rax
	cmpq	$0, 24(%rax)
	je	LBB0_22
## %bb.21:
	movq	_acpi_backlight_vendor@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_acpi_video_set_dmi_backlight_type
	movq	16(%r14), %rax
	movq	8(%rax), %rax
LBB0_22:
	cmpq	$0, 16(%rax)
	je	LBB0_24
## %bb.23:
	movq	_acpi_backlight_native@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_acpi_video_set_dmi_backlight_type
	movq	16(%r14), %rax
	movq	8(%rax), %rax
LBB0_24:
	cmpq	$0, 8(%rax)
	je	LBB0_26
## %bb.25:
	movq	%r14, %rdi
	callq	_asus_wmi_set_xusb2pr
LBB0_26:
	xorl	%eax, %eax
	callq	_acpi_video_get_backlight_type
	movq	_acpi_backlight_vendor@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_29
## %bb.27:
	movq	%r14, %rdi
	callq	_asus_wmi_backlight_init
	testl	%eax, %eax
	je	LBB0_31
## %bb.28:
	movl	%eax, %ebx
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	je	LBB0_31
	jmp	LBB0_35
LBB0_29:
	movq	16(%r14), %rax
	movq	8(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_31
## %bb.30:
	movq	_ASUS_WMI_DEVID_BACKLIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$2, %esi
	xorl	%edx, %edx
	callq	_asus_wmi_set_devstate
LBB0_31:
	movq	%r14, %rdi
	callq	_asus_wmi_has_fnlock_key
	testq	%rax, %rax
	je	LBB0_33
## %bb.32:
	movl	$1, (%r14)
	movq	%r14, %rdi
	callq	_asus_wmi_fnlock_update
LBB0_33:
	movq	16(%r14), %rax
	movl	4(%rax), %edi
	movq	_asus_wmi_notify@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdx
	callq	_wmi_install_notify_handler
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_41
## %bb.34:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	callq	_pr_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_asus_wmi_backlight_exit
LBB0_35:
	movq	%r14, %rdi
	callq	_asus_wmi_rfkill_exit
LBB0_36:
	movq	%r14, %rdi
	callq	_asus_wmi_led_exit
LBB0_37:
	movq	%r14, %rdi
	callq	_asus_wmi_input_exit
LBB0_38:
	movq	8(%r14), %rdi
	callq	_asus_wmi_sysfs_exit
LBB0_39:
	movq	%r14, %rdi
	callq	_kfree
LBB0_40:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_41:
	movq	%r14, %rdi
	callq	_asus_wmi_battery_init
	movq	%r14, %rdi
	callq	_asus_wmi_debugfs_init
	xorl	%ebx, %ebx
	jmp	LBB0_40
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ASUS_WMI_DEVID_WLAN,4,2        ## @ASUS_WMI_DEVID_WLAN
	.comm	_ASUS_WMI_DSTS_PRESENCE_BIT,4,2 ## @ASUS_WMI_DSTS_PRESENCE_BIT
	.comm	_ASUS_WMI_DSTS_USER_BIT,4,2     ## @ASUS_WMI_DSTS_USER_BIT
	.comm	_DMI_CHASSIS_TYPE,4,2           ## @DMI_CHASSIS_TYPE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"3"

	.comm	_acpi_backlight_vendor,8,3      ## @acpi_backlight_vendor
	.comm	_acpi_backlight_native,8,3      ## @acpi_backlight_native
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ASUS_WMI_DEVID_BACKLIGHT,4,2   ## @ASUS_WMI_DEVID_BACKLIGHT
	.comm	_asus_wmi_notify,4,2            ## @asus_wmi_notify
L_.str.1:                               ## @.str.1
	.asciz	"Unable to register notify handler - %d\n"

	.no_dead_strip	_asus_wmi_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function asus_wmi_add
_asus_wmi_add:                          ; @asus_wmi_add
	.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	x20, x0
	ldr	w0, [x0]
	bl	_to_platform_driver
	bl	_to_asus_wmi_driver
	mov	x21, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_11
; %bb.1:
	mov	x19, x0
	stp	x20, x21, [x0, #8]
	str	x20, [x21, #24]
	mov	x0, x20
	mov	x1, x19
	bl	_platform_set_drvdata
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_3
; %bb.2:
	ldr	x0, [x19, #16]
	blr	x8
LBB0_3:
	mov	x0, x19
	bl	_asus_wmi_platform_init
	mov	x20, x0
	cbnz	w0, LBB0_39
; %bb.4:
	mov	x0, x19
	bl	_fan_boost_mode_check_present
	mov	x20, x0
	cbnz	w0, LBB0_39
; %bb.5:
	ldr	x0, [x19, #8]
	bl	_asus_wmi_sysfs_init
	mov	x20, x0
	cbnz	w0, LBB0_39
; %bb.6:
	mov	x0, x19
	bl	_asus_wmi_input_init
	mov	x20, x0
	cbnz	w0, LBB0_38
; %bb.7:
	mov	x0, x19
	bl	_asus_wmi_fan_init
	mov	x0, x19
	bl	_asus_wmi_hwmon_init
	mov	x20, x0
	cbnz	w0, LBB0_37
; %bb.8:
	mov	x0, x19
	bl	_asus_wmi_led_init
	mov	x20, x0
	cbnz	w0, LBB0_37
; %bb.9:
Lloh3:
	adrp	x8, _ASUS_WMI_DEVID_WLAN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ASUS_WMI_DEVID_WLAN@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_asus_wmi_get_devstate
	ldr	w9, [sp, #12]
Lloh6:
	adrp	x8, _ASUS_WMI_DSTS_PRESENCE_BIT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ASUS_WMI_DSTS_PRESENCE_BIT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x10, _ASUS_WMI_DSTS_USER_BIT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _ASUS_WMI_DSTS_USER_BIT@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w10, w10, w8
	ldr	x8, [x19, #16]
	tst	w10, w9
	b.eq	LBB0_12
; %bb.10:
	mov	w9, #1
	str	w9, [x8]
	b	LBB0_13
LBB0_11:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_40
LBB0_12:
	ldr	w8, [x8]
	cbz	w8, LBB0_14
LBB0_13:
	bl	_ashs_present
	cbnz	x0, LBB0_15
LBB0_14:
	mov	x0, x19
	bl	_asus_wmi_rfkill_init
	mov	x20, x0
	cbnz	w0, LBB0_36
LBB0_15:
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
	ldr	x8, [x8, #32]
	cbz	x8, LBB0_17
; %bb.16:
	bl	_asus_wmi_set_als
LBB0_17:
Lloh15:
	adrp	x8, _DMI_CHASSIS_TYPE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DMI_CHASSIS_TYPE@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_dmi_get_system_info
Lloh18:
	adrp	x20, _acpi_backlight_vendor@GOTPAGE
Lloh19:
	ldr	x20, [x20, _acpi_backlight_vendor@GOTPAGEOFF]
	cbz	x0, LBB0_20
; %bb.18:
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbnz	w0, LBB0_20
; %bb.19:
	ldr	x0, [x20]
	bl	_acpi_video_set_dmi_backlight_type
LBB0_20:
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
	ldr	x9, [x8, #24]
	cbz	x9, LBB0_22
; %bb.21:
	ldr	x0, [x20]
	bl	_acpi_video_set_dmi_backlight_type
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
LBB0_22:
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_24
; %bb.23:
Lloh22:
	adrp	x8, _acpi_backlight_native@GOTPAGE
Lloh23:
	ldr	x8, [x8, _acpi_backlight_native@GOTPAGEOFF]
Lloh24:
	ldr	x0, [x8]
	bl	_acpi_video_set_dmi_backlight_type
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
LBB0_24:
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_26
; %bb.25:
	mov	x0, x19
	bl	_asus_wmi_set_xusb2pr
LBB0_26:
	bl	_acpi_video_get_backlight_type
	ldr	x8, [x20]
	cmp	x0, x8
	b.ne	LBB0_29
; %bb.27:
	mov	x0, x19
	bl	_asus_wmi_backlight_init
	cbz	w0, LBB0_31
; %bb.28:
	mov	x20, x0
Lloh25:
	adrp	x8, _ENODEV@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_31
	b	LBB0_35
LBB0_29:
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_31
; %bb.30:
Lloh28:
	adrp	x8, _ASUS_WMI_DEVID_BACKLIGHT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ASUS_WMI_DEVID_BACKLIGHT@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	mov	w1, #2
	mov	x2, #0
	bl	_asus_wmi_set_devstate
LBB0_31:
	mov	x0, x19
	bl	_asus_wmi_has_fnlock_key
	cbz	x0, LBB0_33
; %bb.32:
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x19
	bl	_asus_wmi_fnlock_update
LBB0_33:
	ldr	x8, [x19, #16]
	ldr	w0, [x8, #4]
Lloh31:
	adrp	x8, _asus_wmi_notify@GOTPAGE
Lloh32:
	ldr	x8, [x8, _asus_wmi_notify@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_wmi_install_notify_handler
	mov	x20, x0
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_41
; %bb.34:
Lloh34:
	adrp	x0, l_.str.1@PAGE
Lloh35:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_pr_err
Lloh36:
	adrp	x8, _ENODEV@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	neg	w20, w8
	mov	x0, x19
	bl	_asus_wmi_backlight_exit
LBB0_35:
	mov	x0, x19
	bl	_asus_wmi_rfkill_exit
LBB0_36:
	mov	x0, x19
	bl	_asus_wmi_led_exit
LBB0_37:
	mov	x0, x19
	bl	_asus_wmi_input_exit
LBB0_38:
	ldr	x0, [x19, #8]
	bl	_asus_wmi_sysfs_exit
LBB0_39:
	mov	x0, x19
	bl	_kfree
LBB0_40:
	mov	x0, x20
	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
LBB0_41:
	mov	x0, x19
	bl	_asus_wmi_battery_init
	mov	x0, x19
	bl	_asus_wmi_debugfs_init
	mov	w20, #0
	b	LBB0_40
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ASUS_WMI_DEVID_WLAN,4,2        ; @ASUS_WMI_DEVID_WLAN
	.comm	_ASUS_WMI_DSTS_PRESENCE_BIT,4,2 ; @ASUS_WMI_DSTS_PRESENCE_BIT
	.comm	_ASUS_WMI_DSTS_USER_BIT,4,2     ; @ASUS_WMI_DSTS_USER_BIT
	.comm	_DMI_CHASSIS_TYPE,4,2           ; @DMI_CHASSIS_TYPE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"3"

	.comm	_acpi_backlight_vendor,8,3      ; @acpi_backlight_vendor
	.comm	_acpi_backlight_native,8,3      ; @acpi_backlight_native
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ASUS_WMI_DEVID_BACKLIGHT,4,2   ; @ASUS_WMI_DEVID_BACKLIGHT
	.comm	_asus_wmi_notify,4,2            ; @asus_wmi_notify
l_.str.1:                               ; @.str.1
	.asciz	"Unable to register notify handler - %d\n"

	.no_dead_strip	_asus_wmi_add
.subsections_via_symbols
