	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rb4xx_spi_probe
_rb4xx_spi_probe:                       ## @rb4xx_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, %r14
	movl	$56, %esi
	callq	_spi_alloc_master
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r12
	movq	$0, 16(%rax)
	movl	$3, (%rax)
	movq	_SPI_TX_DUAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r12)
	movq	_rb4xx_spi_setup@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r12)
	movq	_rb4xx_spi_transfer@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r12)
	movq	%r12, %rdi
	callq	_spi_master_get_devdata
	movq	%rax, %r15
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_clk_get
	movl	%eax, 4(%r15)
	movl	%eax, %edi
	callq	_IS_ERR
	movl	4(%r15), %edi
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_17
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_18
LBB0_4:
	callq	_clk_prepare_enable
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_16
## %bb.5:
	movl	4(%r15), %edi
	callq	_clk_get_rate
	movl	%eax, 48(%r15)
	testl	%eax, %eax
	je	LBB0_10
## %bb.6:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_platform_set_drvdata
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	movq	(%rax), %rdi
	movq	8(%rax), %rsi
	subq	%rdi, %rsi
	incq	%rsi
	callq	_ioremap
	movl	%eax, 8(%r15)
	testl	%eax, %eax
	je	LBB0_12
## %bb.8:
	movq	%r12, 40(%r15)
	movq	_SPI_FLASH_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r15, %rdi
	callq	_get_spi_ctrl
	movq	%rax, 32(%r15)
	movq	_SPI_CPLD_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	movq	%r15, %rdi
	callq	_get_spi_ctrl
	movq	%rax, 24(%r15)
	movl	$-1, (%r15)
	leaq	16(%r15), %rdi
	callq	_spin_lock_init
	movq	%r15, %rdi
	addq	$12, %rdi
	callq	_INIT_LIST_HEAD
	movq	%r12, %rdi
	callq	_spi_register_master
	testl	%eax, %eax
	je	LBB0_19
## %bb.9:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movl	8(%r15), %edi
	callq	_iounmap
	jmp	LBB0_15
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_11:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_12:
	movq	_ENXIO@GOTPCREL(%rip), %rax
LBB0_13:
	xorl	%ebx, %ebx
LBB0_14:
	subl	(%rax), %ebx
LBB0_15:
	movl	4(%r15), %edi
	callq	_clk_disable_unprepare
LBB0_16:
	movl	4(%r15), %edi
	callq	_clk_put
LBB0_17:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_platform_set_drvdata
	movq	%r12, %rdi
	callq	_spi_master_put
LBB0_18:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	xorl	%ebx, %ebx
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no memory for spi_master\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SPI_TX_DUAL,4,2                ## @SPI_TX_DUAL
	.comm	_rb4xx_spi_setup,4,2            ## @rb4xx_spi_setup
	.comm	_rb4xx_spi_transfer,4,2         ## @rb4xx_spi_transfer
L_.str.1:                               ## @.str.1
	.asciz	"ahb"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_SPI_FLASH_HZ,4,2               ## @SPI_FLASH_HZ
L_.str.2:                               ## @.str.2
	.asciz	"FLASH"

	.comm	_SPI_CPLD_HZ,4,2                ## @SPI_CPLD_HZ
L_.str.3:                               ## @.str.3
	.asciz	"CPLD"

L_.str.4:                               ## @.str.4
	.asciz	"failed to register SPI master\n"

	.no_dead_strip	_rb4xx_spi_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rb4xx_spi_probe
_rb4xx_spi_probe:                       ; @rb4xx_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	x19, x0
	mov	w1, #56
	bl	_spi_alloc_master
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	str	xzr, [x0, #16]
	mov	w8, #3
	str	w8, [x0]
Lloh0:
	adrp	x8, _SPI_TX_DUAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPI_TX_DUAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0, #12]
Lloh3:
	adrp	x8, _rb4xx_spi_setup@GOTPAGE
Lloh4:
	ldr	x8, [x8, _rb4xx_spi_setup@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _rb4xx_spi_transfer@GOTPAGE
Lloh7:
	ldr	x9, [x9, _rb4xx_spi_transfer@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #4]
	bl	_spi_master_get_devdata
	mov	x21, x0
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_clk_get
	str	w0, [x21, #4]
	bl	_IS_ERR
	mov	x8, x0
	ldr	w0, [x21, #4]
	cbz	x8, LBB0_4
; %bb.2:
	bl	_PTR_ERR
	mov	x22, x0
	b	LBB0_16
LBB0_3:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_17
LBB0_4:
	bl	_clk_prepare_enable
	mov	x22, x0
	cbnz	w0, LBB0_15
; %bb.5:
	ldr	w0, [x21, #4]
	bl	_clk_get_rate
	str	w0, [x21, #48]
	cbz	w0, LBB0_10
; %bb.6:
	mov	x0, x19
	mov	x1, x21
	bl	_platform_set_drvdata
Lloh16:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_platform_get_resource
	cbz	x0, LBB0_11
; %bb.7:
	ldp	x8, x9, [x0]
	sub	x9, x9, x8
	add	x1, x9, #1
	mov	x0, x8
	bl	_ioremap
	str	w0, [x21, #8]
	cbz	w0, LBB0_12
; %bb.8:
	str	x20, [x21, #40]
Lloh19:
	adrp	x8, _SPI_FLASH_HZ@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SPI_FLASH_HZ@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x2, l_.str.2@PAGE
Lloh23:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_get_spi_ctrl
	str	x0, [x21, #32]
Lloh24:
	adrp	x8, _SPI_CPLD_HZ@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SPI_CPLD_HZ@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
Lloh27:
	adrp	x2, l_.str.3@PAGE
Lloh28:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_get_spi_ctrl
	str	x0, [x21, #24]
	mov	w8, #-1
	str	w8, [x21]
	add	x0, x21, #16
	bl	_spin_lock_init
	add	x0, x21, #12
	bl	_INIT_LIST_HEAD
	mov	x0, x20
	bl	_spi_register_master
	mov	x22, x0
	cbz	w0, LBB0_17
; %bb.9:
Lloh29:
	adrp	x1, l_.str.4@PAGE
Lloh30:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w0, [x21, #8]
	bl	_iounmap
	b	LBB0_14
LBB0_10:
Lloh31:
	adrp	x8, _EINVAL@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_13
LBB0_11:
Lloh33:
	adrp	x8, _ENOENT@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh35:
	adrp	x8, _ENXIO@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_14:
	ldr	w0, [x21, #4]
	bl	_clk_disable_unprepare
LBB0_15:
	ldr	w0, [x21, #4]
	bl	_clk_put
LBB0_16:
	mov	x0, x19
	mov	x1, #0
	bl	_platform_set_drvdata
	mov	x0, x20
	bl	_spi_master_put
LBB0_17:
	mov	x0, x22
	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
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no memory for spi_master\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SPI_TX_DUAL,4,2                ; @SPI_TX_DUAL
	.comm	_rb4xx_spi_setup,4,2            ; @rb4xx_spi_setup
	.comm	_rb4xx_spi_transfer,4,2         ; @rb4xx_spi_transfer
l_.str.1:                               ; @.str.1
	.asciz	"ahb"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_SPI_FLASH_HZ,4,2               ; @SPI_FLASH_HZ
l_.str.2:                               ; @.str.2
	.asciz	"FLASH"

	.comm	_SPI_CPLD_HZ,4,2                ; @SPI_CPLD_HZ
l_.str.3:                               ; @.str.3
	.asciz	"CPLD"

l_.str.4:                               ; @.str.4
	.asciz	"failed to register SPI master\n"

	.no_dead_strip	_rb4xx_spi_probe
.subsections_via_symbols
