	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function psycho_setup_device
_psycho_setup_device:                   ## @psycho_setup_device
	.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
	movl	%esi, %ebx
	callq	_device_get_softc
	movq	%rax, %r14
	movl	%ebx, %edi
	callq	_ofw_bus_get_name
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	%ebx, %edi
	callq	_ofw_bus_get_name
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_5
LBB0_2:
	movl	%ebx, %edi
	callq	_ofw_bus_get_node
	leaq	L_.str.2(%rip), %rsi
	leaq	-24(%rbp), %rdx
	movl	%eax, %edi
	movl	$8, %ecx
	callq	_OF_getprop
	testq	%rax, %rax
	jle	LBB0_5
## %bb.3:
	cmpq	$0, -24(%rbp)
	jne	LBB0_5
## %bb.4:
	movq	_PCR_CS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_PCICTL_READ8
	movq	_PCICTL_ARB_PARK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_PCICTL_WRITE8
LBB0_5:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ebus"

L_.str.1:                               ## @.str.1
	.asciz	"pci108e,1000"

L_.str.2:                               ## @.str.2
	.asciz	"revision-id"

	.comm	_PCR_CS,4,2                     ## @PCR_CS
	.comm	_PCICTL_ARB_PARK,4,2            ## @PCICTL_ARB_PARK
	.no_dead_strip	_psycho_setup_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function psycho_setup_device
_psycho_setup_device:                   ; @psycho_setup_device
	.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, x1
	bl	_device_get_softc
	mov	x19, x0
	mov	x0, x20
	bl	_ofw_bus_get_name
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_ofw_bus_get_name
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strcmp
	cbnz	x0, LBB0_5
LBB0_2:
	mov	x0, x20
	bl	_ofw_bus_get_node
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x2, sp, #8
	mov	w3, #8
	bl	_OF_getprop
	cmp	x0, #1
	b.lt	LBB0_5
; %bb.3:
	ldr	x8, [sp, #8]
	cbnz	x8, LBB0_5
; %bb.4:
Lloh6:
	adrp	x8, _PCR_CS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PCR_CS@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_PCICTL_READ8
Lloh9:
	adrp	x8, _PCICTL_ARB_PARK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PCICTL_ARB_PARK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	bic	w2, w0, w8
	mov	x0, x19
	mov	x1, x20
	bl	_PCICTL_WRITE8
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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ebus"

l_.str.1:                               ; @.str.1
	.asciz	"pci108e,1000"

l_.str.2:                               ; @.str.2
	.asciz	"revision-id"

	.comm	_PCR_CS,4,2                     ; @PCR_CS
	.comm	_PCICTL_ARB_PARK,4,2            ; @PCICTL_ARB_PARK
	.no_dead_strip	_psycho_setup_device
.subsections_via_symbols
