	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rmi_spi_probe
_rmi_spi_probe:                         ## @rmi_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	40(%rdi), %rax
	movq	_SPI_MASTER_HALF_DUPLEX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_21:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rdi, %r15
	movq	8(%rdi), %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$64, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r14
	leaq	24(%rax), %rsi
	cmpq	$0, (%r15)
	je	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	_rmi_spi_of_probe
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_21
	jmp	LBB0_9
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_7:
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.8:
	movq	16(%rbx), %rax
	movq	%rax, 16(%rsi)
	movups	(%rbx), %xmm0
	movups	%xmm0, (%rsi)
LBB0_9:
	movq	40(%r14), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	%rax, 32(%r15)
LBB0_11:
	movq	32(%r14), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%rax, 24(%r15)
LBB0_13:
	movq	%r15, %rdi
	callq	_spi_setup
	testl	%eax, %eax
	js	LBB0_14
## %bb.16:
	movl	16(%r15), %eax
	movl	%eax, 24(%r14)
	movq	%r15, 56(%r14)
	movq	%r14, %rdi
	addq	$48, %rdi
	callq	_mutex_init
	movq	%r15, 16(%r14)
	leaq	L_.str.1(%rip), %rax
	movq	%rax, (%r14)
	movq	_rmi_spi_ops@GOTPCREL(%rip), %rax
	movq	%rax, 8(%r14)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_spi_set_drvdata
	movq	_RMI_SPI_DEFAULT_XFER_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_rmi_spi_manage_pools
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_21
## %bb.17:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_rmi_set_page
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_15
LBB0_14:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
LBB0_15:
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_21
LBB0_19:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_info
	movq	%r14, %rdi
	callq	_rmi_register_transport_device
	testl	%eax, %eax
	je	LBB0_22
## %bb.20:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_21
LBB0_22:
	movq	_rmi_spi_unregister_transport@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%r14, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_devm_add_action_or_reset       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SPI_MASTER_HALF_DUPLEX,4,2     ## @SPI_MASTER_HALF_DUPLEX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"spi_setup failed!\n"

L_.str.1:                               ## @.str.1
	.asciz	"spi"

	.comm	_rmi_spi_ops,4,2                ## @rmi_spi_ops
	.comm	_RMI_SPI_DEFAULT_XFER_BUF_SIZE,4,2 ## @RMI_SPI_DEFAULT_XFER_BUF_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"Failed to set page select to 0.\n"

L_.str.3:                               ## @.str.3
	.asciz	"registering SPI-connected sensor\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to register sensor: %d\n"

	.comm	_rmi_spi_unregister_transport,4,2 ## @rmi_spi_unregister_transport
	.no_dead_strip	_rmi_spi_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rmi_spi_probe
_rmi_spi_probe:                         ; @rmi_spi_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
	ldr	x8, [x0, #40]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _SPI_MASTER_HALF_DUPLEX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SPI_MASTER_HALF_DUPLEX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_3:
	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_4:
	mov	x19, x0
	ldr	x21, [x0, #8]
Lloh5:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	w1, #64
	bl	_devm_kzalloc
	cbz	x0, LBB0_7
; %bb.5:
	mov	x20, x0
	add	x1, x0, #24
	ldr	x8, [x19]
	cbz	x8, LBB0_8
; %bb.6:
	mov	x0, x19
	bl	_rmi_spi_of_probe
	mov	x21, x0
	cbnz	w0, LBB0_3
	b	LBB0_10
LBB0_7:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
LBB0_8:
	cbz	x21, LBB0_10
; %bb.9:
	ldr	q0, [x21]
	ldr	x8, [x21, #16]
	str	x8, [x1, #16]
	str	q0, [x1]
LBB0_10:
	ldr	x8, [x20, #40]
	cbz	x8, LBB0_12
; %bb.11:
	str	x8, [x19, #32]
LBB0_12:
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_14
; %bb.13:
	str	x8, [x19, #24]
LBB0_14:
	mov	x0, x19
	bl	_spi_setup
	tbnz	w0, #31, LBB0_18
; %bb.15:
	ldr	w8, [x19, #16]
	str	w8, [x20, #24]
	str	x19, [x20, #56]
	add	x0, x20, #48
	bl	_mutex_init
	str	x19, [x20, #16]
Lloh10:
	adrp	x8, l_.str.1@PAGE
Lloh11:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh12:
	adrp	x9, _rmi_spi_ops@GOTPAGE
Lloh13:
	ldr	x9, [x9, _rmi_spi_ops@GOTPAGEOFF]
	stp	x8, x9, [x20]
	mov	x0, x19
	mov	x1, x20
	bl	_spi_set_drvdata
Lloh14:
	adrp	x8, _RMI_SPI_DEFAULT_XFER_BUF_SIZE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RMI_SPI_DEFAULT_XFER_BUF_SIZE@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_rmi_spi_manage_pools
	mov	x21, x0
	cbnz	w0, LBB0_3
; %bb.16:
	mov	x0, x20
	mov	w1, #0
	bl	_rmi_set_page
	cbz	w0, LBB0_20
; %bb.17:
	mov	x21, x0
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_19
LBB0_18:
	mov	x21, x0
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
LBB0_19:
	mov	x0, x19
	bl	_dev_err
	b	LBB0_3
LBB0_20:
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	mov	x0, x20
	bl	_rmi_register_transport_device
	cbz	w0, LBB0_22
; %bb.21:
	mov	x21, x0
	str	x21, [sp]
Lloh23:
	adrp	x1, l_.str.4@PAGE
Lloh24:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_19
LBB0_22:
Lloh25:
	adrp	x8, _rmi_spi_unregister_transport@GOTPAGE
Lloh26:
	ldr	x8, [x8, _rmi_spi_unregister_transport@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	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
	b	_devm_add_action_or_reset
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_SPI_MASTER_HALF_DUPLEX,4,2     ; @SPI_MASTER_HALF_DUPLEX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"spi_setup failed!\n"

l_.str.1:                               ; @.str.1
	.asciz	"spi"

	.comm	_rmi_spi_ops,4,2                ; @rmi_spi_ops
	.comm	_RMI_SPI_DEFAULT_XFER_BUF_SIZE,4,2 ; @RMI_SPI_DEFAULT_XFER_BUF_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"Failed to set page select to 0.\n"

l_.str.3:                               ; @.str.3
	.asciz	"registering SPI-connected sensor\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to register sensor: %d\n"

	.comm	_rmi_spi_unregister_transport,4,2 ; @rmi_spi_unregister_transport
	.no_dead_strip	_rmi_spi_probe
.subsections_via_symbols
