	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function quirk_via_cx700_pci_parking_caching
_quirk_via_cx700_pci_parking_caching:   ## @quirk_via_cx700_pci_parking_caching
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_PCI_VENDOR_ID_VIA@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_PCI_DEVICE_ID_VIA_8235_USB_2@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	xorl	%edx, %edx
	callq	_pci_get_device
	movl	(%r15), %edi
	movl	(%rbx), %esi
	movq	%rax, %rdx
	callq	_pci_get_device
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rdi
	callq	_pci_dev_put
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	movl	$118, %esi
	callq	_pci_read_config_byte
	testq	%rax, %rax
	jne	LBB0_4
## %bb.2:
	movl	-28(%rbp), %edx
	testb	$64, %dl
	je	LBB0_4
## %bb.3:
	xorl	$64, %edx
	movq	%r14, %rdi
	movl	$118, %esi
	callq	_pci_write_config_byte
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_pci_info
LBB0_4:
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	movl	$114, %esi
	callq	_pci_read_config_byte
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:
	cmpl	$0, -28(%rbp)
	je	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	movl	$114, %esi
	xorl	%edx, %edx
	callq	_pci_write_config_byte
	movq	%r14, %rdi
	movl	$117, %esi
	movl	$1, %edx
	callq	_pci_write_config_byte
	movq	%r14, %rdi
	movl	$119, %esi
	xorl	%edx, %edx
	callq	_pci_write_config_byte
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_pci_info
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_VENDOR_ID_VIA,4,2          ## @PCI_VENDOR_ID_VIA
	.comm	_PCI_DEVICE_ID_VIA_8235_USB_2,4,2 ## @PCI_DEVICE_ID_VIA_8235_USB_2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Disabling VIA CX700 PCI parking\n"

L_.str.1:                               ## @.str.1
	.asciz	"Disabling VIA CX700 PCI caching\n"

	.no_dead_strip	_quirk_via_cx700_pci_parking_caching
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function quirk_via_cx700_pci_parking_caching
_quirk_via_cx700_pci_parking_caching:   ; @quirk_via_cx700_pci_parking_caching
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x20, _PCI_VENDOR_ID_VIA@GOTPAGE
Lloh1:
	ldr	x20, [x20, _PCI_VENDOR_ID_VIA@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh2:
	adrp	x21, _PCI_DEVICE_ID_VIA_8235_USB_2@GOTPAGE
Lloh3:
	ldr	x21, [x21, _PCI_DEVICE_ID_VIA_8235_USB_2@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x2, #0
	bl	_pci_get_device
	mov	x2, x0
	ldr	w0, [x20]
	ldr	w1, [x21]
	bl	_pci_get_device
	cbz	x0, LBB0_7
; %bb.1:
	bl	_pci_dev_put
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #118
	bl	_pci_read_config_byte
	cbnz	x0, LBB0_4
; %bb.2:
	ldr	w8, [sp, #12]
	tbz	w8, #6, LBB0_4
; %bb.3:
	eor	w2, w8, #0x40
	mov	x0, x19
	mov	w1, #118
	bl	_pci_write_config_byte
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_pci_info
LBB0_4:
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #114
	bl	_pci_read_config_byte
	cbnz	x0, LBB0_7
; %bb.5:
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_7
; %bb.6:
	mov	x0, x19
	mov	w1, #114
	mov	w2, #0
	bl	_pci_write_config_byte
	mov	x0, x19
	mov	w1, #117
	mov	w2, #1
	bl	_pci_write_config_byte
	mov	x0, x19
	mov	w1, #119
	mov	w2, #0
	bl	_pci_write_config_byte
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_pci_info
LBB0_7:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_VENDOR_ID_VIA,4,2          ; @PCI_VENDOR_ID_VIA
	.comm	_PCI_DEVICE_ID_VIA_8235_USB_2,4,2 ; @PCI_DEVICE_ID_VIA_8235_USB_2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Disabling VIA CX700 PCI parking\n"

l_.str.1:                               ; @.str.1
	.asciz	"Disabling VIA CX700 PCI caching\n"

	.no_dead_strip	_quirk_via_cx700_pci_parking_caching
.subsections_via_symbols
