	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function asus_wmi_battery_add
_asus_wmi_battery_add:                  ## @asus_wmi_battery_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movq	_dev_attr_charge_control_end_threshold@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_device_create_file
	testq	%rax, %rax
	je	LBB0_3
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_3:
	movq	_ASUS_WMI_DEVID_RSOC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%ebx, %ebx
	movl	$100, %esi
	xorl	%edx, %edx
	callq	_asus_wmi_set_devstate
	movq	_charge_end_threshold@GOTPCREL(%rip), %rax
	movl	$100, (%rax)
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BAT0"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_dev_attr_charge_control_end_threshold,4,2 ## @dev_attr_charge_control_end_threshold
	.comm	_ASUS_WMI_DEVID_RSOC,4,2        ## @ASUS_WMI_DEVID_RSOC
	.comm	_charge_end_threshold,4,2       ## @charge_end_threshold
	.no_dead_strip	_asus_wmi_battery_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_battery_add
_asus_wmi_battery_add:                  ; @asus_wmi_battery_add
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbnz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, _dev_attr_charge_control_end_threshold@GOTPAGE
Lloh3:
	ldr	x1, [x1, _dev_attr_charge_control_end_threshold@GOTPAGEOFF]
	mov	x0, x19
	bl	_device_create_file
	cbz	x0, LBB0_4
LBB0_2:
Lloh4:
	adrp	x8, _ENODEV@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh7:
	adrp	x8, _ASUS_WMI_DEVID_RSOC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ASUS_WMI_DEVID_RSOC@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	mov	w19, #100
	mov	w1, #100
	mov	x2, #0
	bl	_asus_wmi_set_devstate
	mov	w0, #0
Lloh10:
	adrp	x8, _charge_end_threshold@GOTPAGE
Lloh11:
	ldr	x8, [x8, _charge_end_threshold@GOTPAGEOFF]
Lloh12:
	str	w19, [x8]
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BAT0"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_dev_attr_charge_control_end_threshold,4,2 ; @dev_attr_charge_control_end_threshold
	.comm	_ASUS_WMI_DEVID_RSOC,4,2        ; @ASUS_WMI_DEVID_RSOC
	.comm	_charge_end_threshold,4,2       ; @charge_end_threshold
	.no_dead_strip	_asus_wmi_battery_add
.subsections_via_symbols
