	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function applesmc_read_motion_sensor
_applesmc_read_motion_sensor:           ## @applesmc_read_motion_sensor
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	cmpl	$128, %edi
	je	LBB0_6
## %bb.1:
	cmpl	$129, %edi
	je	LBB0_5
## %bb.2:
	cmpl	$130, %edi
	jne	LBB0_7
## %bb.3:
	movq	_MOTION_SENSOR_X_KEY@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_6:
	movq	_MOTION_SENSOR_Z_KEY@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_5:
	movq	_MOTION_SENSOR_Y_KEY@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %edi
	leaq	-24(%rbp), %rsi
	movl	$2, %edx
	callq	_applesmc_read_key
	jmp	LBB0_8
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	movl	-24(%rbp), %ecx
	shll	$8, %ecx
	orl	-20(%rbp), %ecx
	movl	%ecx, (%rbx)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-16(%rbp), %rcx
	jne	LBB0_10
## %bb.9:
	addq	$24, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MOTION_SENSOR_X_KEY,4,2        ## @MOTION_SENSOR_X_KEY
	.comm	_MOTION_SENSOR_Y_KEY,4,2        ## @MOTION_SENSOR_Y_KEY
	.comm	_MOTION_SENSOR_Z_KEY,4,2        ## @MOTION_SENSOR_Z_KEY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_applesmc_read_motion_sensor
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function applesmc_read_motion_sensor
_applesmc_read_motion_sensor:           ; @applesmc_read_motion_sensor
	.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
	mov	x19, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	cmp	w0, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w0, #129
	b.eq	LBB0_5
; %bb.2:
	cmp	w0, #130
	b.ne	LBB0_7
; %bb.3:
Lloh3:
	adrp	x8, _MOTION_SENSOR_X_KEY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MOTION_SENSOR_X_KEY@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh5:
	adrp	x8, _MOTION_SENSOR_Z_KEY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MOTION_SENSOR_Z_KEY@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh7:
	adrp	x8, _MOTION_SENSOR_Y_KEY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MOTION_SENSOR_Y_KEY@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x8]
	mov	x1, sp
	mov	w2, #2
	bl	_applesmc_read_key
	b	LBB0_8
LBB0_7:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	w8, w9, [sp]
	orr	w8, w9, w8, lsl #8
	str	w8, [x19]
	ldr	x8, [sp, #8]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MOTION_SENSOR_X_KEY,4,2        ; @MOTION_SENSOR_X_KEY
	.comm	_MOTION_SENSOR_Y_KEY,4,2        ; @MOTION_SENSOR_Y_KEY
	.comm	_MOTION_SENSOR_Z_KEY,4,2        ; @MOTION_SENSOR_Z_KEY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_applesmc_read_motion_sensor
.subsections_via_symbols
