	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rb4xx_spi_setup
_rb4xx_spi_setup:                       ## @rb4xx_spi_setup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	16(%rdi), %edi
	callq	_spi_master_get_devdata
	movq	%rax, %r14
	movl	(%rbx), %edx
	movq	_SPI_CS_HIGH@GOTPCREL(%rip), %rax
	movq	_SPI_TX_DUAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	notl	%ecx
	testl	%ecx, %edx
	je	LBB0_3
## %bb.1:
	addq	$12, %rbx
	leaq	L_.str(%rip), %rsi
LBB0_2:
	movq	%rbx, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_3:
	movl	4(%rbx), %edx
	testl	$-9, %edx
	jne	LBB0_4
## %bb.5:
	movq	%r14, %rbx
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movl	$-1, (%r14)
	leaq	-24(%rbp), %rsi
	movq	%r14, %rdi
	callq	_rb4xx_spi_process_queue_locked
	movq	-24(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
LBB0_6:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	addq	$12, %rbx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_SPI_CS_HIGH,4,2                ## @SPI_CS_HIGH
	.comm	_SPI_TX_DUAL,4,2                ## @SPI_TX_DUAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mode %x not supported\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"bits_per_word %u not supported\n"

	.no_dead_strip	_rb4xx_spi_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rb4xx_spi_setup
_rb4xx_spi_setup:                       ; @rb4xx_spi_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x0
	ldr	w0, [x0, #16]
	bl	_spi_master_get_devdata
	ldr	w2, [x20]
Lloh0:
	adrp	x8, _SPI_CS_HIGH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPI_CS_HIGH@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _SPI_TX_DUAL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SPI_TX_DUAL@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bics	wzr, w2, w8
	b.eq	LBB0_3
; %bb.1:
	add	x0, x20, #12
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
LBB0_2:
	bl	_dev_err
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_3:
	ldr	w2, [x20, #4]
	orr	w8, w2, #0x8
	cmp	w8, #8
	b.ne	LBB0_6
; %bb.4:
	mov	x19, x0
	add	x20, x0, #4
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	w8, #-1
	str	w8, [x19]
	add	x1, sp, #8
	mov	x0, x19
	bl	_rb4xx_spi_process_queue_locked
	ldr	x1, [sp, #8]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_6:
	add	x0, x20, #12
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_SPI_CS_HIGH,4,2                ; @SPI_CS_HIGH
	.comm	_SPI_TX_DUAL,4,2                ; @SPI_TX_DUAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mode %x not supported\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"bits_per_word %u not supported\n"

	.no_dead_strip	_rb4xx_spi_setup
.subsections_via_symbols
