	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cros_ec_sensors_core_write     ## -- Begin function cros_ec_sensors_core_write
	.p2align	4, 0x90
_cros_ec_sensors_core_write:            ## @cros_ec_sensors_core_write
	.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
	movl	%edx, %r14d
	movq	%rdi, %rbx
	cmpq	$128, %r8
	je	LBB0_3
## %bb.1:
	cmpq	$129, %r8
	jne	LBB0_5
## %bb.2:
	movq	_MOTIONSENSE_CMD_SENSOR_ODR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movl	%r14d, 12(%rbx)
	movl	$1, 16(%rbx)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_cros_ec_motion_send_host_cmd   ## TAILCALL
LBB0_3:
	movq	_MOTIONSENSE_CMD_EC_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movl	%r14d, 4(%rbx)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_cros_ec_motion_send_host_cmd
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movl	%r14d, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MOTIONSENSE_CMD_SENSOR_ODR,4,2 ## @MOTIONSENSE_CMD_SENSOR_ODR
	.comm	_MOTIONSENSE_CMD_EC_RATE,4,2    ## @MOTIONSENSE_CMD_EC_RATE
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cros_ec_sensors_core_write     ; -- Begin function cros_ec_sensors_core_write
	.p2align	2
_cros_ec_sensors_core_write:            ; @cros_ec_sensors_core_write
	.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
	mov	x20, x2
	mov	x19, x0
	cmp	x4, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	x4, #129
	b.ne	LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _MOTIONSENSE_CMD_SENSOR_ODR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MOTIONSENSE_CMD_SENSOR_ODR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stp	w8, w20, [x19, #8]
	mov	w8, #1
	str	w8, [x19, #16]
	mov	x0, x19
	mov	w1, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_cros_ec_motion_send_host_cmd
LBB0_3:
Lloh3:
	adrp	x8, _MOTIONSENSE_CMD_EC_RATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MOTIONSENSE_CMD_EC_RATE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	stp	w20, w8, [x19, #4]
	mov	x0, x19
	mov	w1, #0
	bl	_cros_ec_motion_send_host_cmd
	cbnz	w0, LBB0_6
; %bb.4:
	str	w20, [x19]
	b	LBB0_6
LBB0_5:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MOTIONSENSE_CMD_SENSOR_ODR,4,2 ; @MOTIONSENSE_CMD_SENSOR_ODR
	.comm	_MOTIONSENSE_CMD_EC_RATE,4,2    ; @MOTIONSENSE_CMD_EC_RATE
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
