	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function toshiba_acpi_setup_keyboard
_toshiba_acpi_setup_keyboard:           ## @toshiba_acpi_setup_keyboard
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_disable_hotkeys@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_3:
	movq	%rdi, %r14
	movq	_TOSHIBA_WMI_EVENT_GUID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_wmi_has_guid
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_info
LBB0_33:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movq	%r14, %rdi
	callq	_toshiba_acpi_enable_hotkeys
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_33
## %bb.6:
	movq	%r14, %rdi
	movq	%r14, %rsi
	callq	_toshiba_hotkey_event_type_get
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_notice
LBB0_8:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_input_allocate_device
	movq	%rax, 24(%r14)
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	leaq	L_.str.3(%rip), %rcx
	movq	%rcx, (%rax)
	leaq	L_.str.4(%rip), %rcx
	movq	%rcx, 8(%rax)
	movq	_BUS_HOST@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%rax)
	movq	(%r14), %rcx
	movq	_HCI_SYSTEM_TYPE1@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_13
## %bb.11:
	cmpq	$0, 48(%r14)
	jne	LBB0_12
LBB0_13:
	movq	_toshiba_acpi_keymap@GOTPCREL(%rip), %rcx
	jmp	LBB0_14
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_33
LBB0_12:
	movq	_toshiba_acpi_alt_keymap@GOTPCREL(%rip), %rcx
LBB0_14:
	movq	(%rcx), %rsi
	movq	%rax, %rdi
	xorl	%edx, %edx
	callq	_sparse_keymap_setup
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_15
LBB0_32:
	movq	24(%r14), %rdi
	callq	_input_free_device
	movq	$0, 24(%r14)
	jmp	LBB0_33
LBB0_15:
	xorl	%eax, %eax
	callq	_ec_get_handle
	testq	%rax, %rax
	je	LBB0_20
## %bb.16:
	leaq	L_.str.6(%rip), %rsi
	movq	%rax, %rdi
	callq	_acpi_has_method
	testq	%rax, %rax
	je	LBB0_20
## %bb.17:
	leaq	40(%r14), %rdi
	movq	_toshiba_acpi_hotkey_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movq	_toshiba_acpi_i8042_filter@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_i8042_install_filter
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	movl	%eax, %ebx
	leaq	L_.str.7(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_32
LBB0_19:
	movl	$1, 8(%r14)
LBB0_20:
	movq	32(%r14), %rax
	movq	(%rax), %rdi
	leaq	L_.str.8(%rip), %rsi
	callq	_acpi_has_method
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:
	movl	$1, 12(%r14)
	jmp	LBB0_24
LBB0_22:
	movq	_HCI_SYSTEM_EVENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_hci_write
	movq	_TOS_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_24
## %bb.23:
	movl	$1, 16(%r14)
LBB0_24:
	cmpl	$0, 12(%r14)
	jne	LBB0_27
## %bb.25:
	cmpl	$0, 16(%r14)
	je	LBB0_26
LBB0_27:
	movq	24(%r14), %rdi
	callq	_input_register_device
	testl	%eax, %eax
	je	LBB0_28
## %bb.29:
	movl	%eax, %ebx
	leaq	L_.str.10(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_info
	jmp	LBB0_30
LBB0_28:
	xorl	%ebx, %ebx
	jmp	LBB0_33
LBB0_26:
	leaq	L_.str.9(%rip), %rdi
	callq	_pr_warn
	xorl	%ebx, %ebx
LBB0_30:
	cmpl	$0, 8(%r14)
	je	LBB0_32
## %bb.31:
	movq	_toshiba_acpi_i8042_filter@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_i8042_remove_filter
	jmp	LBB0_32
	.cfi_endproc
                                        ## -- End function
	.comm	_toshiba_acpi_keymap,8,3        ## @toshiba_acpi_keymap
	.comm	_disable_hotkeys,8,3            ## @disable_hotkeys
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Hotkeys disabled by module parameter\n"

	.comm	_TOSHIBA_WMI_EVENT_GUID,4,2     ## @TOSHIBA_WMI_EVENT_GUID
L_.str.1:                               ## @.str.1
	.asciz	"WMI event detected, hotkeys will not be monitored\n"

L_.str.2:                               ## @.str.2
	.asciz	"Unable to query Hotkey Event Type\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.3:                               ## @.str.3
	.asciz	"Toshiba input device"

L_.str.4:                               ## @.str.4
	.asciz	"toshiba_acpi/input0"

	.comm	_BUS_HOST,4,2                   ## @BUS_HOST
	.comm	_HCI_SYSTEM_TYPE1,8,3           ## @HCI_SYSTEM_TYPE1
	.comm	_HCI_SYSTEM_TYPE2,8,3           ## @HCI_SYSTEM_TYPE2
	.comm	_toshiba_acpi_alt_keymap,8,3    ## @toshiba_acpi_alt_keymap
L_.str.6:                               ## @.str.6
	.asciz	"NTFY"

	.comm	_toshiba_acpi_hotkey_work,4,2   ## @toshiba_acpi_hotkey_work
	.comm	_toshiba_acpi_i8042_filter,4,2  ## @toshiba_acpi_i8042_filter
L_.str.7:                               ## @.str.7
	.asciz	"Error installing key filter\n"

L_.str.8:                               ## @.str.8
	.asciz	"INFO"

	.comm	_HCI_SYSTEM_EVENT,4,2           ## @HCI_SYSTEM_EVENT
	.comm	_TOS_SUCCESS,8,3                ## @TOS_SUCCESS
L_.str.9:                               ## @.str.9
	.asciz	"No hotkey query interface found\n"

L_.str.10:                              ## @.str.10
	.asciz	"Unable to register input device\n"

	.no_dead_strip	_toshiba_acpi_setup_keyboard
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function toshiba_acpi_setup_keyboard
_toshiba_acpi_setup_keyboard:           ; @toshiba_acpi_setup_keyboard
	.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
Lloh0:
	adrp	x8, _disable_hotkeys@GOTPAGE
Lloh1:
	ldr	x8, [x8, _disable_hotkeys@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	mov	x19, x0
Lloh5:
	adrp	x8, _TOSHIBA_WMI_EVENT_GUID@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TOSHIBA_WMI_EVENT_GUID@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_wmi_has_guid
	cbz	x0, LBB0_6
; %bb.3:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_4:
	bl	_pr_info
	mov	w20, #0
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x0, x19
	bl	_toshiba_acpi_enable_hotkeys
	mov	x20, x0
	cbnz	w0, LBB0_5
; %bb.7:
	mov	x0, x19
	mov	x1, x19
	bl	_toshiba_hotkey_event_type_get
	cbz	x0, LBB0_9
; %bb.8:
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_notice
LBB0_9:
	bl	_input_allocate_device
	str	x0, [x19, #24]
	cbz	x0, LBB0_14
; %bb.10:
Lloh12:
	adrp	x8, l_.str.3@PAGE
Lloh13:
	add	x8, x8, l_.str.3@PAGEOFF
Lloh14:
	adrp	x9, l_.str.4@PAGE
Lloh15:
	add	x9, x9, l_.str.4@PAGEOFF
	stp	x8, x9, [x0]
Lloh16:
	adrp	x8, _BUS_HOST@GOTPAGE
Lloh17:
	ldr	x8, [x8, _BUS_HOST@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x0, #16]
	ldr	x9, [x19]
Lloh19:
	adrp	x8, _HCI_SYSTEM_TYPE1@GOTPAGE
Lloh20:
	ldr	x8, [x8, _HCI_SYSTEM_TYPE1@GOTPAGEOFF]
Lloh21:
	ldr	x10, [x8]
Lloh22:
	adrp	x8, _toshiba_acpi_keymap@GOTPAGE
Lloh23:
	ldr	x8, [x8, _toshiba_acpi_keymap@GOTPAGEOFF]
	cmp	x9, x10
	b.eq	LBB0_12
; %bb.11:
	ldr	x9, [x19, #48]
Lloh24:
	adrp	x10, _toshiba_acpi_alt_keymap@GOTPAGE
Lloh25:
	ldr	x10, [x10, _toshiba_acpi_alt_keymap@GOTPAGEOFF]
	cmp	x9, #0
	csel	x8, x8, x10, eq
LBB0_12:
	ldr	x1, [x8]
	mov	x2, #0
	bl	_sparse_keymap_setup
	mov	x20, x0
	cbz	w0, LBB0_15
LBB0_13:
	ldr	x0, [x19, #24]
	bl	_input_free_device
	str	xzr, [x19, #24]
	b	LBB0_5
LBB0_14:
Lloh26:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_5
LBB0_15:
	bl	_ec_get_handle
	cbz	x0, LBB0_20
; %bb.16:
Lloh29:
	adrp	x1, l_.str.6@PAGE
Lloh30:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_acpi_has_method
	cbz	x0, LBB0_20
; %bb.17:
	add	x0, x19, #40
Lloh31:
	adrp	x8, _toshiba_acpi_hotkey_work@GOTPAGE
Lloh32:
	ldr	x8, [x8, _toshiba_acpi_hotkey_work@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	bl	_INIT_WORK
Lloh34:
	adrp	x8, _toshiba_acpi_i8042_filter@GOTPAGE
Lloh35:
	ldr	x8, [x8, _toshiba_acpi_i8042_filter@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
	bl	_i8042_install_filter
	cbz	w0, LBB0_19
; %bb.18:
	mov	x20, x0
Lloh37:
	adrp	x0, l_.str.7@PAGE
Lloh38:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_pr_err
	b	LBB0_13
LBB0_19:
	mov	w8, #1
	str	w8, [x19, #8]
LBB0_20:
	ldr	x8, [x19, #32]
	ldr	x0, [x8]
Lloh39:
	adrp	x1, l_.str.8@PAGE
Lloh40:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_acpi_has_method
	cbz	x0, LBB0_22
; %bb.21:
	mov	w8, #1
	str	w8, [x19, #12]
	b	LBB0_24
LBB0_22:
Lloh41:
	adrp	x8, _HCI_SYSTEM_EVENT@GOTPAGE
Lloh42:
	ldr	x8, [x8, _HCI_SYSTEM_EVENT@GOTPAGEOFF]
Lloh43:
	ldr	w1, [x8]
	mov	w20, #1
	mov	x0, x19
	mov	w2, #1
	bl	_hci_write
Lloh44:
	adrp	x8, _TOS_SUCCESS@GOTPAGE
Lloh45:
	ldr	x8, [x8, _TOS_SUCCESS@GOTPAGEOFF]
Lloh46:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_24
; %bb.23:
	str	w20, [x19, #16]
LBB0_24:
	ldr	w8, [x19, #12]
	cbnz	w8, LBB0_26
; %bb.25:
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_28
LBB0_26:
	ldr	x0, [x19, #24]
	bl	_input_register_device
	mov	x20, x0
	cbz	w0, LBB0_5
; %bb.27:
Lloh47:
	adrp	x0, l_.str.10@PAGE
Lloh48:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_pr_info
	b	LBB0_29
LBB0_28:
Lloh49:
	adrp	x0, l_.str.9@PAGE
Lloh50:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_pr_warn
	mov	w20, #0
LBB0_29:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_13
; %bb.30:
Lloh51:
	adrp	x8, _toshiba_acpi_i8042_filter@GOTPAGE
Lloh52:
	ldr	x8, [x8, _toshiba_acpi_i8042_filter@GOTPAGEOFF]
Lloh53:
	ldr	w0, [x8]
	bl	_i8042_remove_filter
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.cfi_endproc
                                        ; -- End function
	.comm	_toshiba_acpi_keymap,8,3        ; @toshiba_acpi_keymap
	.comm	_disable_hotkeys,8,3            ; @disable_hotkeys
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Hotkeys disabled by module parameter\n"

	.comm	_TOSHIBA_WMI_EVENT_GUID,4,2     ; @TOSHIBA_WMI_EVENT_GUID
l_.str.1:                               ; @.str.1
	.asciz	"WMI event detected, hotkeys will not be monitored\n"

l_.str.2:                               ; @.str.2
	.asciz	"Unable to query Hotkey Event Type\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.3:                               ; @.str.3
	.asciz	"Toshiba input device"

l_.str.4:                               ; @.str.4
	.asciz	"toshiba_acpi/input0"

	.comm	_BUS_HOST,4,2                   ; @BUS_HOST
	.comm	_HCI_SYSTEM_TYPE1,8,3           ; @HCI_SYSTEM_TYPE1
	.comm	_HCI_SYSTEM_TYPE2,8,3           ; @HCI_SYSTEM_TYPE2
	.comm	_toshiba_acpi_alt_keymap,8,3    ; @toshiba_acpi_alt_keymap
l_.str.6:                               ; @.str.6
	.asciz	"NTFY"

	.comm	_toshiba_acpi_hotkey_work,4,2   ; @toshiba_acpi_hotkey_work
	.comm	_toshiba_acpi_i8042_filter,4,2  ; @toshiba_acpi_i8042_filter
l_.str.7:                               ; @.str.7
	.asciz	"Error installing key filter\n"

l_.str.8:                               ; @.str.8
	.asciz	"INFO"

	.comm	_HCI_SYSTEM_EVENT,4,2           ; @HCI_SYSTEM_EVENT
	.comm	_TOS_SUCCESS,8,3                ; @TOS_SUCCESS
l_.str.9:                               ; @.str.9
	.asciz	"No hotkey query interface found\n"

l_.str.10:                              ; @.str.10
	.asciz	"Unable to register input device\n"

	.no_dead_strip	_toshiba_acpi_setup_keyboard
.subsections_via_symbols
