	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hotkey_init_tablet_mode
_hotkey_init_tablet_mode:               ## @hotkey_init_tablet_mode
	.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	_hkey_handle@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rbx
	leaq	L_.str.1(%rip), %rcx
	xorl	%r14d, %r14d
	leaq	-28(%rbp), %rsi
	movq	%rbx, %rdx
	xorl	%r8d, %r8d
	xorl	%eax, %eax
	callq	_acpi_evalf
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movl	-28(%rbp), %edi
	leaq	-32(%rbp), %rsi
	callq	_hotkey_gmms_get_tablet_mode
	movl	%eax, %r14d
	cmpl	$0, -32(%rbp)
	je	LBB0_6
## %bb.2:
	movq	_TP_HOTKEY_TABLET_USES_GMMS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_tp_features@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_6
LBB0_3:
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rbx
	leaq	L_.str.3(%rip), %rcx
	leaq	-28(%rbp), %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_acpi_evalf
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	_TP_HOTKEY_TABLET_USES_MHKG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_tp_features@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_TP_HOTKEY_TABLET_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r14d, %r14d
	testl	%eax, -28(%rbp)
	setne	%r14b
	jmp	LBB0_6
LBB0_4:
	xorl	%ebx, %ebx
LBB0_6:
	movq	_tp_features@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_7
## %bb.8:
	testl	%r14d, %r14d
	leaq	L_.str.6(%rip), %rax
	leaq	L_.str.5(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.4(%rip), %rdi
	movq	%rbx, %rsi
	callq	_pr_info
	movq	_hotkey_dev_attributes@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_dev_attr_hotkey_tablet_mode@GOTPCREL(%rip), %rsi
	callq	_add_to_attr_set
	movl	%eax, %ecx
	xorl	%eax, %eax
	negl	%ecx
	sbbl	%eax, %eax
	orl	%r14d, %eax
	jmp	LBB0_9
LBB0_7:
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_hkey_handle,4,2                ## @hkey_handle
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GMMS"

L_.str.1:                               ## @.str.1
	.asciz	"qdd"

	.comm	_TP_HOTKEY_TABLET_USES_GMMS,4,2 ## @TP_HOTKEY_TABLET_USES_GMMS
	.comm	_tp_features,4,2                ## @tp_features
L_.str.2:                               ## @.str.2
	.asciz	"MHKG"

L_.str.3:                               ## @.str.3
	.asciz	"qd"

	.comm	_TP_HOTKEY_TABLET_USES_MHKG,4,2 ## @TP_HOTKEY_TABLET_USES_MHKG
	.comm	_TP_HOTKEY_TABLET_MASK,4,2      ## @TP_HOTKEY_TABLET_MASK
L_.str.4:                               ## @.str.4
	.asciz	"Tablet mode switch found (type: %s), currently in %s mode\n"

L_.str.5:                               ## @.str.5
	.asciz	"tablet"

L_.str.6:                               ## @.str.6
	.asciz	"laptop"

	.comm	_hotkey_dev_attributes,4,2      ## @hotkey_dev_attributes
	.comm	_dev_attr_hotkey_tablet_mode,4,2 ## @dev_attr_hotkey_tablet_mode
	.no_dead_strip	_hotkey_init_tablet_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hotkey_init_tablet_mode
_hotkey_init_tablet_mode:               ; @hotkey_init_tablet_mode
	.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
Lloh0:
	adrp	x19, _hkey_handle@GOTPAGE
Lloh1:
	ldr	x19, [x19, _hkey_handle@GOTPAGEOFF]
	ldr	w0, [x19]
	str	xzr, [sp]
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
Lloh4:
	adrp	x3, l_.str.1@PAGE
Lloh5:
	add	x3, x3, l_.str.1@PAGEOFF
	add	x1, sp, #12
	bl	_acpi_evalf
Lloh6:
	adrp	x20, _tp_features@GOTPAGE
Lloh7:
	ldr	x20, [x20, _tp_features@GOTPAGEOFF]
	cbz	x0, LBB0_4
; %bb.1:
	ldr	w0, [sp, #12]
	add	x1, sp, #8
	bl	_hotkey_gmms_get_tablet_mode
	mov	x19, x0
	ldr	w8, [sp, #8]
	cbz	w8, LBB0_3
; %bb.2:
Lloh8:
	adrp	x8, _TP_HOTKEY_TABLET_USES_GMMS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TP_HOTKEY_TABLET_USES_GMMS@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x20]
LBB0_3:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	ldr	w8, [x20]
	cbnz	w8, LBB0_6
	b	LBB0_8
LBB0_4:
	ldr	w0, [x19]
Lloh13:
	adrp	x2, l_.str.2@PAGE
Lloh14:
	add	x2, x2, l_.str.2@PAGEOFF
Lloh15:
	adrp	x3, l_.str.3@PAGE
Lloh16:
	add	x3, x3, l_.str.3@PAGEOFF
	add	x1, sp, #12
	bl	_acpi_evalf
	cbz	x0, LBB0_7
; %bb.5:
Lloh17:
	adrp	x8, _TP_HOTKEY_TABLET_USES_MHKG@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TP_HOTKEY_TABLET_USES_MHKG@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x20]
Lloh20:
	adrp	x8, _TP_HOTKEY_TABLET_MASK@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TP_HOTKEY_TABLET_MASK@GOTPAGEOFF]
	ldr	w9, [sp, #12]
Lloh22:
	ldr	w8, [x8]
	tst	w8, w9
	cset	w19, ne
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	ldr	w8, [x20]
	cbz	w8, LBB0_8
LBB0_6:
Lloh25:
	adrp	x8, l_.str.5@PAGE
Lloh26:
	add	x8, x8, l_.str.5@PAGEOFF
Lloh27:
	adrp	x9, l_.str.6@PAGE
Lloh28:
	add	x9, x9, l_.str.6@PAGEOFF
	cmp	w19, #0
	csel	x2, x9, x8, eq
Lloh29:
	adrp	x0, l_.str.4@PAGE
Lloh30:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_info
Lloh31:
	adrp	x8, _hotkey_dev_attributes@GOTPAGE
Lloh32:
	ldr	x8, [x8, _hotkey_dev_attributes@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
Lloh34:
	adrp	x1, _dev_attr_hotkey_tablet_mode@GOTPAGE
Lloh35:
	ldr	x1, [x1, _dev_attr_hotkey_tablet_mode@GOTPAGEOFF]
	bl	_add_to_attr_set
	cmp	w0, #0
	csinv	w0, w19, wzr, eq
	b	LBB0_9
LBB0_7:
	mov	w19, #0
	mov	x1, #0
	ldr	w8, [x20]
	cbnz	w8, LBB0_6
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_hkey_handle,4,2                ; @hkey_handle
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GMMS"

l_.str.1:                               ; @.str.1
	.asciz	"qdd"

	.comm	_TP_HOTKEY_TABLET_USES_GMMS,4,2 ; @TP_HOTKEY_TABLET_USES_GMMS
	.comm	_tp_features,4,2                ; @tp_features
l_.str.2:                               ; @.str.2
	.asciz	"MHKG"

l_.str.3:                               ; @.str.3
	.asciz	"qd"

	.comm	_TP_HOTKEY_TABLET_USES_MHKG,4,2 ; @TP_HOTKEY_TABLET_USES_MHKG
	.comm	_TP_HOTKEY_TABLET_MASK,4,2      ; @TP_HOTKEY_TABLET_MASK
l_.str.4:                               ; @.str.4
	.asciz	"Tablet mode switch found (type: %s), currently in %s mode\n"

l_.str.5:                               ; @.str.5
	.asciz	"tablet"

l_.str.6:                               ; @.str.6
	.asciz	"laptop"

	.comm	_hotkey_dev_attributes,4,2      ; @hotkey_dev_attributes
	.comm	_dev_attr_hotkey_tablet_mode,4,2 ; @dev_attr_hotkey_tablet_mode
	.no_dead_strip	_hotkey_init_tablet_mode
.subsections_via_symbols
