	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wilco_ec_probe
_wilco_ec_probe:                        ## @wilco_ec_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movl	$80, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_platform_set_drvdata
	movq	%r14, 72(%rbx)
	movq	%rbx, %rdi
	addq	$64, %rdi
	callq	_mutex_init
	movq	_EC_MAILBOX_DATA_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	addl	$4, %esi
	movl	%esi, (%rbx)
	movl	(%r15), %edx
	movq	%r14, %rdi
	callq	_devm_kzalloc
	movq	%rax, 56(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_wilco_get_resource
	movq	%rax, 48(%rbx)
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_wilco_get_resource
	movq	%rax, 40(%rbx)
	movq	%r14, %rdi
	movl	$2, %esi
	callq	_wilco_get_resource
	movq	%rax, 32(%rbx)
	cmpq	$0, 48(%rbx)
	je	LBB0_6
## %bb.4:
	cmpq	$0, 40(%rbx)
	je	LBB0_6
## %bb.5:
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movl	(%rax), %edi
	movl	(%r12), %esi
	addl	%edi, %esi
	callq	_cros_ec_lpc_mec_init
	movq	_PLATFORM_DEVID_AUTO@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_platform_device_register_data
	movq	%rax, 8(%rbx)
	movl	(%r12), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_platform_device_register_data
	movq	%rax, 16(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	16(%rbx), %rdi
	callq	_PTR_ERR
	movl	%eax, %r15d
	jmp	LBB0_15
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_18
LBB0_6:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_18
LBB0_9:
	movq	%rbx, %rdi
	callq	_wilco_ec_add_sysfs
	testl	%eax, %eax
	js	LBB0_10
## %bb.11:
	movl	(%r12), %edx
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rcx
	movl	$80, %r8d
	callq	_platform_device_register_data
	movq	%rax, 24(%rbx)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	24(%rbx), %rdi
	callq	_PTR_ERR
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_wilco_ec_remove_sysfs
	jmp	LBB0_14
LBB0_10:
	movl	%eax, %r15d
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_14:
	movq	16(%rbx), %rdi
	callq	_platform_device_unregister
LBB0_15:
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_17
## %bb.16:
	callq	_platform_device_unregister
LBB0_17:
	xorl	%eax, %eax
	callq	_cros_ec_lpc_mec_destroy
LBB0_18:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	xorl	%r15d, %r15d
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EC_MAILBOX_DATA_SIZE,4,2       ## @EC_MAILBOX_DATA_SIZE
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wilco-ec-debugfs"

	.comm	_PLATFORM_DEVID_AUTO,4,2        ## @PLATFORM_DEVID_AUTO
L_.str.1:                               ## @.str.1
	.asciz	"rtc-wilco-ec"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to create RTC platform device\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to create sysfs entries: %d"

L_.str.4:                               ## @.str.4
	.asciz	"wilco_telem"

L_.str.5:                               ## @.str.5
	.asciz	"Failed to create telemetry platform device\n"

	.no_dead_strip	_wilco_ec_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wilco_ec_probe
_wilco_ec_probe:                        ; @wilco_ec_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w1, #80
	bl	_devm_kzalloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	mov	x0, x20
	mov	x1, x19
	bl	_platform_set_drvdata
	str	x20, [x19, #72]
	add	x0, x19, #64
	bl	_mutex_init
Lloh2:
	adrp	x21, _EC_MAILBOX_DATA_SIZE@GOTPAGE
Lloh3:
	ldr	x21, [x21, _EC_MAILBOX_DATA_SIZE@GOTPAGEOFF]
	ldr	w8, [x21]
	add	w1, w8, #4
	str	w1, [x19]
	ldr	w2, [x22]
	mov	x0, x20
	bl	_devm_kzalloc
	str	x0, [x19, #56]
	cbz	x0, LBB0_5
; %bb.2:
	mov	x0, x20
	mov	w1, #0
	bl	_wilco_get_resource
	str	x0, [x19, #48]
	mov	x0, x20
	mov	w1, #1
	bl	_wilco_get_resource
	str	x0, [x19, #40]
	mov	x0, x20
	mov	w1, #2
	bl	_wilco_get_resource
	str	x0, [x19, #32]
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	x8, [x19, #40]
	cmp	x8, #0
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_8
LBB0_4:
Lloh4:
	adrp	x8, _ENODEV@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_8:
	ldr	w0, [x0]
	ldr	w8, [x21]
	add	w1, w8, w0
	bl	_cros_ec_lpc_mec_init
Lloh8:
	adrp	x22, _PLATFORM_DEVID_AUTO@GOTPAGE
Lloh9:
	ldr	x22, [x22, _PLATFORM_DEVID_AUTO@GOTPAGEOFF]
	ldr	w2, [x22]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x3, #0
	mov	w4, #0
	bl	_platform_device_register_data
	str	x0, [x19, #8]
	ldr	w2, [x22]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x3, #0
	mov	w4, #0
	bl	_platform_device_register_data
	str	x0, [x19, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_12
; %bb.9:
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	x0, [x19, #16]
	bl	_PTR_ERR
	mov	x21, x0
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_11
LBB0_10:
	bl	_platform_device_unregister
LBB0_11:
	bl	_cros_ec_lpc_mec_destroy
	b	LBB0_7
LBB0_12:
	mov	x0, x19
	bl	_wilco_ec_add_sysfs
	tbnz	w0, #31, LBB0_15
; %bb.13:
	ldr	w2, [x22]
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	mov	x3, x19
	mov	w4, #80
	bl	_platform_device_register_data
	str	x0, [x19, #24]
	bl	_IS_ERR
	cbz	x0, LBB0_17
; %bb.14:
Lloh18:
	adrp	x1, l_.str.5@PAGE
Lloh19:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	x0, [x19, #24]
	bl	_PTR_ERR
	mov	x21, x0
	mov	x0, x19
	bl	_wilco_ec_remove_sysfs
	b	LBB0_16
LBB0_15:
	mov	x21, x0
	str	x21, [sp]
Lloh20:
	adrp	x1, l_.str.3@PAGE
Lloh21:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_err
LBB0_16:
	ldr	x0, [x19, #16]
	bl	_platform_device_unregister
	ldr	x0, [x19, #8]
	cbnz	x0, LBB0_10
	b	LBB0_11
LBB0_17:
	mov	w21, #0
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EC_MAILBOX_DATA_SIZE,4,2       ; @EC_MAILBOX_DATA_SIZE
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wilco-ec-debugfs"

	.comm	_PLATFORM_DEVID_AUTO,4,2        ; @PLATFORM_DEVID_AUTO
l_.str.1:                               ; @.str.1
	.asciz	"rtc-wilco-ec"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to create RTC platform device\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to create sysfs entries: %d"

l_.str.4:                               ; @.str.4
	.asciz	"wilco_telem"

l_.str.5:                               ; @.str.5
	.asciz	"Failed to create telemetry platform device\n"

	.no_dead_strip	_wilco_ec_probe
.subsections_via_symbols
