	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function via_config_fifo
_via_config_fifo:                       ## @via_config_fifo
	.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
	movq	%rdi, %r14
	leaq	-24(%rbp), %rdx
	movl	$64, %esi
	callq	_pci_read_config_byte
	andl	$3, -24(%rbp)
	movq	_VIA_SET_FIFO@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_2
## %bb.1:
	leaq	-20(%rbp), %rdx
	movq	%r14, %rdi
	movl	$67, %esi
	callq	_pci_read_config_byte
	movq	_VIA_BAD_PREQ@GOTPCREL(%rip), %rax
	xorl	%edx, %edx
	andl	(%rax), %ebx
	sete	%dl
	shll	$5, %edx
	addl	$127, %edx
	andl	-20(%rbp), %edx
	movslq	-24(%rbp), %rax
	leaq	_via_config_fifo.fifo_setting(%rip), %rcx
	orl	(%rcx,%rax,4), %edx
	movl	%edx, -20(%rbp)
	movq	%r14, %rdi
	movl	$67, %esi
	callq	_pci_write_config_byte
LBB0_2:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VIA_SET_FIFO,4,2               ## @VIA_SET_FIFO
	.section	__TEXT,__const
	.p2align	4                               ## @via_config_fifo.fifo_setting
_via_config_fifo.fifo_setting:
	.long	0                               ## 0x0
	.long	96                              ## 0x60
	.long	0                               ## 0x0
	.long	32                              ## 0x20

	.comm	_VIA_BAD_PREQ,4,2               ## @VIA_BAD_PREQ
	.no_dead_strip	_via_config_fifo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function via_config_fifo
_via_config_fifo:                       ; @via_config_fifo
	.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
	mov	x19, x0
	add	x2, sp, #12
	mov	w1, #64
	bl	_pci_read_config_byte
	ldr	w8, [sp, #12]
	and	w8, w8, #0x3
	str	w8, [sp, #12]
Lloh0:
	adrp	x8, _VIA_SET_FIFO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VIA_SET_FIFO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_2
; %bb.1:
	add	x2, sp, #8
	mov	x0, x19
	mov	w1, #67
	bl	_pci_read_config_byte
Lloh3:
	adrp	x8, _VIA_BAD_PREQ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VIA_BAD_PREQ@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [sp, #8]
	tst	w8, w20
	mov	w8, #127
	mov	w10, #159
	csel	w8, w10, w8, eq
	and	w8, w8, w9
	ldrsw	x9, [sp, #12]
Lloh6:
	adrp	x10, _via_config_fifo.fifo_setting@PAGE
Lloh7:
	add	x10, x10, _via_config_fifo.fifo_setting@PAGEOFF
	ldr	w9, [x10, x9, lsl #2]
	orr	w2, w8, w9
	str	w2, [sp, #8]
	mov	x0, x19
	mov	w1, #67
	bl	_pci_write_config_byte
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_VIA_SET_FIFO,4,2               ; @VIA_SET_FIFO
	.section	__TEXT,__const
	.p2align	2                               ; @via_config_fifo.fifo_setting
_via_config_fifo.fifo_setting:
	.long	0                               ; 0x0
	.long	96                              ; 0x60
	.long	0                               ; 0x0
	.long	32                              ; 0x20

	.comm	_VIA_BAD_PREQ,4,2               ; @VIA_BAD_PREQ
	.no_dead_strip	_via_config_fifo
.subsections_via_symbols
