	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kbd_backlight_mode_store
_kbd_backlight_mode_store:              ## @kbd_backlight_mode_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %rbx
	callq	_dev_get_drvdata
	movq	%rax, %r15
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_kstrtoint
	testl	%eax, %eax
	jne	LBB0_21
## %bb.1:
	movl	(%r15), %eax
	cmpl	$1, %eax
	je	LBB0_8
## %bb.2:
	cmpl	$2, %eax
	jne	LBB0_3
## %bb.12:
	movl	-28(%rbp), %edx
	movq	_SCI_KBD_MODE_AUTO@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edx
	je	LBB0_4
## %bb.13:
	movq	_SCI_KBD_MODE_ON@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edx
	je	LBB0_4
## %bb.14:
	movq	_SCI_KBD_MODE_OFF@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edx
	jne	LBB0_11
	jmp	LBB0_4
LBB0_8:
	movl	-28(%rbp), %edx
	movq	_SCI_KBD_MODE_FNZ@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edx
	je	LBB0_4
## %bb.9:
	movq	_SCI_KBD_MODE_AUTO@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edx
	je	LBB0_4
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_21
LBB0_3:
	movl	-28(%rbp), %edx
LBB0_4:
	movl	4(%r15), %edi
	cmpl	%edx, %edi
	jne	LBB0_5
LBB0_20:
	movl	%r14d, %eax
	jmp	LBB0_21
LBB0_5:
	movl	8(%r15), %esi
	movq	_HCI_MISC_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	cmpl	$2, %eax
	je	LBB0_15
## %bb.6:
	cmpl	$1, %eax
	jne	LBB0_16
## %bb.7:
	orl	%edi, %esi
	jmp	LBB0_16
LBB0_15:
	orl	%edx, %esi
LBB0_16:
	movq	%r15, %rdi
	callq	_toshiba_kbd_illum_status_set
	testl	%eax, %eax
	je	LBB0_17
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movl	-28(%rbp), %eax
	movl	%eax, 4(%r15)
	movq	_toshiba_acpi@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx)
	cmpl	$2, (%r15)
	jne	LBB0_20
## %bb.18:
	cmpl	$0, 12(%r15)
	jne	LBB0_20
## %bb.19:
	movq	_kbd_bl_work@GOTPCREL(%rip), %rdi
	callq	_schedule_work
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_SCI_KBD_MODE_FNZ,4,2           ## @SCI_KBD_MODE_FNZ
	.comm	_SCI_KBD_MODE_AUTO,4,2          ## @SCI_KBD_MODE_AUTO
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SCI_KBD_MODE_ON,4,2            ## @SCI_KBD_MODE_ON
	.comm	_SCI_KBD_MODE_OFF,4,2           ## @SCI_KBD_MODE_OFF
	.comm	_HCI_MISC_SHIFT,4,2             ## @HCI_MISC_SHIFT
	.comm	_toshiba_acpi,8,3               ## @toshiba_acpi
	.comm	_kbd_bl_work,4,2                ## @kbd_bl_work
	.no_dead_strip	_kbd_backlight_mode_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kbd_backlight_mode_store
_kbd_backlight_mode_store:              ; @kbd_backlight_mode_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_10
; %bb.1:
	ldr	w8, [x20]
	cmp	w8, #1
	b.eq	LBB0_4
; %bb.2:
	cmp	w8, #2
	b.ne	LBB0_6
; %bb.3:
	ldr	w9, [sp, #12]
Lloh0:
	adrp	x10, _SCI_KBD_MODE_AUTO@GOTPAGE
Lloh1:
	ldr	x10, [x10, _SCI_KBD_MODE_AUTO@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
Lloh3:
	adrp	x11, _SCI_KBD_MODE_ON@GOTPAGE
Lloh4:
	ldr	x11, [x11, _SCI_KBD_MODE_ON@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
Lloh6:
	adrp	x12, _SCI_KBD_MODE_OFF@GOTPAGE
Lloh7:
	ldr	x12, [x12, _SCI_KBD_MODE_OFF@GOTPAGEOFF]
Lloh8:
	ldr	w12, [x12]
	cmp	w9, w10
	ccmp	w9, w11, #4, ne
	ccmp	w9, w12, #4, ne
	b.ne	LBB0_5
	b	LBB0_7
LBB0_4:
	ldr	w9, [sp, #12]
Lloh9:
	adrp	x10, _SCI_KBD_MODE_FNZ@GOTPAGE
Lloh10:
	ldr	x10, [x10, _SCI_KBD_MODE_FNZ@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
Lloh12:
	adrp	x11, _SCI_KBD_MODE_AUTO@GOTPAGE
Lloh13:
	ldr	x11, [x11, _SCI_KBD_MODE_AUTO@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
	cmp	w9, w10
	ccmp	w9, w11, #4, ne
	b.eq	LBB0_7
LBB0_5:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_6:
	ldr	w9, [sp, #12]
LBB0_7:
	ldr	w10, [x20, #4]
	cmp	w10, w9
	b.ne	LBB0_9
LBB0_8:
	mov	x0, x19
	b	LBB0_10
LBB0_9:
	ldr	w11, [x20, #8]
Lloh18:
	adrp	x12, _HCI_MISC_SHIFT@GOTPAGE
Lloh19:
	ldr	x12, [x12, _HCI_MISC_SHIFT@GOTPAGEOFF]
Lloh20:
	ldr	w12, [x12]
	lsl	w11, w11, w12
	orr	w9, w11, w9
	orr	w10, w11, w10
	cmp	w8, #1
	csel	w10, w11, w10, ne
	cmp	w8, #2
	csel	w1, w9, w10, eq
	mov	x0, x20
	bl	_toshiba_kbd_illum_status_set
	cbz	w0, LBB0_11
LBB0_10:
	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_11:
	ldr	w8, [sp, #12]
	str	w8, [x20, #4]
Lloh21:
	adrp	x9, _toshiba_acpi@GOTPAGE
Lloh22:
	ldr	x9, [x9, _toshiba_acpi@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	str	w8, [x9]
	ldr	w8, [x20]
	cmp	w8, #2
	b.ne	LBB0_8
; %bb.12:
	ldr	w8, [x20, #12]
	cbnz	w8, LBB0_8
; %bb.13:
Lloh24:
	adrp	x0, _kbd_bl_work@GOTPAGE
Lloh25:
	ldr	x0, [x0, _kbd_bl_work@GOTPAGEOFF]
	bl	_schedule_work
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_SCI_KBD_MODE_FNZ,4,2           ; @SCI_KBD_MODE_FNZ
	.comm	_SCI_KBD_MODE_AUTO,4,2          ; @SCI_KBD_MODE_AUTO
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SCI_KBD_MODE_ON,4,2            ; @SCI_KBD_MODE_ON
	.comm	_SCI_KBD_MODE_OFF,4,2           ; @SCI_KBD_MODE_OFF
	.comm	_HCI_MISC_SHIFT,4,2             ; @HCI_MISC_SHIFT
	.comm	_toshiba_acpi,8,3               ; @toshiba_acpi
	.comm	_kbd_bl_work,4,2                ; @kbd_bl_work
	.no_dead_strip	_kbd_backlight_mode_store
.subsections_via_symbols
