	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sis_133_early_set_dmamode
_sis_133_early_set_dmamode:             ## @sis_133_early_set_dmamode
	.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	%rsi, %r15
	movq	(%rdi), %rax
	movl	(%rax), %edi
	callq	_to_pci_dev
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_sis_old_port_base
	movl	%eax, %ebx
	incl	%ebx
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_pci_read_config_byte
	movslq	(%r15), %rax
	movq	_XFER_UDMA_0@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rax, %rcx
	jle	LBB0_2
## %bb.1:
	movl	-28(%rbp), %edx
	jmp	LBB0_3
LBB0_2:
	subl	%ecx, %eax
	movl	$-144, %edx
	andl	-28(%rbp), %edx
	cltq
	leaq	_sis_133_early_set_dmamode.udma_bits(%rip), %rcx
	orl	(%rcx,%rax,4), %edx
	movl	%edx, -28(%rbp)
LBB0_3:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_pci_write_config_byte
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XFER_MW_DMA_0,4,2              ## @XFER_MW_DMA_0
	.section	__TEXT,__const
	.p2align	4                               ## @sis_133_early_set_dmamode.udma_bits
_sis_133_early_set_dmamode.udma_bits:
	.long	143                             ## 0x8f
	.long	138                             ## 0x8a
	.long	135                             ## 0x87
	.long	133                             ## 0x85
	.long	131                             ## 0x83
	.long	130                             ## 0x82
	.long	129                             ## 0x81

	.comm	_XFER_UDMA_0,8,3                ## @XFER_UDMA_0
	.no_dead_strip	_sis_133_early_set_dmamode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sis_133_early_set_dmamode
_sis_133_early_set_dmamode:             ; @sis_133_early_set_dmamode
	.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	x21, x1
	ldr	x8, [x0]
	ldr	w0, [x8]
	bl	_to_pci_dev
	mov	x19, x0
	mov	x0, x21
	bl	_sis_old_port_base
	add	w20, w0, #1
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x20
	bl	_pci_read_config_byte
	ldrsw	x8, [x21]
Lloh0:
	adrp	x9, _XFER_UDMA_0@GOTPAGE
Lloh1:
	ldr	x9, [x9, _XFER_UDMA_0@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x9, x8
	b.le	LBB0_2
; %bb.1:
	ldr	w2, [sp, #12]
	b	LBB0_3
LBB0_2:
	sub	w8, w8, w9
	ldr	w9, [sp, #12]
	mov	w10, #-144
	and	w9, w9, w10
Lloh3:
	adrp	x10, _sis_133_early_set_dmamode.udma_bits@PAGE
Lloh4:
	add	x10, x10, _sis_133_early_set_dmamode.udma_bits@PAGEOFF
	ldr	w8, [x10, w8, sxtw #2]
	orr	w2, w8, w9
	str	w2, [sp, #12]
LBB0_3:
	mov	x0, x19
	mov	x1, x20
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_XFER_MW_DMA_0,4,2              ; @XFER_MW_DMA_0
	.section	__TEXT,__const
	.p2align	2                               ; @sis_133_early_set_dmamode.udma_bits
_sis_133_early_set_dmamode.udma_bits:
	.long	143                             ; 0x8f
	.long	138                             ; 0x8a
	.long	135                             ; 0x87
	.long	133                             ; 0x85
	.long	131                             ; 0x83
	.long	130                             ; 0x82
	.long	129                             ; 0x81

	.comm	_XFER_UDMA_0,8,3                ; @XFER_UDMA_0
	.no_dead_strip	_sis_133_early_set_dmamode
.subsections_via_symbols
