	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function charge_control_end_threshold_store
_charge_control_end_threshold_store:    ## @charge_control_end_threshold_store
	.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	%rcx, %rbx
	movq	%rdx, %rdi
	leaq	-12(%rbp), %rdx
	movl	$10, %esi
	callq	_kstrtouint
	testl	%eax, %eax
	jne	LBB0_8
## %bb.1:
	movl	-12(%rbp), %esi
	cmpl	$101, %esi
	jb	LBB0_4
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_4:
	movq	_ASUS_WMI_DEVID_RSOC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-16(%rbp), %rdx
	callq	_asus_wmi_set_devstate
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	cmpl	$1, -16(%rbp)
	jne	LBB0_6
## %bb.7:
	movl	-12(%rbp), %eax
	movq	_charge_end_threshold@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	%ebx, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_6:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ASUS_WMI_DEVID_RSOC,4,2        ## @ASUS_WMI_DEVID_RSOC
	.comm	_EIO,4,2                        ## @EIO
	.comm	_charge_end_threshold,4,2       ## @charge_end_threshold
	.no_dead_strip	_charge_control_end_threshold_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function charge_control_end_threshold_store
_charge_control_end_threshold_store:    ; @charge_control_end_threshold_store
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x3
	mov	x0, x2
	add	x2, sp, #12
	mov	w1, #10
	bl	_kstrtouint
	cbnz	w0, LBB0_7
; %bb.1:
	ldr	w1, [sp, #12]
	cmp	w1, #101
	b.lo	LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_4:
Lloh2:
	adrp	x8, _ASUS_WMI_DEVID_RSOC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ASUS_WMI_DEVID_RSOC@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	add	x2, sp, #8
	bl	_asus_wmi_set_devstate
	cbnz	w0, LBB0_7
; %bb.5:
	ldr	w8, [sp, #8]
	cmp	w8, #1
	b.ne	LBB0_8
; %bb.6:
	ldr	w8, [sp, #12]
Lloh5:
	adrp	x9, _charge_end_threshold@GOTPAGE
Lloh6:
	ldr	x9, [x9, _charge_end_threshold@GOTPAGEOFF]
Lloh7:
	str	w8, [x9]
	mov	x0, x19
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_8:
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ASUS_WMI_DEVID_RSOC,4,2        ; @ASUS_WMI_DEVID_RSOC
	.comm	_EIO,4,2                        ; @EIO
	.comm	_charge_end_threshold,4,2       ; @charge_end_threshold
	.no_dead_strip	_charge_control_end_threshold_store
.subsections_via_symbols
