	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sleep_functions_on_battery_store
_sleep_functions_on_battery_store:      ## @sleep_functions_on_battery_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %rbx
	callq	_dev_get_drvdata
	movq	%rax, %r15
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_kstrtoint
	testl	%eax, %eax
	jne	LBB0_8
## %bb.1:
	movl	-36(%rbp), %ebx
	cmpl	$101, %ebx
	jb	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_3:
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.4:
	movq	_SCI_USB_CHARGE_BAT_LVL_ON@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movl	(%r15), %ebx
	movq	_SCI_USB_CHARGE_BAT_LVL_OFF@GOTPCREL(%rip), %rax
LBB0_6:
	movq	_HCI_MISC_SHIFT@GOTPCREL(%rip), %r12
	movb	(%r12), %cl
	shll	%cl, %ebx
	orl	(%rax), %ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_toshiba_sleep_functions_status_set
	testl	%eax, %eax
	js	LBB0_8
## %bb.7:
	movb	(%r12), %cl
	sarl	%cl, %ebx
	movl	%ebx, (%r15)
	movl	%r14d, %eax
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HCI_MISC_SHIFT,4,2             ## @HCI_MISC_SHIFT
	.comm	_SCI_USB_CHARGE_BAT_LVL_OFF,4,2 ## @SCI_USB_CHARGE_BAT_LVL_OFF
	.comm	_SCI_USB_CHARGE_BAT_LVL_ON,4,2  ## @SCI_USB_CHARGE_BAT_LVL_ON
	.no_dead_strip	_sleep_functions_on_battery_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sleep_functions_on_battery_store
_sleep_functions_on_battery_store:      ; @sleep_functions_on_battery_store
	.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, x3
	mov	x21, x2
	bl	_dev_get_drvdata
	mov	x20, x0
	add	x2, sp, #12
	mov	x0, x21
	mov	w1, #0
	bl	_kstrtoint
	cbnz	w0, LBB0_8
; %bb.1:
	ldr	w8, [sp, #12]
	cmp	w8, #101
	b.lo	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_3:
	cbz	w8, LBB0_5
; %bb.4:
Lloh3:
	adrp	x9, _SCI_USB_CHARGE_BAT_LVL_ON@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SCI_USB_CHARGE_BAT_LVL_ON@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
	ldr	w8, [x20]
Lloh5:
	adrp	x9, _SCI_USB_CHARGE_BAT_LVL_OFF@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SCI_USB_CHARGE_BAT_LVL_OFF@GOTPAGEOFF]
LBB0_6:
Lloh7:
	adrp	x22, _HCI_MISC_SHIFT@GOTPAGE
Lloh8:
	ldr	x22, [x22, _HCI_MISC_SHIFT@GOTPAGEOFF]
	ldr	w10, [x22]
	lsl	w8, w8, w10
	ldr	w9, [x9]
	orr	w21, w8, w9
	mov	x0, x20
	mov	x1, x21
	bl	_toshiba_sleep_functions_status_set
	tbnz	w0, #31, LBB0_8
; %bb.7:
	ldr	w8, [x22]
	asr	w8, w21, w8
	str	w8, [x20]
	mov	x0, x19
LBB0_8:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HCI_MISC_SHIFT,4,2             ; @HCI_MISC_SHIFT
	.comm	_SCI_USB_CHARGE_BAT_LVL_OFF,4,2 ; @SCI_USB_CHARGE_BAT_LVL_OFF
	.comm	_SCI_USB_CHARGE_BAT_LVL_ON,4,2  ; @SCI_USB_CHARGE_BAT_LVL_ON
	.no_dead_strip	_sleep_functions_on_battery_store
.subsections_via_symbols
