	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spi_attach
_spi_attach:                            ## @spi_attach
	.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
	movl	%edi, %r14d
	callq	_device_get_softc
	movq	%rax, %rbx
	movq	_spi_spec@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rdx
	movl	%r14d, %edi
	callq	_bus_alloc_resources
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	callq	_device_printf
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	callq	_rman_get_bustag
	movl	%eax, 12(%rbx)
	movq	(%rbx), %rax
	movl	(%rax), %edi
	callq	_rman_get_bushandle
	movl	%eax, 8(%rbx)
	movq	_SPI_MCR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_READ4
	movq	_MCR_MSTR@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_MCR_CONT_SCKE@GOTPCREL(%rip), %rcx
	movq	_MCR_MDIS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	movq	_MCR_FRZ@GOTPCREL(%rip), %rcx
	orl	(%rcx), %esi
	movq	_MCR_PCSIS_M@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_MCR_PCSIS_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	orl	%edx, %esi
	notl	%esi
	andl	%eax, %esi
	movq	_MCR_CLR_TXF@GOTPCREL(%rip), %rax
	movq	_MCR_CLR_RXF@GOTPCREL(%rip), %rcx
	orl	(%rax), %edx
	orl	(%rcx), %edx
	orl	%esi, %edx
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_WRITE4
	movq	_SPI_RSER@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_READ4
	movq	_RSER_EOQF_RE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_WRITE4
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_READ4
	movq	_MCR_HALT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_WRITE4
	movq	_SPI_CTAR0@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_READ4
	movq	_CTAR_FMSZ_M@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_CTAR_FMSZ_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	notl	%edx
	andl	%eax, %edx
	movq	_CTAR_FMSZ_8@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	%cl, %eax
	orl	%edx, %eax
	movq	_CTAR_CPOL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movq	_CTAR_CPHA@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_CTAR_LSBFE@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_WRITE4
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_READ4
	movq	_CTAR_PBR_M@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_CTAR_PBR_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	movq	_CTAR_PBR_7@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	shll	%cl, %edx
	notl	%esi
	andl	%eax, %esi
	orl	%esi, %edx
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_WRITE4
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	xorl	%edx, %edx
	callq	_device_add_child
	movl	%r14d, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bus_generic_attach             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_spi_spec,4,2                   ## @spi_spec
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not allocate resources\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_SPI_MCR,4,2                    ## @SPI_MCR
	.comm	_MCR_MSTR,4,2                   ## @MCR_MSTR
	.comm	_MCR_CONT_SCKE,4,2              ## @MCR_CONT_SCKE
	.comm	_MCR_MDIS,4,2                   ## @MCR_MDIS
	.comm	_MCR_FRZ,4,2                    ## @MCR_FRZ
	.comm	_MCR_PCSIS_M,4,2                ## @MCR_PCSIS_M
	.comm	_MCR_PCSIS_S,4,2                ## @MCR_PCSIS_S
	.comm	_MCR_CLR_TXF,4,2                ## @MCR_CLR_TXF
	.comm	_MCR_CLR_RXF,4,2                ## @MCR_CLR_RXF
	.comm	_SPI_RSER,4,2                   ## @SPI_RSER
	.comm	_RSER_EOQF_RE,4,2               ## @RSER_EOQF_RE
	.comm	_MCR_HALT,4,2                   ## @MCR_HALT
	.comm	_SPI_CTAR0,4,2                  ## @SPI_CTAR0
	.comm	_CTAR_FMSZ_M,4,2                ## @CTAR_FMSZ_M
	.comm	_CTAR_FMSZ_S,4,2                ## @CTAR_FMSZ_S
	.comm	_CTAR_FMSZ_8,4,2                ## @CTAR_FMSZ_8
	.comm	_CTAR_CPOL,4,2                  ## @CTAR_CPOL
	.comm	_CTAR_CPHA,4,2                  ## @CTAR_CPHA
	.comm	_CTAR_LSBFE,4,2                 ## @CTAR_LSBFE
	.comm	_CTAR_PBR_M,4,2                 ## @CTAR_PBR_M
	.comm	_CTAR_PBR_S,4,2                 ## @CTAR_PBR_S
	.comm	_CTAR_PBR_7,4,2                 ## @CTAR_PBR_7
L_.str.1:                               ## @.str.1
	.asciz	"spibus"

	.no_dead_strip	_spi_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spi_attach
_spi_attach:                            ; @spi_attach
	.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
	bl	_device_get_softc
	mov	x20, x0
Lloh0:
	adrp	x8, _spi_spec@GOTPAGE
Lloh1:
	ldr	x8, [x8, _spi_spec@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	x2, [x0]
	mov	x0, x19
	bl	_bus_alloc_resources
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_device_printf
Lloh5:
	adrp	x8, _ENXIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	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_2:
	ldr	x8, [x20]
	ldr	w0, [x8]
	bl	_rman_get_bustag
	str	w0, [x20, #12]
	ldr	x8, [x20]
	ldr	w0, [x8]
	bl	_rman_get_bushandle
	str	w0, [x20, #8]
Lloh8:
	adrp	x21, _SPI_MCR@GOTPAGE
Lloh9:
	ldr	x21, [x21, _SPI_MCR@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_READ4
Lloh10:
	adrp	x8, _MCR_MSTR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MCR_MSTR@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh13:
	adrp	x9, _MCR_CONT_SCKE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _MCR_CONT_SCKE@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
Lloh16:
	adrp	x10, _MCR_MDIS@GOTPAGE
Lloh17:
	ldr	x10, [x10, _MCR_MDIS@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh19:
	adrp	x10, _MCR_FRZ@GOTPAGE
Lloh20:
	ldr	x10, [x10, _MCR_FRZ@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
Lloh22:
	adrp	x11, _MCR_PCSIS_M@GOTPAGE
Lloh23:
	ldr	x11, [x11, _MCR_PCSIS_M@GOTPAGEOFF]
	orr	w9, w9, w10
Lloh24:
	ldr	w10, [x11]
Lloh25:
	adrp	x11, _MCR_PCSIS_S@GOTPAGE
Lloh26:
	ldr	x11, [x11, _MCR_PCSIS_S@GOTPAGEOFF]
Lloh27:
	ldr	w11, [x11]
	lsl	w10, w10, w11
	orr	w9, w9, w10
	bic	w8, w8, w9
Lloh28:
	adrp	x9, _MCR_CLR_TXF@GOTPAGE
Lloh29:
	ldr	x9, [x9, _MCR_CLR_TXF@GOTPAGEOFF]
Lloh30:
	adrp	x11, _MCR_CLR_RXF@GOTPAGE
Lloh31:
	ldr	x11, [x11, _MCR_CLR_RXF@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
Lloh33:
	ldr	w11, [x11]
	orr	w9, w10, w9
	orr	w9, w9, w11
	orr	w2, w9, w8
	ldr	w1, [x21]
	mov	x0, x20
	bl	_WRITE4
Lloh34:
	adrp	x22, _SPI_RSER@GOTPAGE
Lloh35:
	ldr	x22, [x22, _SPI_RSER@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_READ4
Lloh36:
	adrp	x8, _RSER_EOQF_RE@GOTPAGE
Lloh37:
	ldr	x8, [x8, _RSER_EOQF_RE@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	orr	w2, w8, w0
	ldr	w1, [x22]
	mov	x0, x20
	bl	_WRITE4
	ldr	w1, [x21]
	mov	x0, x20
	bl	_READ4
Lloh39:
	adrp	x8, _MCR_HALT@GOTPAGE
Lloh40:
	ldr	x8, [x8, _MCR_HALT@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	bic	w2, w0, w8
	ldr	w1, [x21]
	mov	x0, x20
	bl	_WRITE4
Lloh42:
	adrp	x21, _SPI_CTAR0@GOTPAGE
Lloh43:
	ldr	x21, [x21, _SPI_CTAR0@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_READ4
Lloh44:
	adrp	x8, _CTAR_FMSZ_M@GOTPAGE
Lloh45:
	ldr	x8, [x8, _CTAR_FMSZ_M@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
Lloh47:
	adrp	x9, _CTAR_FMSZ_S@GOTPAGE
Lloh48:
	ldr	x9, [x9, _CTAR_FMSZ_S@GOTPAGEOFF]
Lloh49:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	bic	w8, w0, w8
Lloh50:
	adrp	x10, _CTAR_FMSZ_8@GOTPAGE
Lloh51:
	ldr	x10, [x10, _CTAR_FMSZ_8@GOTPAGEOFF]
Lloh52:
	ldr	w10, [x10]
	lsl	w9, w10, w9
Lloh53:
	adrp	x10, _CTAR_CPOL@GOTPAGE
Lloh54:
	ldr	x10, [x10, _CTAR_CPOL@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh55:
	ldr	w9, [x10]
	bic	w8, w8, w9
Lloh56:
	adrp	x9, _CTAR_CPHA@GOTPAGE
Lloh57:
	ldr	x9, [x9, _CTAR_CPHA@GOTPAGEOFF]
Lloh58:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh59:
	adrp	x9, _CTAR_LSBFE@GOTPAGE
Lloh60:
	ldr	x9, [x9, _CTAR_LSBFE@GOTPAGEOFF]
Lloh61:
	ldr	w9, [x9]
	orr	w2, w8, w9
	ldr	w1, [x21]
	mov	x0, x20
	bl	_WRITE4
	ldr	w1, [x21]
	mov	x0, x20
	bl	_READ4
Lloh62:
	adrp	x8, _CTAR_PBR_M@GOTPAGE
Lloh63:
	ldr	x8, [x8, _CTAR_PBR_M@GOTPAGEOFF]
Lloh64:
	ldr	w8, [x8]
Lloh65:
	adrp	x9, _CTAR_PBR_S@GOTPAGE
Lloh66:
	ldr	x9, [x9, _CTAR_PBR_S@GOTPAGEOFF]
Lloh67:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	bic	w8, w0, w8
Lloh68:
	adrp	x10, _CTAR_PBR_7@GOTPAGE
Lloh69:
	ldr	x10, [x10, _CTAR_PBR_7@GOTPAGEOFF]
Lloh70:
	ldr	w10, [x10]
	lsl	w9, w10, w9
	orr	w2, w8, w9
	ldr	w1, [x21]
	mov	x0, x20
	bl	_WRITE4
Lloh71:
	adrp	x1, l_.str.1@PAGE
Lloh72:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	w2, #0
	bl	_device_add_child
	mov	x0, x19
	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
	b	_bus_generic_attach
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh32
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_spi_spec,4,2                   ; @spi_spec
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not allocate resources\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_SPI_MCR,4,2                    ; @SPI_MCR
	.comm	_MCR_MSTR,4,2                   ; @MCR_MSTR
	.comm	_MCR_CONT_SCKE,4,2              ; @MCR_CONT_SCKE
	.comm	_MCR_MDIS,4,2                   ; @MCR_MDIS
	.comm	_MCR_FRZ,4,2                    ; @MCR_FRZ
	.comm	_MCR_PCSIS_M,4,2                ; @MCR_PCSIS_M
	.comm	_MCR_PCSIS_S,4,2                ; @MCR_PCSIS_S
	.comm	_MCR_CLR_TXF,4,2                ; @MCR_CLR_TXF
	.comm	_MCR_CLR_RXF,4,2                ; @MCR_CLR_RXF
	.comm	_SPI_RSER,4,2                   ; @SPI_RSER
	.comm	_RSER_EOQF_RE,4,2               ; @RSER_EOQF_RE
	.comm	_MCR_HALT,4,2                   ; @MCR_HALT
	.comm	_SPI_CTAR0,4,2                  ; @SPI_CTAR0
	.comm	_CTAR_FMSZ_M,4,2                ; @CTAR_FMSZ_M
	.comm	_CTAR_FMSZ_S,4,2                ; @CTAR_FMSZ_S
	.comm	_CTAR_FMSZ_8,4,2                ; @CTAR_FMSZ_8
	.comm	_CTAR_CPOL,4,2                  ; @CTAR_CPOL
	.comm	_CTAR_CPHA,4,2                  ; @CTAR_CPHA
	.comm	_CTAR_LSBFE,4,2                 ; @CTAR_LSBFE
	.comm	_CTAR_PBR_M,4,2                 ; @CTAR_PBR_M
	.comm	_CTAR_PBR_S,4,2                 ; @CTAR_PBR_S
	.comm	_CTAR_PBR_7,4,2                 ; @CTAR_PBR_7
l_.str.1:                               ; @.str.1
	.asciz	"spibus"

	.no_dead_strip	_spi_attach
.subsections_via_symbols
