	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pdc202xx_set_dmamode
_pdc202xx_set_dmamode:                  ## @pdc202xx_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
	pushq	%rax
	.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, %r12
	movl	(%rbx), %r15d
	movl	(%r13), %ebx
	shll	$2, %ebx
	leal	(%rbx,%r15,8), %r14d
	addl	$97, %r14d
	leaq	-48(%rbp), %rdx
	movq	%rax, %rdi
	movl	%r14d, %esi
	callq	_pci_read_config_byte
	leal	(%rbx,%r15,8), %r15d
	addl	$98, %r15d
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_pci_read_config_byte
	movl	$-225, %edx
	andl	-48(%rbp), %edx
	movl	-44(%rbp), %eax
	movq	8(%r13), %rcx
	movq	_XFER_UDMA_0@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	cmpq	%rsi, %rcx
	jge	LBB0_1
## %bb.2:
	movq	_XFER_MW_DMA_0@GOTPCREL(%rip), %rsi
	subl	(%rsi), %ecx
	movslq	%ecx, %rcx
	leaq	_pdc202xx_set_dmamode.mdma_timing(%rip), %rsi
	jmp	LBB0_3
LBB0_1:
	subl	%esi, %ecx
	movslq	%ecx, %rcx
	leaq	_pdc202xx_set_dmamode.udma_timing(%rip), %rsi
LBB0_3:
	orl	(%rsi,%rcx,8), %edx
	movl	%edx, -48(%rbp)
	leaq	(%rsi,%rcx,8), %rcx
	addq	$4, %rcx
	andl	$-16, %eax
	orl	(%rcx), %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
	.section	__TEXT,__const
	.p2align	4                               ## @pdc202xx_set_dmamode.udma_timing
_pdc202xx_set_dmamode.udma_timing:
	.long	96                              ## 0x60
	.long	3                               ## 0x3
	.long	64                              ## 0x40
	.long	2                               ## 0x2
	.long	32                              ## 0x20
	.long	1                               ## 0x1
	.long	64                              ## 0x40
	.long	2                               ## 0x2
	.long	32                              ## 0x20
	.long	1                               ## 0x1
	.long	32                              ## 0x20
	.long	1                               ## 0x1

	.p2align	4                               ## @pdc202xx_set_dmamode.mdma_timing
_pdc202xx_set_dmamode.mdma_timing:
	.long	224                             ## 0xe0
	.long	15                              ## 0xf
	.long	96                              ## 0x60
	.long	4                               ## 0x4
	.long	96                              ## 0x60
	.long	3                               ## 0x3

	.comm	_XFER_UDMA_0,8,3                ## @XFER_UDMA_0
	.comm	_XFER_MW_DMA_0,4,2              ## @XFER_MW_DMA_0
	.no_dead_strip	_pdc202xx_set_dmamode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pdc202xx_set_dmamode
_pdc202xx_set_dmamode:                  ; @pdc202xx_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	x22, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
	bl	_to_pci_dev
	mov	x19, x0
	ldr	w8, [x20]
	lsl	w8, w8, #3
	ldr	w9, [x22]
	add	w21, w8, w9, lsl #2
	add	w20, w21, #97
	add	x2, sp, #12
	mov	x1, x20
	bl	_pci_read_config_byte
	add	w21, w21, #98
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x21
	bl	_pci_read_config_byte
	ldr	w8, [sp, #12]
	and	w9, w8, #0xffffff1f
	ldr	w8, [sp, #8]
	ldr	x10, [x22, #8]
Lloh0:
	adrp	x11, _XFER_UDMA_0@GOTPAGE
Lloh1:
	ldr	x11, [x11, _XFER_UDMA_0@GOTPAGEOFF]
Lloh2:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ge	LBB0_2
; %bb.1:
Lloh3:
	adrp	x11, _XFER_MW_DMA_0@GOTPAGE
Lloh4:
	ldr	x11, [x11, _XFER_MW_DMA_0@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
Lloh6:
	adrp	x12, _pdc202xx_set_dmamode.mdma_timing@PAGE
Lloh7:
	add	x12, x12, _pdc202xx_set_dmamode.mdma_timing@PAGEOFF
	sub	w10, w10, w11
	add	x10, x12, w10, sxtw #3
	b	LBB0_3
LBB0_2:
	sub	w10, w10, w11
Lloh8:
	adrp	x11, _pdc202xx_set_dmamode.udma_timing@PAGE
Lloh9:
	add	x11, x11, _pdc202xx_set_dmamode.udma_timing@PAGEOFF
	lsl	x10, x10, #32
	add	x10, x11, x10, asr #29
LBB0_3:
	ldr	w11, [x10], #4
	orr	w2, w11, w9
	and	w8, w8, #0xfffffff0
	ldr	w9, [x10]
	orr	w8, w9, w8
	stp	w8, w2, [sp, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_pci_write_config_byte
	ldr	w2, [sp, #8]
	mov	x0, x19
	mov	x1, x21
	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	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @pdc202xx_set_dmamode.udma_timing
_pdc202xx_set_dmamode.udma_timing:
	.long	96                              ; 0x60
	.long	3                               ; 0x3
	.long	64                              ; 0x40
	.long	2                               ; 0x2
	.long	32                              ; 0x20
	.long	1                               ; 0x1
	.long	64                              ; 0x40
	.long	2                               ; 0x2
	.long	32                              ; 0x20
	.long	1                               ; 0x1
	.long	32                              ; 0x20
	.long	1                               ; 0x1

	.p2align	2                               ; @pdc202xx_set_dmamode.mdma_timing
_pdc202xx_set_dmamode.mdma_timing:
	.long	224                             ; 0xe0
	.long	15                              ; 0xf
	.long	96                              ; 0x60
	.long	4                               ; 0x4
	.long	96                              ; 0x60
	.long	3                               ; 0x3

	.comm	_XFER_UDMA_0,8,3                ; @XFER_UDMA_0
	.comm	_XFER_MW_DMA_0,4,2              ; @XFER_MW_DMA_0
	.no_dead_strip	_pdc202xx_set_dmamode
.subsections_via_symbols
