	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sis_old_set_piomode
_sis_old_set_piomode:                   ## @sis_old_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movl	(%rax), %edi
	callq	_to_pci_dev
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_sis_old_port_base
	movl	%eax, %r14d
	movslq	(%rbx), %r13
	movq	_XFER_PIO_0@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	subq	%rax, %r13
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_sis_set_fifo
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_pci_read_config_byte
	leal	1(%r14), %r15d
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_pci_read_config_byte
	movl	-48(%rbp), %edx
	andl	$-16, %edx
	movl	-44(%rbp), %eax
	andl	$-8, %eax
	leaq	l___const.sis_old_set_piomode.active(%rip), %rcx
	orl	(%rcx,%r13,4), %edx
	movl	%edx, -48(%rbp)
	leaq	l___const.sis_old_set_piomode.recovery(%rip), %rcx
	orl	(%rcx,%r13,4), %eax
	movl	%eax, -44(%rbp)
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_pci_write_config_byte
	movl	-44(%rbp), %edx
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_pci_write_config_byte
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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_old_set_piomode.active
l___const.sis_old_set_piomode.active:
	.long	0                               ## 0x0
	.long	7                               ## 0x7
	.long	4                               ## 0x4
	.long	3                               ## 0x3
	.long	1                               ## 0x1

	.p2align	4                               ## @__const.sis_old_set_piomode.recovery
l___const.sis_old_set_piomode.recovery:
	.long	0                               ## 0x0
	.long	6                               ## 0x6
	.long	4                               ## 0x4
	.long	3                               ## 0x3
	.long	3                               ## 0x3

	.no_dead_strip	_sis_old_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_old_set_piomode
_sis_old_set_piomode:                   ; @sis_old_set_piomode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
	ldr	w0, [x8]
	bl	_to_pci_dev
	mov	x21, x0
	mov	x0, x19
	bl	_sis_old_port_base
	mov	x22, x0
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _XFER_PIO_0@GOTPAGE
Lloh1:
	ldr	x9, [x9, _XFER_PIO_0@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	sub	w23, w8, w9
	mov	x0, x20
	mov	x1, x19
	bl	_sis_set_fifo
	add	x2, sp, #12
	mov	x0, x21
	mov	x1, x22
	bl	_pci_read_config_byte
	add	w19, w22, #1
	add	x2, sp, #8
	mov	x0, x21
	mov	x1, x19
	bl	_pci_read_config_byte
	ldp	w9, w8, [sp, #8]
	and	w8, w8, #0xfffffff0
	and	w9, w9, #0xfffffff8
	sbfiz	x10, x23, #2, #32
Lloh3:
	adrp	x11, l___const.sis_old_set_piomode.active@PAGE
Lloh4:
	add	x11, x11, l___const.sis_old_set_piomode.active@PAGEOFF
	ldr	w11, [x11, x10]
	orr	w2, w11, w8
Lloh5:
	adrp	x8, l___const.sis_old_set_piomode.recovery@PAGE
Lloh6:
	add	x8, x8, l___const.sis_old_set_piomode.recovery@PAGEOFF
	ldr	w8, [x8, x10]
	orr	w8, w8, w9
	stp	w8, w2, [sp, #8]
	mov	x0, x21
	mov	x1, x22
	bl	_pci_write_config_byte
	ldr	w2, [sp, #8]
	mov	x0, x21
	mov	x1, x19
	bl	_pci_write_config_byte
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	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_old_set_piomode.active
l___const.sis_old_set_piomode.active:
	.long	0                               ; 0x0
	.long	7                               ; 0x7
	.long	4                               ; 0x4
	.long	3                               ; 0x3
	.long	1                               ; 0x1

	.p2align	2                               ; @__const.sis_old_set_piomode.recovery
l___const.sis_old_set_piomode.recovery:
	.long	0                               ; 0x0
	.long	6                               ; 0x6
	.long	4                               ; 0x4
	.long	3                               ; 0x3
	.long	3                               ; 0x3

	.no_dead_strip	_sis_old_set_piomode
.subsections_via_symbols
