	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ec_device_probe
_ec_device_probe:                       ## @ec_device_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	callq	_dev_get_platdata
	movq	%rax, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$56, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_dev_set_drvdata
	movl	(%r14), %edi
	callq	_dev_get_drvdata
	movq	%rax, 40(%r15)
	movq	%r14, 32(%r15)
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	4(%rbx), %eax
	movl	%eax, 48(%r15)
	movq	(%r15), %rax
	movq	$-1, (%rax)
	movq	%r15, %rdi
	addq	$8, %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_device_initialize
	movq	_cros_mcu_devices@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_7
## %bb.3:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movl	16(%rax,%rbx), %esi
	movq	%r15, %rdi
	callq	_cros_ec_check_features
	testq	%rax, %rax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%r12
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	cltq
	addq	$24, %rbx
	cmpq	%rax, %r12
	jl	LBB0_4
	jmp	LBB0_7
LBB0_1:
	negl	%r13d
	jmp	LBB0_25
LBB0_5:
	movq	(%r13), %rax
	movl	20(%rax,%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_info
	movq	(%r13), %rax
	movl	4(%rax,%rbx), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
LBB0_7:
	movq	_cros_class@GOTPCREL(%rip), %rax
	movq	%rax, 24(%r15)
	movq	%r14, 16(%r15)
	movq	_cros_ec_class_release@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_dev_set_name
	testl	%eax, %eax
	je	LBB0_10
## %bb.8:
	movl	%eax, %r13d
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_9
LBB0_10:
	movq	%rbx, %rdi
	callq	_device_add
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_11
LBB0_9:
	movq	%rbx, %rdi
	callq	_put_device
LBB0_25:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_EC_FEATURE_MOTION_SENSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_cros_ec_check_features
	movq	%r15, %rdi
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	callq	_cros_ec_sensors_register
	jmp	LBB0_14
LBB0_13:
	callq	_cros_ec_accel_legacy_register
LBB0_14:
	movq	_cros_subdevices@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_20
## %bb.15:
	leaq	L_.str.3(%rip), %r14
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_16 Depth=1
	incq	%r13
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cltq
	addq	$24, %rbx
	cmpq	%rax, %r13
	jge	LBB0_20
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movl	16(%rax,%rbx), %esi
	movq	%r15, %rdi
	callq	_cros_ec_check_features
	testq	%rax, %rax
	je	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	32(%r15), %rdi
	movq	(%r12), %rax
	movq	8(%rax,%rbx), %rsi
	movl	(%rax,%rbx), %edx
	callq	_mfd_add_hotplug_devices
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	32(%r15), %rdi
	movq	(%r12), %rcx
	movq	8(%rcx,%rbx), %rcx
	movl	4(%rcx), %edx
	movq	%r14, %rsi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_19
LBB0_20:
	movq	32(%r15), %r14
	movq	_cros_ec_platform_cells@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_ARRAY_SIZE
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_mfd_add_hotplug_devices
	testl	%eax, %eax
	je	LBB0_22
## %bb.21:
	movq	32(%r15), %rdi
	leaq	L_.str.4(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_warn
LBB0_22:
	movq	40(%r15), %rax
	movq	(%rax), %rax
	movq	(%rax), %rdi
	leaq	L_.str.5(%rip), %rsi
	callq	_of_property_read_bool
	xorl	%r13d, %r13d
	testq	%rax, %rax
	je	LBB0_25
## %bb.23:
	movq	32(%r15), %r14
	movq	_cros_ec_vbc_cells@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_ARRAY_SIZE
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_mfd_add_hotplug_devices
	testl	%eax, %eax
	je	LBB0_25
## %bb.24:
	movq	32(%r15), %rdi
	leaq	L_.str.6(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_warn
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_cros_mcu_devices,8,3           ## @cros_mcu_devices
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CrOS %s MCU detected\n"

	.comm	_cros_class,4,2                 ## @cros_class
	.comm	_cros_ec_class_release,4,2      ## @cros_ec_class_release
L_.str.1:                               ## @.str.1
	.asciz	"%s"

L_.str.2:                               ## @.str.2
	.asciz	"dev_set_name failed => %d\n"

	.comm	_EC_FEATURE_MOTION_SENSE,4,2    ## @EC_FEATURE_MOTION_SENSE
	.comm	_cros_subdevices,8,3            ## @cros_subdevices
L_.str.3:                               ## @.str.3
	.asciz	"failed to add %s subdevice: %d\n"

	.comm	_cros_ec_platform_cells,8,3     ## @cros_ec_platform_cells
L_.str.4:                               ## @.str.4
	.asciz	"failed to add cros-ec platform devices: %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"google,has-vbc-nvram"

	.comm	_cros_ec_vbc_cells,8,3          ## @cros_ec_vbc_cells
L_.str.6:                               ## @.str.6
	.asciz	"failed to add VBC devices: %d\n"

	.no_dead_strip	_ec_device_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ec_device_probe
_ec_device_probe:                       ; @ec_device_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	bl	_dev_get_platdata
	mov	x22, x0
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #56
	bl	_kzalloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	mov	x0, x20
	mov	x1, x19
	bl	_dev_set_drvdata
	ldr	w0, [x20]
	bl	_dev_get_drvdata
	stp	x20, x0, [x19, #32]
	ldr	w8, [x22, #4]
	str	w8, [x19, #48]
	ldr	x8, [x19]
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [x8]
	add	x21, x19, #8
	mov	x0, x21
	bl	_device_initialize
Lloh6:
	adrp	x23, _cros_mcu_devices@GOTPAGE
Lloh7:
	ldr	x23, [x23, _cros_mcu_devices@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.2:
	mov	x24, #0
	mov	x25, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	add	x8, x8, x24
	ldr	w1, [x8, #16]
	mov	x0, x19
	bl	_cros_ec_check_features
	cbnz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x25, x25, #1
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	add	x24, x24, #24
	cmp	x25, w0, sxtw
	b.lt	LBB0_3
	b	LBB0_7
LBB0_5:
	neg	w22, w21
	b	LBB0_11
LBB0_6:
	ldr	x8, [x23]
	add	x8, x8, x24
	ldr	w2, [x8, #20]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_info
	ldr	x8, [x23]
	add	x8, x8, x24
	ldr	w8, [x8, #4]
	str	w8, [x22]
LBB0_7:
Lloh10:
	adrp	x8, _cros_class@GOTPAGE
Lloh11:
	ldr	x8, [x8, _cros_class@GOTPAGEOFF]
	stp	x20, x8, [x19, #16]
Lloh12:
	adrp	x8, _cros_ec_class_release@GOTPAGE
Lloh13:
	ldr	x8, [x8, _cros_ec_class_release@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	ldr	w2, [x22]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_set_name
	cbz	w0, LBB0_9
; %bb.8:
	mov	x22, x0
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x2, x22
	bl	_dev_err
	b	LBB0_10
LBB0_9:
	mov	x0, x21
	bl	_device_add
	mov	x22, x0
	cbz	w0, LBB0_12
LBB0_10:
	mov	x0, x21
	bl	_put_device
LBB0_11:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_12:
Lloh19:
	adrp	x8, _EC_FEATURE_MOTION_SENSE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EC_FEATURE_MOTION_SENSE@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_cros_ec_check_features
	cbz	x0, LBB0_14
; %bb.13:
	mov	x0, x19
	bl	_cros_ec_sensors_register
	b	LBB0_15
LBB0_14:
	mov	x0, x19
	bl	_cros_ec_accel_legacy_register
LBB0_15:
Lloh22:
	adrp	x21, _cros_subdevices@GOTPAGE
Lloh23:
	ldr	x21, [x21, _cros_subdevices@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_21
; %bb.16:
	mov	x22, #0
	mov	x23, #0
Lloh24:
	adrp	x20, l_.str.3@PAGE
Lloh25:
	add	x20, x20, l_.str.3@PAGEOFF
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	add	x23, x23, #1
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	add	x22, x22, #24
	cmp	x23, w0, sxtw
	b.ge	LBB0_21
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	add	x8, x8, x22
	ldr	w1, [x8, #16]
	mov	x0, x19
	bl	_cros_ec_check_features
	cbz	x0, LBB0_17
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	x0, [x19, #32]
	ldr	x8, [x21]
	add	x8, x8, x22
	ldr	x1, [x8, #8]
	ldr	w2, [x8]
	bl	_mfd_add_hotplug_devices
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_17
; %bb.20:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	x8, [x19, #32]
	ldr	x9, [x21]
	add	x9, x9, x22
	ldr	x9, [x9, #8]
	ldr	w2, [x9, #4]
	str	x0, [sp]
	mov	x0, x8
	mov	x1, x20
	bl	_dev_err
	b	LBB0_17
LBB0_21:
	ldr	x20, [x19, #32]
Lloh26:
	adrp	x8, _cros_ec_platform_cells@GOTPAGE
Lloh27:
	ldr	x8, [x8, _cros_ec_platform_cells@GOTPAGEOFF]
Lloh28:
	ldr	x21, [x8]
	mov	x0, x21
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_mfd_add_hotplug_devices
	cbz	w0, LBB0_23
; %bb.22:
	mov	x2, x0
	ldr	x0, [x19, #32]
Lloh29:
	adrp	x1, l_.str.4@PAGE
Lloh30:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_warn
LBB0_23:
	ldr	x8, [x19, #40]
	ldr	x8, [x8]
	ldr	x0, [x8]
Lloh31:
	adrp	x1, l_.str.5@PAGE
Lloh32:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_of_property_read_bool
	cbz	x0, LBB0_26
; %bb.24:
	ldr	x20, [x19, #32]
Lloh33:
	adrp	x8, _cros_ec_vbc_cells@GOTPAGE
Lloh34:
	ldr	x8, [x8, _cros_ec_vbc_cells@GOTPAGEOFF]
Lloh35:
	ldr	x21, [x8]
	mov	x0, x21
	bl	_ARRAY_SIZE
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_mfd_add_hotplug_devices
	cbz	w0, LBB0_26
; %bb.25:
	mov	x2, x0
	ldr	x0, [x19, #32]
Lloh36:
	adrp	x1, l_.str.6@PAGE
Lloh37:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_warn
LBB0_26:
	mov	w22, #0
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_cros_mcu_devices,8,3           ; @cros_mcu_devices
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CrOS %s MCU detected\n"

	.comm	_cros_class,4,2                 ; @cros_class
	.comm	_cros_ec_class_release,4,2      ; @cros_ec_class_release
l_.str.1:                               ; @.str.1
	.asciz	"%s"

l_.str.2:                               ; @.str.2
	.asciz	"dev_set_name failed => %d\n"

	.comm	_EC_FEATURE_MOTION_SENSE,4,2    ; @EC_FEATURE_MOTION_SENSE
	.comm	_cros_subdevices,8,3            ; @cros_subdevices
l_.str.3:                               ; @.str.3
	.asciz	"failed to add %s subdevice: %d\n"

	.comm	_cros_ec_platform_cells,8,3     ; @cros_ec_platform_cells
l_.str.4:                               ; @.str.4
	.asciz	"failed to add cros-ec platform devices: %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"google,has-vbc-nvram"

	.comm	_cros_ec_vbc_cells,8,3          ; @cros_ec_vbc_cells
l_.str.6:                               ; @.str.6
	.asciz	"failed to add VBC devices: %d\n"

	.no_dead_strip	_ec_device_probe
.subsections_via_symbols
