	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cros_ec_sensors_core_init      ## -- Begin function cros_ec_sensors_core_init
	.p2align	4, 0x90
_cros_ec_sensors_core_init:             ## @cros_ec_sensors_core_init
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r13
	leaq	4(%rdi), %rbx
	movq	%rsi, %rdi
	callq	_iio_priv
	movq	%rax, %r12
	movl	4(%r13), %edi
	callq	_dev_get_drvdata
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_dev_get_platdata
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_platform_set_drvdata
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	8(%r14), %rax
	movq	%rax, 56(%r12)
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_max
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_devm_kzalloc
	movq	%rax, 16(%r12)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	16(%rax), %rax
	movq	%rax, (%r12)
	movq	%r12, %rdi
	addq	$64, %rdi
	callq	_mutex_init
	movq	56(%r12), %rdi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rsi
	movq	_EC_CMD_MOTION_SENSE_CMD@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	leaq	-48(%rbp), %rcx
	callq	_cros_ec_get_host_cmd_version_mask
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	-48(%rbp), %edi
	callq	_fls
	decl	%eax
	movq	16(%r12), %rcx
	movl	%eax, (%rcx)
	movq	(%rbx), %rax
	movq	_EC_CMD_MOTION_SENSE_CMD@GOTPCREL(%rip), %rdx
	addq	(%rdx), %rax
	movq	%rax, 8(%rcx)
	movl	$4, 4(%rcx)
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, 8(%r15)
	movl	(%r13), %eax
	movl	%eax, 4(%r15)
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_13
## %bb.5:
	movq	_INDIO_DIRECT_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	_MOTIONSENSE_CMD_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r12)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movl	%eax, 44(%r12)
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_cros_ec_motion_send_host_cmd
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_warn
	jmp	LBB0_14
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_14
LBB0_3:
	movl	%eax, %r14d
	jmp	LBB0_14
LBB0_7:
	movq	(%r12), %rax
	movl	16(%rax), %ecx
	movl	%ecx, 40(%r12)
	movl	20(%rax), %eax
	movl	%eax, 36(%r12)
	movl	32(%r12), %edi
	movq	_CROS_EC_SENSOR_MAX_AXIS@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movl	$1, %esi
	callq	_memset
	movq	_CROS_EC_SENSOR_X@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpl	(%r14), %eax
	jge	LBB0_10
## %bb.8:
	movq	24(%r12), %rcx
	movq	_MOTION_SENSE_DEFAULT_SCALE@GOTPCREL(%rip), %rdx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rdx), %esi
	movl	%esi, (%rcx,%rax,4)
	incq	%rax
	movslq	(%r14), %rsi
	cmpq	%rsi, %rax
	jl	LBB0_9
LBB0_10:
	movq	8(%r12), %rdx
	movq	$0, (%rdx)
	movq	(%r12), %rax
	movq	16(%r12), %rcx
	cmpl	$2, (%rcx)
	jg	LBB0_12
## %bb.11:
	movl	16(%rax), %edi
	leaq	8(%rdx), %rsi
	addq	$16, %rdx
	callq	_get_default_min_max_freq
	jmp	LBB0_13
LBB0_12:
	movq	8(%rax), %rcx
	movq	%rcx, 8(%rdx)
	movq	(%rax), %rax
	movq	%rax, 16(%rdx)
LBB0_13:
	xorl	%r14d, %r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EC_CMD_MOTION_SENSE_CMD,8,3    ## @EC_CMD_MOTION_SENSE_CMD
	.comm	_INDIO_DIRECT_MODE,4,2          ## @INDIO_DIRECT_MODE
	.comm	_MOTIONSENSE_CMD_INFO,4,2       ## @MOTIONSENSE_CMD_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can not access sensor info\n"

	.comm	_CROS_EC_SENSOR_MAX_AXIS,4,2    ## @CROS_EC_SENSOR_MAX_AXIS
	.comm	_CROS_EC_SENSOR_X,4,2           ## @CROS_EC_SENSOR_X
	.comm	_MOTION_SENSE_DEFAULT_SCALE,4,2 ## @MOTION_SENSE_DEFAULT_SCALE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cros_ec_sensors_core_init      ; -- Begin function cros_ec_sensors_core_init
	.p2align	2
_cros_ec_sensors_core_init:             ; @cros_ec_sensors_core_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x2
	mov	x21, x1
	mov	x23, x0
	mov	x0, x1
	bl	_iio_priv
	mov	x19, x0
	mov	x20, x23
	ldr	w0, [x20, #4]!
	bl	_dev_get_drvdata
	mov	x25, x0
	mov	x0, x20
	bl	_dev_get_platdata
	mov	x24, x0
	mov	x0, x23
	mov	x1, x21
	bl	_platform_set_drvdata
	ldr	x8, [x25, #8]
	str	x8, [x19, #56]
	ldr	w1, [x8]
	mov	w0, #4
	bl	_max
	mov	x1, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_devm_kzalloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_5
; %bb.1:
	ldr	x8, [x0, #16]
	str	x8, [x19]
	add	x0, x19, #64
	bl	_mutex_init
	ldr	x0, [x19, #56]
	ldr	x1, [x25]
Lloh3:
	adrp	x27, _EC_CMD_MOTION_SENSE_CMD@GOTPAGE
Lloh4:
	ldr	x27, [x27, _EC_CMD_MOTION_SENSE_CMD@GOTPAGEOFF]
	ldr	x2, [x27]
	add	x3, sp, #12
	bl	_cros_ec_get_host_cmd_version_mask
	tbnz	w0, #31, LBB0_6
; %bb.2:
	ldr	w0, [sp, #12]
	bl	_fls
	sub	w8, w0, #1
	ldr	x9, [x19, #16]
	ldr	x10, [x27]
	ldr	x11, [x25]
	add	x10, x11, x10
	str	x10, [x9, #8]
	mov	w10, #4
	stp	w8, w10, [x9]
	str	x20, [x21, #8]
	ldr	w8, [x23]
	str	w8, [x21, #4]
	cbz	w22, LBB0_7
; %bb.3:
Lloh5:
	adrp	x8, _INDIO_DIRECT_MODE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _INDIO_DIRECT_MODE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x21]
Lloh8:
	adrp	x8, _MOTIONSENSE_CMD_INFO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MOTIONSENSE_CMD_INFO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	w9, [x24]
	stp	w9, w8, [x19, #44]
	mov	x0, x19
	mov	w1, #0
	bl	_cros_ec_motion_send_host_cmd
	cbz	w0, LBB0_8
; %bb.4:
	mov	x26, x0
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
	b	LBB0_14
LBB0_5:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w26, w8
	b	LBB0_14
LBB0_6:
	mov	x26, x0
	b	LBB0_14
LBB0_7:
	mov	w26, #0
	b	LBB0_14
LBB0_8:
	ldr	x8, [x19]
	ldr	d0, [x8, #16]
	rev64.2s	v0, v0
	stur	d0, [x19, #36]
	ldr	w0, [x19, #32]
Lloh16:
	adrp	x20, _CROS_EC_SENSOR_MAX_AXIS@GOTPAGE
Lloh17:
	ldr	x20, [x20, _CROS_EC_SENSOR_MAX_AXIS@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	w1, #1
	bl	_memset
Lloh18:
	adrp	x8, _CROS_EC_SENSOR_X@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CROS_EC_SENSOR_X@GOTPAGEOFF]
Lloh20:
	ldrsw	x8, [x8]
	ldr	w9, [x20]
	cmp	w8, w9
	b.ge	LBB0_11
; %bb.9:
	ldr	x9, [x19, #24]
Lloh21:
	adrp	x10, _MOTION_SENSE_DEFAULT_SCALE@GOTPAGE
Lloh22:
	ldr	x10, [x10, _MOTION_SENSE_DEFAULT_SCALE@GOTPAGEOFF]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10]
	str	w11, [x9, x8, lsl #2]
	add	x8, x8, #1
	ldrsw	x11, [x20]
	cmp	x8, x11
	b.lt	LBB0_10
LBB0_11:
	ldp	x9, x8, [x19]
	str	xzr, [x8]
	ldr	x10, [x19, #16]
	ldr	w10, [x10]
	cmp	w10, #2
	b.gt	LBB0_13
; %bb.12:
	ldr	w0, [x9, #16]
	add	x1, x8, #8
	add	x2, x8, #16
	bl	_get_default_min_max_freq
	mov	w26, #0
	b	LBB0_14
LBB0_13:
	mov	w26, #0
	ldr	x10, [x9, #8]
	str	x10, [x8, #8]
	ldr	x9, [x9]
	str	x9, [x8, #16]
LBB0_14:
	mov	x0, x26
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EC_CMD_MOTION_SENSE_CMD,8,3    ; @EC_CMD_MOTION_SENSE_CMD
	.comm	_INDIO_DIRECT_MODE,4,2          ; @INDIO_DIRECT_MODE
	.comm	_MOTIONSENSE_CMD_INFO,4,2       ; @MOTIONSENSE_CMD_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can not access sensor info\n"

	.comm	_CROS_EC_SENSOR_MAX_AXIS,4,2    ; @CROS_EC_SENSOR_MAX_AXIS
	.comm	_CROS_EC_SENSOR_X,4,2           ; @CROS_EC_SENSOR_X
	.comm	_MOTION_SENSE_DEFAULT_SCALE,4,2 ; @MOTION_SENSE_DEFAULT_SCALE
.subsections_via_symbols
