	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sis_133_set_piomode
_sis_133_set_piomode:                   ## @sis_133_set_piomode
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	callq	_to_pci_dev
	movq	%rax, %r14
	movslq	(%r15), %r12
	movq	_XFER_PIO_0@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	subq	%rax, %r12
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_sis_set_fifo
	leaq	-40(%rbp), %rdx
	movq	%r14, %rdi
	movl	$84, %esi
	callq	_pci_read_config_dword
	movl	(%rbx), %eax
	shll	$3, %eax
	testl	$1073741824, -40(%rbp)          ## imm = 0x40000000
	movl	4(%r15), %ecx
	leal	64(%rax,%rcx,4), %edx
	leal	112(%rax,%rcx,4), %ebx
	cmovel	%edx, %ebx
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_pci_read_config_dword
	movl	-36(%rbp), %eax
	movl	%eax, %edx
	andl	$-1061154817, %edx              ## imm = 0xC0C00FFF
	testb	$8, %al
	leaq	l___const.sis_133_set_piomode.timing100(%rip), %rax
	leaq	l___const.sis_133_set_piomode.timing133(%rip), %rcx
	cmoveq	%rax, %rcx
	orl	(%rcx,%r12,4), %edx
	movl	%edx, -36(%rbp)
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_pci_write_config_byte
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XFER_PIO_0,4,2                 ## @XFER_PIO_0
	.section	__TEXT,__const
	.p2align	4                               ## @__const.sis_133_set_piomode.timing133
l___const.sis_133_set_piomode.timing133:
	.long	673615872                       ## 0x28269000
	.long	203841536                       ## 0xc266000
	.long	69611520                        ## 0x4263000
	.long	201994240                       ## 0xc0a3000
	.long	84488192                        ## 0x5093000

	.p2align	4                               ## @__const.sis_133_set_piomode.timing100
l___const.sis_133_set_piomode.timing100:
	.long	505176064                       ## 0x1e1c6000
	.long	152846336                       ## 0x91c4000
	.long	52174848                        ## 0x31c2000
	.long	151461888                       ## 0x9072000
	.long	67510272                        ## 0x4062000

	.no_dead_strip	_sis_133_set_piomode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sis_133_set_piomode
_sis_133_set_piomode:                   ; @sis_133_set_piomode
	.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, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
	bl	_to_pci_dev
	mov	x21, x0
	ldrsw	x8, [x19]
Lloh0:
	adrp	x9, _XFER_PIO_0@GOTPAGE
Lloh1:
	ldr	x9, [x9, _XFER_PIO_0@GOTPAGEOFF]
Lloh2:
	ldrsw	x9, [x9]
	sub	x22, x8, x9
	mov	x0, x20
	mov	x1, x19
	bl	_sis_set_fifo
	add	x2, sp, #8
	mov	x0, x21
	mov	w1, #84
	bl	_pci_read_config_dword
	ldr	w8, [sp, #8]
	tst	w8, #0x40000000
	mov	w8, #112
	mov	w9, #64
	csel	w8, w9, w8, eq
	ldr	w9, [x20]
	ldr	w10, [x19, #4]
	lsl	w10, w10, #2
	add	w9, w10, w9, lsl #3
	add	w19, w9, w8
	add	x2, sp, #12
	mov	x0, x21
	mov	x1, x19
	bl	_pci_read_config_dword
	ldr	w8, [sp, #12]
	mov	w9, #4095
	movk	w9, #49344, lsl #16
	and	w9, w8, w9
Lloh3:
	adrp	x10, l___const.sis_133_set_piomode.timing133@PAGE
Lloh4:
	add	x10, x10, l___const.sis_133_set_piomode.timing133@PAGEOFF
Lloh5:
	adrp	x11, l___const.sis_133_set_piomode.timing100@PAGE
Lloh6:
	add	x11, x11, l___const.sis_133_set_piomode.timing100@PAGEOFF
	tst	w8, #0x8
	csel	x8, x11, x10, eq
	ldr	w8, [x8, x22, lsl #2]
	orr	w2, w8, w9
	str	w2, [sp, #12]
	mov	x0, x21
	mov	x1, x19
	bl	_pci_write_config_byte
	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 AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_XFER_PIO_0,4,2                 ; @XFER_PIO_0
	.section	__TEXT,__const
	.p2align	2                               ; @__const.sis_133_set_piomode.timing133
l___const.sis_133_set_piomode.timing133:
	.long	673615872                       ; 0x28269000
	.long	203841536                       ; 0xc266000
	.long	69611520                        ; 0x4263000
	.long	201994240                       ; 0xc0a3000
	.long	84488192                        ; 0x5093000

	.p2align	2                               ; @__const.sis_133_set_piomode.timing100
l___const.sis_133_set_piomode.timing100:
	.long	505176064                       ; 0x1e1c6000
	.long	152846336                       ; 0x91c4000
	.long	52174848                        ; 0x31c2000
	.long	151461888                       ; 0x9072000
	.long	67510272                        ; 0x4062000

	.no_dead_strip	_sis_133_set_piomode
.subsections_via_symbols
