	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function turn_off_spicos
_turn_off_spicos:                       ## @turn_off_spicos
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_is_ax
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	movq	_SPICO_SBUS@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	andl	%r14d, %eax
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rax, %rdx
	movq	_SPICO_FABRIC@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	andl	%r14d, %ecx
	leaq	L_.str.3(%rip), %rcx
	cmoveq	%rax, %rcx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dd_dev_info
	movq	_MISC_CFG_FW_CTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_ENABLE_SPICO_SMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_write_csr
	testl	%r14d, (%r13)
	je	LBB0_3
## %bb.2:
	movq	_SBUS_MASTER_BROADCAST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_WRITE_SBUS_RECEIVER@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	$1, %edx
	movl	$64, %r8d
	callq	_sbus_request
LBB0_3:
	testl	%r14d, (%r12)
	je	LBB0_5
## %bb.4:
	movq	_fabric_serdes_broadcast@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rbx), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	_WRITE_SBUS_RECEIVER@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	$7, %edx
	xorl	%r8d, %r8d
	callq	_sbus_request
LBB0_5:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_write_csr                      ## TAILCALL
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Turning off spicos:%s%s\n"

	.comm	_SPICO_SBUS,4,2                 ## @SPICO_SBUS
L_.str.1:                               ## @.str.1
	.asciz	" SBus"

L_.str.2:                               ## @.str.2
	.space	1

	.comm	_SPICO_FABRIC,4,2               ## @SPICO_FABRIC
L_.str.3:                               ## @.str.3
	.asciz	" fabric"

	.comm	_MISC_CFG_FW_CTRL,4,2           ## @MISC_CFG_FW_CTRL
	.comm	_ENABLE_SPICO_SMASK,4,2         ## @ENABLE_SPICO_SMASK
	.comm	_SBUS_MASTER_BROADCAST,4,2      ## @SBUS_MASTER_BROADCAST
	.comm	_WRITE_SBUS_RECEIVER,4,2        ## @WRITE_SBUS_RECEIVER
	.comm	_fabric_serdes_broadcast,8,3    ## @fabric_serdes_broadcast
	.no_dead_strip	_turn_off_spicos
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function turn_off_spicos
_turn_off_spicos:                       ; @turn_off_spicos
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
	bl	_is_ax
	cbz	w0, LBB0_6
; %bb.1:
Lloh0:
	adrp	x23, _SPICO_SBUS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SPICO_SBUS@GOTPAGEOFF]
Lloh2:
	adrp	x8, l_.str.1@PAGE
Lloh3:
	add	x8, x8, l_.str.1@PAGEOFF
	ldr	w9, [x23]
Lloh4:
	adrp	x10, l_.str.2@PAGE
Lloh5:
	add	x10, x10, l_.str.2@PAGEOFF
	tst	w9, w20
Lloh6:
	adrp	x22, _SPICO_FABRIC@GOTPAGE
Lloh7:
	ldr	x22, [x22, _SPICO_FABRIC@GOTPAGEOFF]
	csel	x2, x10, x8, eq
	ldr	w8, [x22]
Lloh8:
	adrp	x9, l_.str.3@PAGE
Lloh9:
	add	x9, x9, l_.str.3@PAGEOFF
	tst	w8, w20
	csel	x3, x10, x9, eq
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dd_dev_info
Lloh12:
	adrp	x21, _MISC_CFG_FW_CTRL@GOTPAGE
Lloh13:
	ldr	x21, [x21, _MISC_CFG_FW_CTRL@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh14:
	adrp	x8, _ENABLE_SPICO_SMASK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENABLE_SPICO_SMASK@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_write_csr
	ldr	w8, [x23]
Lloh17:
	adrp	x23, _WRITE_SBUS_RECEIVER@GOTPAGE
Lloh18:
	ldr	x23, [x23, _WRITE_SBUS_RECEIVER@GOTPAGEOFF]
	tst	w8, w20
	b.eq	LBB0_3
; %bb.2:
Lloh19:
	adrp	x8, _SBUS_MASTER_BROADCAST@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SBUS_MASTER_BROADCAST@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	ldr	w3, [x23]
	mov	x0, x19
	mov	w2, #1
	mov	w4, #64
	bl	_sbus_request
LBB0_3:
	ldr	w8, [x22]
	tst	w8, w20
	b.eq	LBB0_5
; %bb.4:
Lloh22:
	adrp	x8, _fabric_serdes_broadcast@GOTPAGE
Lloh23:
	ldr	x8, [x8, _fabric_serdes_broadcast@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	ldr	x9, [x19]
	ldr	w1, [x8, x9, lsl #2]
	ldr	w3, [x23]
	mov	x0, x19
	mov	w2, #7
	mov	w4, #0
	bl	_sbus_request
LBB0_5:
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_write_csr
LBB0_6:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Turning off spicos:%s%s\n"

	.comm	_SPICO_SBUS,4,2                 ; @SPICO_SBUS
l_.str.1:                               ; @.str.1
	.asciz	" SBus"

l_.str.2:                               ; @.str.2
	.space	1

	.comm	_SPICO_FABRIC,4,2               ; @SPICO_FABRIC
l_.str.3:                               ; @.str.3
	.asciz	" fabric"

	.comm	_MISC_CFG_FW_CTRL,4,2           ; @MISC_CFG_FW_CTRL
	.comm	_ENABLE_SPICO_SMASK,4,2         ; @ENABLE_SPICO_SMASK
	.comm	_SBUS_MASTER_BROADCAST,4,2      ; @SBUS_MASTER_BROADCAST
	.comm	_WRITE_SBUS_RECEIVER,4,2        ; @WRITE_SBUS_RECEIVER
	.comm	_fabric_serdes_broadcast,8,3    ; @fabric_serdes_broadcast
	.no_dead_strip	_turn_off_spicos
.subsections_via_symbols
