	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxd2880_spi_device_initialize  ## -- Begin function cxd2880_spi_device_initialize
	.p2align	4, 0x90
_cxd2880_spi_device_initialize:         ## @cxd2880_spi_device_initialize
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	addl	$-128, %esi
	cmpl	$4, %esi
	jae	LBB0_4
## %bb.1:
	movq	(%rdi), %rdi
	movslq	%esi, %rax
	leaq	l_switch.table.cxd2880_spi_device_initialize(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rdi)
	movl	%edx, 4(%rdi)
	movl	$8, (%rdi)
	callq	_spi_setup
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_2:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPI_MODE_0,4,2                 ## @SPI_MODE_0
	.comm	_SPI_MODE_1,4,2                 ## @SPI_MODE_1
	.comm	_SPI_MODE_2,4,2                 ## @SPI_MODE_2
	.comm	_SPI_MODE_3,4,2                 ## @SPI_MODE_3
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"spi_setup failed %d\n"

	.section	__DATA,__const
	.p2align	3                               ## @switch.table.cxd2880_spi_device_initialize
l_switch.table.cxd2880_spi_device_initialize:
	.quad	_SPI_MODE_3
	.quad	_SPI_MODE_2
	.quad	_SPI_MODE_1
	.quad	_SPI_MODE_0

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxd2880_spi_device_initialize  ; -- Begin function cxd2880_spi_device_initialize
	.p2align	2
_cxd2880_spi_device_initialize:         ; @cxd2880_spi_device_initialize
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	sub	w8, w1, #128
	cmp	w8, #4
	b.hs	LBB0_3
; %bb.1:
Lloh0:
	adrp	x9, l_switch.table.cxd2880_spi_device_initialize@PAGE
Lloh1:
	add	x9, x9, l_switch.table.cxd2880_spi_device_initialize@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	x0, [x0]
	ldr	w8, [x8]
	stp	w2, w8, [x0, #4]
	mov	w8, #8
	str	w8, [x0]
	bl	_spi_setup
	cbz	w0, LBB0_4
; %bb.2:
	mov	x1, x0
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
LBB0_3:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_SPI_MODE_0,4,2                 ; @SPI_MODE_0
	.comm	_SPI_MODE_1,4,2                 ; @SPI_MODE_1
	.comm	_SPI_MODE_2,4,2                 ; @SPI_MODE_2
	.comm	_SPI_MODE_3,4,2                 ; @SPI_MODE_3
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"spi_setup failed %d\n"

	.section	__DATA,__const
	.p2align	3                               ; @switch.table.cxd2880_spi_device_initialize
l_switch.table.cxd2880_spi_device_initialize:
	.quad	_SPI_MODE_3
	.quad	_SPI_MODE_2
	.quad	_SPI_MODE_1
	.quad	_SPI_MODE_0

.subsections_via_symbols
