	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function psycho_read_config
_psycho_read_config:                    ## @psycho_read_config
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r14d
	movq	%r8, %rbx
	movq	%rcx, %r15
	movq	%rdx, %r12
	movq	%rsi, %r13
	movl	%edi, -60(%rbp)                 ## 4-byte Spill
	callq	_device_get_softc
	cmpq	%r13, 8(%rax)
	jne	LBB0_20
## %bb.1:
	movq	%rax, %rdi
	movq	_PCS_DEVICE@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	jne	LBB0_20
## %bb.2:
	movq	_PCS_FUNC@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	jne	LBB0_20
## %bb.3:
	movslq	%r14d, %rsi
	movq	%rbx, %rax
	orq	%rsi, %rax
	shrq	$32, %rax
	je	LBB0_4
## %bb.5:
	movq	%rbx, %rax
	cqto
	idivq	%rsi
	jmp	LBB0_6
LBB0_4:
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%r14d
                                        ## kill: def $edx killed $edx def $rdx
LBB0_6:
	movl	$-1, %eax
	testq	%rdx, %rdx
	jne	LBB0_17
## %bb.7:
	xorl	%eax, %eax
	cmpq	$7, %rbx
	ja	LBB0_17
## %bb.8:
	movq	_PCIR_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpq	%rbx, %rcx
	jle	LBB0_10
## %bb.9:
	addq	%rbx, %rsi
	cmpq	%rcx, %rsi
	jg	LBB0_12
LBB0_10:
	cmpq	%rbx, %rcx
	je	LBB0_12
## %bb.11:
	leaq	1(%rcx), %rax
	cmpq	%rbx, %rax
	jne	LBB0_13
LBB0_12:
	leaq	(,%rcx,4), %rax
	addq	(%rdi), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	24(%rdi), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movq	16(%rdi), %rax
	movq	_OFW_PCI_CS_CONFIG@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	(%rax,%rdx,4), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_PSYCHO_CONF_OFF
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	callq	_bus_space_read_2
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_le16enc
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
LBB0_13:
	cmpl	$4, %r14d
	je	LBB0_19
## %bb.14:
	cmpl	$2, %r14d
	je	LBB0_18
## %bb.15:
	cmpl	$1, %r14d
	jne	LBB0_20
## %bb.16:
	movq	(%rdi), %rax
	movl	(%rax,%rbx,4), %eax
LBB0_17:
	addq	$40, %rsp
	jmp	LBB0_21
LBB0_20:
	movq	_PCI_REGMAX@GOTPCREL(%rip), %rax
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	(%rax), %r14d
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movq	%rbx, %rcx
	callq	_PSYCHO_CONF_OFF
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	movl	%r14d, %esi
	movl	%eax, %edx
	movq	%r13, %rcx
	movq	%r12, %r8
	movq	%r15, %r9
	pushq	-48(%rbp)                       ## 8-byte Folded Reload
	pushq	%rbx
	callq	_ofw_pci_read_config_common
	addq	$56, %rsp
LBB0_21:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	shlq	$2, %rbx
	addq	(%rdi), %rbx
	movq	%rbx, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_le32dec                        ## TAILCALL
LBB0_18:
	shlq	$2, %rbx
	addq	(%rdi), %rbx
	movq	%rbx, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_le16dec                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PCS_DEVICE,8,3                 ## @PCS_DEVICE
	.comm	_PCS_FUNC,8,3                   ## @PCS_FUNC
	.comm	_PCIR_STATUS,8,3                ## @PCIR_STATUS
	.comm	_OFW_PCI_CS_CONFIG,8,3          ## @OFW_PCI_CS_CONFIG
	.comm	_PCI_REGMAX,4,2                 ## @PCI_REGMAX
	.no_dead_strip	_psycho_read_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function psycho_read_config
_psycho_read_config:                    ; @psycho_read_config
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x5
	mov	x19, x4
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x24, x0
	bl	_device_get_softc
	ldr	x8, [x0, #8]
Lloh0:
	adrp	x9, _PCS_DEVICE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PCS_DEVICE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _PCS_FUNC@GOTPAGE
Lloh4:
	ldr	x10, [x10, _PCS_FUNC@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x23
	ccmp	x9, x22, #0, eq
	ccmp	x10, x21, #0, eq
	b.eq	LBB0_2
LBB0_1:
Lloh6:
	adrp	x8, _PCI_REGMAX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PCI_REGMAX@GOTPAGEOFF]
Lloh8:
	ldr	w25, [x8]
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	mov	x3, x19
	bl	_PSYCHO_CONF_OFF
	mov	x2, x0
	mov	x0, x24
	mov	x1, x25
	mov	x3, x23
	mov	x4, x22
	mov	x5, x21
	mov	x6, x19
	mov	x7, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_ofw_pci_read_config_common
LBB0_2:
	sxtw	x8, w20
	sdiv	x9, x19, x8
	msub	x9, x9, x8, x19
	cbz	x9, LBB0_4
; %bb.3:
	mov	w0, #-1
	b	LBB0_15
LBB0_4:
	cmp	x19, #7
	b.ls	LBB0_6
; %bb.5:
	mov	w0, #0
	b	LBB0_15
LBB0_6:
	mov	x25, x0
Lloh9:
	adrp	x9, _PCIR_STATUS@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PCIR_STATUS@GOTPAGEOFF]
Lloh11:
	ldr	x3, [x9]
	cmp	x3, x19
	b.le	LBB0_8
; %bb.7:
	add	x8, x8, x19
	cmp	x8, x3
	b.gt	LBB0_10
LBB0_8:
	cmp	x3, x19
	b.eq	LBB0_10
; %bb.9:
	add	x8, x3, #1
	cmp	x8, x19
	b.ne	LBB0_11
LBB0_10:
	ldr	x8, [x25]
	add	x26, x8, x3, lsl #2
	ldr	w27, [x25, #24]
	ldr	x8, [x25, #16]
Lloh12:
	adrp	x9, _OFW_PCI_CS_CONFIG@GOTPAGE
Lloh13:
	ldr	x9, [x9, _OFW_PCI_CS_CONFIG@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	ldr	w28, [x8, x9, lsl #2]
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	bl	_PSYCHO_CONF_OFF
	mov	x2, x0
	mov	x0, x27
	mov	x1, x28
	bl	_bus_space_read_2
	mov	x1, x0
	mov	x0, x26
	bl	_le16enc
LBB0_11:
	cmp	w20, #4
	b.eq	LBB0_16
; %bb.12:
	cmp	w20, #2
	b.eq	LBB0_17
; %bb.13:
	cmp	w20, #1
	b.ne	LBB0_1
; %bb.14:
	ldr	x8, [x25]
	ldr	w0, [x8, x19, lsl #2]
LBB0_15:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_16:
	ldr	x8, [x25]
	add	x0, x8, x19, lsl #2
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_le32dec
LBB0_17:
	ldr	x8, [x25]
	add	x0, x8, x19, lsl #2
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_le16dec
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_PCS_DEVICE,8,3                 ; @PCS_DEVICE
	.comm	_PCS_FUNC,8,3                   ; @PCS_FUNC
	.comm	_PCIR_STATUS,8,3                ; @PCIR_STATUS
	.comm	_OFW_PCI_CS_CONFIG,8,3          ; @OFW_PCI_CS_CONFIG
	.comm	_PCI_REGMAX,4,2                 ; @PCI_REGMAX
	.no_dead_strip	_psycho_read_config
.subsections_via_symbols
