	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function detect_tablet_mode
_detect_tablet_mode:                    ## @detect_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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_DMI_CHASSIS_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_dmi_get_system_info
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_dev_get_drvdata
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_ACPI_HANDLE
	movl	%eax, %r15d
	movq	_ACPI_ALLOCATE_BUFFER@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	%rax, -56(%rbp)
	movq	$0, -48(%rbp)
	movl	$0, -40(%rbp)
	testq	%r12, %r12
	je	LBB0_6
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_6
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	leaq	-56(%rbp), %rcx
	movl	%r15d, %edi
	xorl	%edx, %edx
	callq	_acpi_evaluate_object
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_3
LBB0_6:
	movq	-56(%rbp), %rdi
	callq	_kfree
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	-56(%rbp), %rbx
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.4:
	movq	(%rbx), %rax
	movq	_ACPI_TYPE_INTEGER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	movq	_TABLET_MODE_FLAG@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	andl	(%rcx), %eax
	sete	%dl
	movl	(%r14), %edi
	movq	_SW_TABLET_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_input_report_switch
	movq	_DOCK_MODE_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%edx, %edx
	andl	(%rbx), %eax
	setne	%dl
	movl	(%r14), %edi
	movq	_SW_DOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_input_report_switch
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_DMI_CHASSIS_TYPE,4,2           ## @DMI_CHASSIS_TYPE
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ## @ACPI_ALLOCATE_BUFFER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"31"

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

	.comm	_ACPI_TYPE_INTEGER,8,3          ## @ACPI_TYPE_INTEGER
	.comm	_TABLET_MODE_FLAG,4,2           ## @TABLET_MODE_FLAG
	.comm	_SW_TABLET_MODE,4,2             ## @SW_TABLET_MODE
	.comm	_DOCK_MODE_FLAG,4,2             ## @DOCK_MODE_FLAG
	.comm	_SW_DOCK,4,2                    ## @SW_DOCK
	.no_dead_strip	_detect_tablet_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function detect_tablet_mode
_detect_tablet_mode:                    ; @detect_tablet_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x0
Lloh0:
	adrp	x8, _DMI_CHASSIS_TYPE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMI_CHASSIS_TYPE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_dmi_get_system_info
	mov	x21, x0
	mov	x0, x20
	bl	_dev_get_drvdata
	mov	x19, x0
	mov	x0, x20
	bl	_ACPI_HANDLE
Lloh3:
	adrp	x8, _ACPI_ALLOCATE_BUFFER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ACPI_ALLOCATE_BUFFER@GOTPAGEOFF]
Lloh5:
	ldrsw	x8, [x8]
	stp	x8, xzr, [sp, #8]
	str	wzr, [sp, #24]
	cbz	x21, LBB0_3
; %bb.1:
	mov	x20, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_strcmp
	cbnz	x0, LBB0_3
; %bb.2:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x3, sp, #8
	mov	x0, x20
	mov	x2, #0
	bl	_acpi_evaluate_object
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_4
LBB0_3:
	ldr	x0, [sp, #8]
	bl	_kfree
	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
	add	sp, sp, #80
	ret
LBB0_4:
	ldr	x20, [sp, #8]
	cbz	x20, LBB0_3
; %bb.5:
	ldr	x8, [x20]
Lloh10:
	adrp	x9, _ACPI_TYPE_INTEGER@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ACPI_TYPE_INTEGER@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.6:
Lloh13:
	adrp	x9, _TABLET_MODE_FLAG@GOTPAGE
Lloh14:
	ldr	x9, [x9, _TABLET_MODE_FLAG@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w2, eq
	ldr	w0, [x19]
Lloh16:
	adrp	x8, _SW_TABLET_MODE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SW_TABLET_MODE@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	bl	_input_report_switch
	ldr	w8, [x20]
Lloh19:
	adrp	x9, _DOCK_MODE_FLAG@GOTPAGE
Lloh20:
	ldr	x9, [x9, _DOCK_MODE_FLAG@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w2, ne
	ldr	w0, [x19]
Lloh22:
	adrp	x8, _SW_DOCK@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SW_DOCK@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	bl	_input_report_switch
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_DMI_CHASSIS_TYPE,4,2           ; @DMI_CHASSIS_TYPE
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ; @ACPI_ALLOCATE_BUFFER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"31"

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

	.comm	_ACPI_TYPE_INTEGER,8,3          ; @ACPI_TYPE_INTEGER
	.comm	_TABLET_MODE_FLAG,4,2           ; @TABLET_MODE_FLAG
	.comm	_SW_TABLET_MODE,4,2             ; @SW_TABLET_MODE
	.comm	_DOCK_MODE_FLAG,4,2             ; @DOCK_MODE_FLAG
	.comm	_SW_DOCK,4,2                    ; @SW_DOCK
	.no_dead_strip	_detect_tablet_mode
.subsections_via_symbols
