	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sis_133_set_dmamode
_sis_133_set_dmamode:                   ## @sis_133_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, %rbx
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	callq	_to_pci_dev
	movq	%rax, %r14
	leaq	-32(%rbp), %rdx
	movq	%rax, %rdi
	movl	$84, %esi
	callq	_pci_read_config_dword
	movl	(%rbx), %eax
	shll	$3, %eax
	testl	$1073741824, -32(%rbp)          ## imm = 0x40000000
	movl	4(%r15), %ecx
	leal	64(%rax,%rcx,4), %edx
	leal	112(%rax,%rcx,4), %ebx
	cmovel	%edx, %ebx
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_pci_read_config_dword
	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
	andl	$-5, %edx
	jmp	LBB0_6
LBB0_2:
	subl	%ecx, %eax
	movl	-28(%rbp), %ecx
	movl	%ecx, %edx
	andl	$-4085, %edx                    ## imm = 0xF00B
	orl	$4, %edx
	cltq
	testb	$8, %cl
	jne	LBB0_3
## %bb.4:
	leaq	_sis_133_set_dmamode.timing_u100(%rip), %rcx
	jmp	LBB0_5
LBB0_3:
	leaq	_sis_133_set_dmamode.timing_u133(%rip), %rcx
LBB0_5:
	orl	(%rcx,%rax,4), %edx
LBB0_6:
	movl	%edx, -28(%rbp)
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_pci_write_config_dword
	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_set_dmamode.timing_u100
_sis_133_set_dmamode.timing_u100:
	.long	1712                            ## 0x6b0
	.long	1136                            ## 0x470
	.long	848                             ## 0x350
	.long	320                             ## 0x140
	.long	288                             ## 0x120
	.long	272                             ## 0x110
	.long	0                               ## 0x0

	.p2align	4                               ## @sis_133_set_dmamode.timing_u133
_sis_133_set_dmamode.timing_u133:
	.long	2544                            ## 0x9f0
	.long	1696                            ## 0x6a0
	.long	1136                            ## 0x470
	.long	592                             ## 0x250
	.long	560                             ## 0x230
	.long	544                             ## 0x220
	.long	528                             ## 0x210

	.comm	_XFER_UDMA_0,8,3                ## @XFER_UDMA_0
	.no_dead_strip	_sis_133_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_set_dmamode
_sis_133_set_dmamode:                   ; @sis_133_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
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
	bl	_to_pci_dev
	mov	x19, x0
	add	x2, sp, #8
	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, [x21, #4]
	lsl	w10, w10, #2
	add	w9, w10, w9, lsl #3
	add	w20, w9, w8
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x20
	bl	_pci_read_config_dword
	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	w8, [sp, #12]
	and	w2, w8, #0xfffffffb
	b	LBB0_6
LBB0_2:
	sub	w9, w8, w9
	ldr	w10, [sp, #12]
	and	w8, w10, #0xfffff00f
	orr	w8, w8, #0x4
	sxtw	x9, w9
	tbnz	w10, #3, LBB0_4
; %bb.3:
Lloh3:
	adrp	x10, _sis_133_set_dmamode.timing_u100@PAGE
Lloh4:
	add	x10, x10, _sis_133_set_dmamode.timing_u100@PAGEOFF
	b	LBB0_5
LBB0_4:
Lloh5:
	adrp	x10, _sis_133_set_dmamode.timing_u133@PAGE
Lloh6:
	add	x10, x10, _sis_133_set_dmamode.timing_u133@PAGEOFF
LBB0_5:
	ldr	w9, [x10, x9, lsl #2]
	orr	w2, w9, w8
LBB0_6:
	str	w2, [sp, #12]
	mov	x0, x19
	mov	x1, x20
	bl	_pci_write_config_dword
	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
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_XFER_MW_DMA_0,4,2              ; @XFER_MW_DMA_0
	.section	__TEXT,__const
	.p2align	2                               ; @sis_133_set_dmamode.timing_u100
_sis_133_set_dmamode.timing_u100:
	.long	1712                            ; 0x6b0
	.long	1136                            ; 0x470
	.long	848                             ; 0x350
	.long	320                             ; 0x140
	.long	288                             ; 0x120
	.long	272                             ; 0x110
	.long	0                               ; 0x0

	.p2align	2                               ; @sis_133_set_dmamode.timing_u133
_sis_133_set_dmamode.timing_u133:
	.long	2544                            ; 0x9f0
	.long	1696                            ; 0x6a0
	.long	1136                            ; 0x470
	.long	592                             ; 0x250
	.long	560                             ; 0x230
	.long	544                             ; 0x220
	.long	528                             ; 0x210

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