	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cros_ec_accel_legacy_probe
_cros_ec_accel_legacy_probe:            ## @cros_ec_accel_legacy_probe
	.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	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_dev_get_drvdata
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	cmpl	$0, (%rax)
	je	LBB0_2
## %bb.3:
	movq	%rbx, %rdi
	movl	$32, %esi
	callq	_devm_iio_device_alloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movq	%rax, %r14
	movq	%rbx, %rdi
	movq	%rax, %rsi
	movl	$1, %edx
	callq	_cros_ec_sensors_core_init
	testl	%eax, %eax
	jne	LBB0_13
## %bb.7:
	movq	_cros_ec_accel_legacy_info@GOTPCREL(%rip), %rax
	movq	%rax, 8(%r14)
	movq	%r14, %rdi
	callq	_iio_priv
	movq	%rax, %r15
	movq	24(%rax), %rax
	cmpq	$0, (%rax)
	jne	LBB0_8
## %bb.9:
	movq	_cros_ec_accel_legacy_read_cmd@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_warn
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_5:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_8:
	movq	_cros_ec_sensors_read_lpc@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
	movq	_cros_ec_accel_legacy_channels@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, 4(%r14)
	callq	_ARRAY_SIZE
	movl	%eax, (%r14)
	movq	(%r15), %rax
	movq	_MOTIONSENSE_LOC_LID@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.11:
	movq	8(%r15), %rax
	movq	_CROS_EC_SENSOR_X@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	$-1, (%rax,%rcx,4)
	movq	_CROS_EC_SENSOR_Z@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	$-1, (%rax,%rcx,4)
LBB0_12:
	movq	_cros_ec_sensors_capture@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_devm_iio_triggered_buffer_setup
	testl	%eax, %eax
	jne	LBB0_13
## %bb.14:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_devm_iio_device_register       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No EC device found.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_cros_ec_accel_legacy_info,4,2  ## @cros_ec_accel_legacy_info
	.comm	_cros_ec_sensors_read_lpc,4,2   ## @cros_ec_sensors_read_lpc
	.comm	_cros_ec_accel_legacy_read_cmd,4,2 ## @cros_ec_accel_legacy_read_cmd
	.comm	_cros_ec_accel_legacy_channels,4,2 ## @cros_ec_accel_legacy_channels
	.comm	_MOTIONSENSE_LOC_LID,8,3        ## @MOTIONSENSE_LOC_LID
	.comm	_CROS_EC_SENSOR_X,8,3           ## @CROS_EC_SENSOR_X
	.comm	_CROS_EC_SENSOR_Z,8,3           ## @CROS_EC_SENSOR_Z
	.comm	_cros_ec_sensors_capture,4,2    ## @cros_ec_sensors_capture
	.no_dead_strip	_cros_ec_accel_legacy_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cros_ec_accel_legacy_probe
_cros_ec_accel_legacy_probe:            ; @cros_ec_accel_legacy_probe
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	ldr	w0, [x0]
	bl	_dev_get_drvdata
	cbz	x0, LBB0_8
; %bb.1:
	ldr	w8, [x0]
	cbz	w8, LBB0_8
; %bb.2:
	mov	x0, x19
	mov	w1, #32
	bl	_devm_iio_device_alloc
	cbz	x0, LBB0_11
; %bb.3:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_cros_ec_sensors_core_init
	cbnz	w0, LBB0_10
; %bb.4:
Lloh0:
	adrp	x8, _cros_ec_accel_legacy_info@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cros_ec_accel_legacy_info@GOTPAGEOFF]
	str	x8, [x20, #8]
	mov	x0, x20
	bl	_iio_priv
	mov	x21, x0
	ldr	x8, [x0, #24]
	ldr	x8, [x8]
Lloh2:
	adrp	x9, _cros_ec_accel_legacy_read_cmd@GOTPAGE
Lloh3:
	ldr	x9, [x9, _cros_ec_accel_legacy_read_cmd@GOTPAGEOFF]
Lloh4:
	adrp	x10, _cros_ec_sensors_read_lpc@GOTPAGE
Lloh5:
	ldr	x10, [x10, _cros_ec_sensors_read_lpc@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	str	w8, [x0, #16]
Lloh6:
	adrp	x8, _cros_ec_accel_legacy_channels@GOTPAGE
Lloh7:
	ldr	x8, [x8, _cros_ec_accel_legacy_channels@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	str	w0, [x20, #4]
	bl	_ARRAY_SIZE
	str	w0, [x20]
	ldr	x8, [x21]
Lloh9:
	adrp	x9, _MOTIONSENSE_LOC_LID@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MOTIONSENSE_LOC_LID@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	ldr	x8, [x21, #8]
Lloh12:
	adrp	x9, _CROS_EC_SENSOR_X@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CROS_EC_SENSOR_X@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	mov	w10, #-1
	str	w10, [x8, x9, lsl #2]
Lloh15:
	adrp	x9, _CROS_EC_SENSOR_Z@GOTPAGE
Lloh16:
	ldr	x9, [x9, _CROS_EC_SENSOR_Z@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	str	w10, [x8, x9, lsl #2]
LBB0_6:
Lloh18:
	adrp	x8, _cros_ec_sensors_capture@GOTPAGE
Lloh19:
	ldr	x8, [x8, _cros_ec_sensors_capture@GOTPAGEOFF]
Lloh20:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	x2, #0
	mov	x4, #0
	bl	_devm_iio_triggered_buffer_setup
	cbnz	w0, LBB0_10
; %bb.7:
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_devm_iio_device_register
LBB0_8:
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_11:
Lloh25:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No EC device found.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_cros_ec_accel_legacy_info,4,2  ; @cros_ec_accel_legacy_info
	.comm	_cros_ec_sensors_read_lpc,4,2   ; @cros_ec_sensors_read_lpc
	.comm	_cros_ec_accel_legacy_read_cmd,4,2 ; @cros_ec_accel_legacy_read_cmd
	.comm	_cros_ec_accel_legacy_channels,4,2 ; @cros_ec_accel_legacy_channels
	.comm	_MOTIONSENSE_LOC_LID,8,3        ; @MOTIONSENSE_LOC_LID
	.comm	_CROS_EC_SENSOR_X,8,3           ; @CROS_EC_SENSOR_X
	.comm	_CROS_EC_SENSOR_Z,8,3           ; @CROS_EC_SENSOR_Z
	.comm	_cros_ec_sensors_capture,4,2    ; @cros_ec_sensors_capture
	.no_dead_strip	_cros_ec_accel_legacy_probe
.subsections_via_symbols
