	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sil680_set_dmamode
_sil680_set_dmamode:                    ## @sil680_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	callq	_to_pci_dev
	movq	%rax, %r15
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	$8, %edx
	callq	_sil680_seldev
	movq	%rax, %r12
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	$12, %edx
	callq	_sil680_seldev
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movslq	(%rbx), %rax
	leaq	128(,%rax,4), %rbx
	movl	(%r13), %r14d
	shll	$2, %r14d
	leaq	-56(%rbp), %rdx
	movl	$138, %esi
	movq	%r15, %rdi
	callq	_pci_read_config_byte
	leaq	-52(%rbp), %rdx
	movq	%r15, %rdi
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rsi
	callq	_pci_read_config_byte
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movq	%r12, %rsi
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	callq	_pci_read_config_word
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_pci_read_config_word
	movl	-44(%rbp), %esi
	movl	$3, %eax
	movl	%r14d, %ecx
	shll	%cl, %eax
	andl	$-64, %esi
	movl	%esi, -44(%rbp)
	movl	-52(%rbp), %edx
	movl	-56(%rbp), %edi
	xorl	%ecx, %ecx
	testb	$48, %dil
	setne	%cl
	movl	%ecx, -56(%rbp)
	movq	8(%r13), %rcx
	movq	_XFER_UDMA_0@GOTPCREL(%rip), %r8
	movq	%rcx, %rbx
	subq	(%r8), %rbx
	jge	LBB0_1
## %bb.2:
	notl	%eax
	andl	%eax, %edx
	movq	_XFER_MW_DMA_0@GOTPCREL(%rip), %rax
	subq	(%rax), %rcx
	leaq	_sil680_set_dmamode.dma_table(%rip), %rax
	movl	(%rax,%rcx,4), %eax
	movl	%eax, -48(%rbp)
	movl	$2, %eax
	movl	%r14d, %ecx
	shll	%cl, %eax
	jmp	LBB0_3
LBB0_1:
	xorl	%ecx, %ecx
	testb	$48, %dil
	setne	%cl
	movl	$4289, -48(%rbp)                ## imm = 0x10C1
	leaq	(%rcx,%rcx,8), %rdi
	leaq	(%rdi,%rdi,2), %rdi
	addq	%rcx, %rdi
	leaq	_sil680_set_dmamode.ultra_table(%rip), %rcx
	addq	%rdi, %rcx
	orl	(%rcx,%rbx,4), %esi
	movl	%esi, -44(%rbp)
LBB0_3:
	orl	%eax, %edx
	movl	%edx, -52(%rbp)
	movq	%r15, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_pci_write_config_byte
	movl	-48(%rbp), %edx
	movq	%r15, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_pci_write_config_word
	movl	-44(%rbp), %edx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_pci_write_config_word
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @sil680_set_dmamode.ultra_table
_sil680_set_dmamode.ultra_table:
	.long	12                              ## 0xc
	.long	7                               ## 0x7
	.long	5                               ## 0x5
	.long	4                               ## 0x4
	.long	2                               ## 0x2
	.long	1                               ## 0x1
	.long	255                             ## 0xff
	.long	15                              ## 0xf
	.long	11                              ## 0xb
	.long	7                               ## 0x7
	.long	5                               ## 0x5
	.long	3                               ## 0x3
	.long	2                               ## 0x2
	.long	1                               ## 0x1

	.p2align	2                               ## @sil680_set_dmamode.dma_table
_sil680_set_dmamode.dma_table:
	.long	8712                            ## 0x2208
	.long	4290                            ## 0x10c2
	.long	4289                            ## 0x10c1

	.comm	_XFER_UDMA_0,8,3                ## @XFER_UDMA_0
	.comm	_XFER_MW_DMA_0,8,3              ## @XFER_MW_DMA_0
	.no_dead_strip	_sil680_set_dmamode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sil680_set_dmamode
_sil680_set_dmamode:                    ; @sil680_set_dmamode
	.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	x23, x1
	mov	x22, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
	bl	_to_pci_dev
	mov	x19, x0
	mov	x0, x22
	mov	x1, x23
	mov	w2, #8
	bl	_sil680_seldev
	mov	x20, x0
	mov	x0, x22
	mov	x1, x23
	mov	w2, #12
	bl	_sil680_seldev
	mov	x21, x0
	ldrsw	x8, [x22]
	lsl	x8, x8, #2
	add	x22, x8, #128
	ldr	w8, [x23]
	lsl	w24, w8, #2
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #138
	bl	_pci_read_config_byte
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x22
	bl	_pci_read_config_byte
	add	x2, sp, #4
	mov	x0, x19
	mov	x1, x20
	bl	_pci_read_config_word
	mov	x2, sp
	mov	x0, x19
	mov	x1, x21
	bl	_pci_read_config_word
	ldr	w8, [sp]
	and	w9, w8, #0xffffffc0
	str	w9, [sp]
	mov	w8, #3
	lsl	w8, w8, w24
	ldp	w10, w11, [sp, #8]
	ands	w12, w11, #0x30
	cset	w11, ne
	str	w11, [sp, #12]
	ldr	x13, [x23, #8]
Lloh0:
	adrp	x11, _XFER_UDMA_0@GOTPAGE
Lloh1:
	ldr	x11, [x11, _XFER_UDMA_0@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x11]
	subs	x11, x13, x11
	b.ge	LBB0_2
; %bb.1:
	bic	w8, w10, w8
Lloh3:
	adrp	x9, _XFER_MW_DMA_0@GOTPAGE
Lloh4:
	ldr	x9, [x9, _XFER_MW_DMA_0@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	sub	x9, x13, x9
Lloh6:
	adrp	x10, _sil680_set_dmamode.dma_table@PAGE
Lloh7:
	add	x10, x10, _sil680_set_dmamode.dma_table@PAGEOFF
	ldr	w9, [x10, x9, lsl #2]
	str	w9, [sp, #4]
	mov	w9, #2
	lsl	w9, w9, w24
	orr	w2, w8, w9
	b	LBB0_3
LBB0_2:
	cmp	w12, #0
	cset	w12, ne
	mov	w15, #4289
Lloh8:
	adrp	x13, _sil680_set_dmamode.ultra_table@PAGE
Lloh9:
	add	x13, x13, _sil680_set_dmamode.ultra_table@PAGEOFF
	mov	w14, #28
	umaddl	x12, w12, w14, x13
	ldr	w11, [x12, x11, lsl #2]
	orr	w9, w11, w9
	stp	w9, w15, [sp]
	orr	w2, w10, w8
LBB0_3:
	str	w2, [sp, #8]
	mov	x0, x19
	mov	x1, x22
	bl	_pci_write_config_byte
	ldr	w2, [sp, #4]
	mov	x0, x19
	mov	x1, x20
	bl	_pci_write_config_word
	ldr	w2, [sp]
	mov	x0, x19
	mov	x1, x21
	bl	_pci_write_config_word
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @sil680_set_dmamode.ultra_table
_sil680_set_dmamode.ultra_table:
	.long	12                              ; 0xc
	.long	7                               ; 0x7
	.long	5                               ; 0x5
	.long	4                               ; 0x4
	.long	2                               ; 0x2
	.long	1                               ; 0x1
	.long	255                             ; 0xff
	.long	15                              ; 0xf
	.long	11                              ; 0xb
	.long	7                               ; 0x7
	.long	5                               ; 0x5
	.long	3                               ; 0x3
	.long	2                               ; 0x2
	.long	1                               ; 0x1

	.p2align	2                               ; @sil680_set_dmamode.dma_table
_sil680_set_dmamode.dma_table:
	.long	8712                            ; 0x2208
	.long	4290                            ; 0x10c2
	.long	4289                            ; 0x10c1

	.comm	_XFER_UDMA_0,8,3                ; @XFER_UDMA_0
	.comm	_XFER_MW_DMA_0,8,3              ; @XFER_MW_DMA_0
	.no_dead_strip	_sil680_set_dmamode
.subsections_via_symbols
