	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cros_ec_spi_probe
_cros_ec_spi_probe:                     ## @cros_ec_spi_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, %rbx
	movl	$8, (%rdi)
	movq	_SPI_MODE_0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rdi)
	movl	$1, 4(%rdi)
	callq	_spi_setup
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	leaq	8(%rbx), %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%r14, %rdi
	movl	$16, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r15
	movq	%rbx, 8(%rax)
	movl	(%r12), %edx
	movq	%r14, %rdi
	movl	$48, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:
	movq	%rax, %r12
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_cros_ec_spi_dt_probe
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_spi_set_drvdata
	movq	%r14, 40(%r12)
	movq	%r15, 32(%r12)
	movl	12(%rbx), %eax
	movl	%eax, 28(%r12)
	movq	_cros_ec_cmd_xfer_spi@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r12)
	movq	_cros_ec_pkt_xfer_spi@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r12)
	movq	8(%r15), %rdi
	addq	$8, %rdi
	callq	_dev_name
	movl	%eax, 16(%r12)
	movq	_EC_MSG_PREAMBLE_COUNT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	$8, %rax
	movq	%rax, 8(%r12)
	movl	$4, (%r12)
	xorl	%eax, %eax
	callq	_ktime_get_ns
	movl	%eax, (%r15)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_cros_ec_spi_devm_high_pri_alloc
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	movq	%r12, %rdi
	callq	_cros_ec_register
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	jmp	LBB0_9
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_9
LBB0_1:
	movl	%eax, %r15d
LBB0_9:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_device_init_wakeup
	xorl	%r15d, %r15d
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_SPI_MODE_0,4,2                 ## @SPI_MODE_0
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_cros_ec_cmd_xfer_spi,4,2       ## @cros_ec_cmd_xfer_spi
	.comm	_cros_ec_pkt_xfer_spi,4,2       ## @cros_ec_pkt_xfer_spi
	.comm	_EC_MSG_PREAMBLE_COUNT,8,3      ## @EC_MSG_PREAMBLE_COUNT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot register EC\n"

	.no_dead_strip	_cros_ec_spi_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function cros_ec_spi_probe
lCPI0_0:
	.long	8                               ; 0x8
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_cros_ec_spi_probe:                     ; @cros_ec_spi_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	x21, x0
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x0]
Lloh2:
	adrp	x8, _SPI_MODE_0@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SPI_MODE_0@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x0, #16]
	bl	_spi_setup
	tbnz	w0, #31, LBB0_7
; %bb.1:
	add	x19, x21, #8
Lloh5:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x19
	mov	w1, #16
	bl	_devm_kzalloc
	cbz	x0, LBB0_6
; %bb.2:
	mov	x20, x0
	str	x21, [x0, #8]
	ldr	w2, [x22]
	mov	x0, x19
	mov	w1, #48
	bl	_devm_kzalloc
	cbz	x0, LBB0_6
; %bb.3:
	mov	x22, x0
	mov	x0, x20
	mov	x1, x19
	bl	_cros_ec_spi_dt_probe
	mov	x0, x21
	mov	x1, x22
	bl	_spi_set_drvdata
	stp	x20, x19, [x22, #32]
	ldr	w8, [x21, #12]
	str	w8, [x22, #28]
Lloh7:
	adrp	x8, _cros_ec_cmd_xfer_spi@GOTPAGE
Lloh8:
	ldr	x8, [x8, _cros_ec_cmd_xfer_spi@GOTPAGEOFF]
Lloh9:
	adrp	x9, _cros_ec_pkt_xfer_spi@GOTPAGE
Lloh10:
	ldr	x9, [x9, _cros_ec_pkt_xfer_spi@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	ldr	w9, [x9]
	stp	w9, w8, [x22, #20]
	ldr	x8, [x20, #8]
	add	x0, x8, #8
	bl	_dev_name
Lloh13:
	adrp	x8, _EC_MSG_PREAMBLE_COUNT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EC_MSG_PREAMBLE_COUNT@GOTPAGEOFF]
	str	w0, [x22, #16]
Lloh15:
	ldr	x8, [x8]
	add	x8, x8, #8
	str	x8, [x22, #8]
	mov	w8, #4
	str	w8, [x22]
	bl	_ktime_get_ns
	str	w0, [x20]
	mov	x0, x19
	mov	x1, x20
	bl	_cros_ec_spi_devm_high_pri_alloc
	mov	x20, x0
	cbnz	w0, LBB0_8
; %bb.4:
	mov	x0, x22
	bl	_cros_ec_register
	mov	x20, x0
	cbz	w0, LBB0_9
; %bb.5:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_8
LBB0_6:
Lloh18:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_8
LBB0_7:
	mov	x20, x0
LBB0_8:
	mov	x0, 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
	ret
LBB0_9:
	mov	x0, x19
	mov	w1, #1
	bl	_device_init_wakeup
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdrp	Lloh0, Lloh2
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh11
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_SPI_MODE_0,4,2                 ; @SPI_MODE_0
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_cros_ec_cmd_xfer_spi,4,2       ; @cros_ec_cmd_xfer_spi
	.comm	_cros_ec_pkt_xfer_spi,4,2       ; @cros_ec_pkt_xfer_spi
	.comm	_EC_MSG_PREAMBLE_COUNT,8,3      ; @EC_MSG_PREAMBLE_COUNT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot register EC\n"

	.no_dead_strip	_cros_ec_spi_probe
.subsections_via_symbols
