	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function toshiba_acpi_process_hotkeys
_toshiba_acpi_process_hotkeys:          ## @toshiba_acpi_process_hotkeys
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	cmpq	$0, 16(%rdi)
	je	LBB0_4
## %bb.1:
	movq	%r12, %rdi
	callq	_toshiba_acpi_query_hotkey
	testl	%eax, %eax
	js	LBB0_15
## %bb.2:
	je	LBB0_14
## %bb.3:
	movl	%eax, %r14d
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_toshiba_acpi_report_hotkey
	movl	$1, (%r12)
	movl	%r14d, 4(%r12)
	jmp	LBB0_14
LBB0_4:
	cmpq	$0, 8(%r12)
	je	LBB0_14
## %bb.5:
	movl	$3, %ebx
	movq	_HCI_SYSTEM_EVENT@GOTPCREL(%rip), %r13
	leaq	-44(%rbp), %r14
	movq	_TOS_FIFO_EMPTY@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%r12, %rdi
	movq	%r14, %rdx
	callq	_hci_read
	cmpl	$129, %eax
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpl	$128, %eax
	jne	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	-44(%rbp), %esi
	movq	%r12, %rdi
	callq	_toshiba_acpi_report_hotkey
	movl	$1, (%r12)
	movl	-44(%rbp), %eax
	movl	%eax, 4(%r12)
	movl	$128, %eax
	testl	%ebx, %ebx
	jne	LBB0_13
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r13), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_hci_write
	cmpl	$128, %eax
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_notice
	movl	$128, %eax
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	decl	%ebx
	testl	%ebx, %ebx
	je	LBB0_14
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	cmpl	(%r15), %eax
	jne	LBB0_6
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	leaq	L_.str(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pr_err                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to query hotkey event\n"

	.comm	_HCI_SYSTEM_EVENT,4,2           ## @HCI_SYSTEM_EVENT
L_.str.1:                               ## @.str.1
	.asciz	"Re-enabled hotkeys\n"

	.comm	_TOS_FIFO_EMPTY,4,2             ## @TOS_FIFO_EMPTY
	.no_dead_strip	_toshiba_acpi_process_hotkeys
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function toshiba_acpi_process_hotkeys
_toshiba_acpi_process_hotkeys:          ; @toshiba_acpi_process_hotkeys
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x0, x19
	bl	_toshiba_acpi_query_hotkey
	tbnz	w0, #31, LBB0_14
; %bb.2:
	mov	x20, x0
	cbz	w0, LBB0_13
; %bb.3:
	mov	x0, x19
	mov	x1, x20
	bl	_toshiba_acpi_report_hotkey
	mov	w8, #1
	stp	w8, w20, [x19]
	b	LBB0_13
LBB0_4:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_13
; %bb.5:
Lloh0:
	adrp	x21, _HCI_SYSTEM_EVENT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _HCI_SYSTEM_EVENT@GOTPAGEOFF]
	mov	w22, #3
	mov	w23, #1
Lloh2:
	adrp	x24, _TOS_FIFO_EMPTY@GOTPAGE
Lloh3:
	ldr	x24, [x24, _TOS_FIFO_EMPTY@GOTPAGEOFF]
Lloh4:
	adrp	x20, l_.str.1@PAGE
Lloh5:
	add	x20, x20, l_.str.1@PAGEOFF
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_hci_read
	cmp	w0, #129
	b.eq	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w0, #128
	b.ne	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_toshiba_acpi_report_hotkey
	ldr	w8, [sp, #12]
	stp	w23, w8, [x19]
	mov	w0, #128
	cbnz	w22, LBB0_12
	b	LBB0_13
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #1
	bl	_hci_write
	cmp	w0, #128
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x20
	bl	_pr_notice
	mov	w0, #128
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	sub	w22, w22, #1
	cbz	w22, LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_6
LBB0_13:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_14:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_pr_err
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to query hotkey event\n"

	.comm	_HCI_SYSTEM_EVENT,4,2           ; @HCI_SYSTEM_EVENT
l_.str.1:                               ; @.str.1
	.asciz	"Re-enabled hotkeys\n"

	.comm	_TOS_FIFO_EMPTY,4,2             ; @TOS_FIFO_EMPTY
	.no_dead_strip	_toshiba_acpi_process_hotkeys
.subsections_via_symbols
