	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function slc90e66_set_dma_mode
_slc90e66_set_dma_mode:                 ## @slc90e66_set_dma_mode
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	8(%rdi), %rbx
	movl	8(%rbx), %edi
	callq	_to_pci_dev
	movq	%rax, %r12
	xorl	%eax, %eax
	cmpq	$0, (%rbx)
	setne	%al
	leal	(%rax,%rax), %esi
	addl	$64, %esi
	movl	(%r15), %eax
	leal	(,%rax,4), %ecx
	movl	$7, %r13d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r13d
	movl	$1, %ebx
	movl	%eax, %ecx
	shll	%cl, %ebx
	leaq	-56(%rbp), %rdx
	movq	%r12, %rdi
	callq	_pci_read_config_word
	leaq	-52(%rbp), %rdx
	movq	%r12, %rdi
	movl	$68, %esi
	callq	_pci_read_config_word
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	movl	$72, %esi
	callq	_pci_read_config_word
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	movl	$74, %esi
	callq	_pci_read_config_word
	movq	_XFER_UDMA_0@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%r14, %rax
	jle	LBB0_1
## %bb.5:
	movl	-48(%rbp), %edx
	testl	%ebx, %edx
	je	LBB0_7
## %bb.6:
	notl	%ebx
	andl	%ebx, %edx
	movq	%r12, %rdi
	movl	$72, %esi
	callq	_pci_write_config_word
LBB0_7:
	movl	-44(%rbp), %edx
	testl	%r13d, %edx
	je	LBB0_9
## %bb.8:
	notl	%r13d
	andl	%r13d, %edx
	movq	%r12, %rdi
	movl	$74, %esi
	callq	_pci_write_config_word
LBB0_9:
	movq	_XFER_MW_DMA_0@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	$2, %esi
	cmpq	%r14, %rax
	jg	LBB0_11
## %bb.10:
	subq	%rax, %r14
	leaq	l___const.slc90e66_set_dma_mode.mwdma_to_pio(%rip), %rax
	movq	(%rax,%r14,8), %rsi
LBB0_11:
	movq	%r15, %rdi
	callq	_slc90e66_set_pio_mode
	jmp	LBB0_12
LBB0_1:
	subq	%rax, %r14
	movb	(%r15), %cl
	shlb	$2, %cl
	shlq	%cl, %r14
	movl	-48(%rbp), %edx
	testl	%ebx, %edx
	jne	LBB0_3
## %bb.2:
	orl	%ebx, %edx
	movq	%r12, %rdi
	movl	$72, %esi
	callq	_pci_write_config_word
LBB0_3:
	movl	-44(%rbp), %edx
	movl	%edx, %eax
	andl	%r13d, %eax
	cmpl	%r14d, %eax
	je	LBB0_12
## %bb.4:
	notl	%r13d
	andl	%r13d, %edx
	movq	%r12, %rdi
	movl	$74, %esi
	callq	_pci_write_config_word
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	movl	$74, %esi
	callq	_pci_read_config_word
	orl	-44(%rbp), %r14d
	movq	%r12, %rdi
	movl	$74, %esi
	movl	%r14d, %edx
	callq	_pci_write_config_word
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XFER_UDMA_0,8,3                ## @XFER_UDMA_0
	.section	__TEXT,__const
	.p2align	4                               ## @__const.slc90e66_set_dma_mode.mwdma_to_pio
l___const.slc90e66_set_dma_mode.mwdma_to_pio:
	.quad	0                               ## 0x0
	.quad	3                               ## 0x3
	.quad	4                               ## 0x4

	.comm	_XFER_MW_DMA_0,8,3              ## @XFER_MW_DMA_0
	.no_dead_strip	_slc90e66_set_dma_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function slc90e66_set_dma_mode
_slc90e66_set_dma_mode:                 ; @slc90e66_set_dma_mode
	.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	x21, x1
	mov	x20, x0
	ldr	x22, [x0, #8]
	ldr	w0, [x22, #8]
	bl	_to_pci_dev
	mov	x19, x0
	ldr	x8, [x22]
	cmp	x8, #0
	mov	w8, #66
	mov	w9, #64
	csel	w1, w9, w8, eq
	ldr	w8, [x20]
	lsl	w9, w8, #2
	mov	w10, #7
	lsl	w22, w10, w9
	mov	w9, #1
	lsl	w23, w9, w8
	add	x2, sp, #12
	bl	_pci_read_config_word
	add	x2, sp, #8
	mov	x0, x19
	mov	w1, #68
	bl	_pci_read_config_word
	add	x2, sp, #4
	mov	x0, x19
	mov	w1, #72
	bl	_pci_read_config_word
	mov	x2, sp
	mov	x0, x19
	mov	w1, #74
	bl	_pci_read_config_word
Lloh0:
	adrp	x8, _XFER_UDMA_0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XFER_UDMA_0@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x21
	b.le	LBB0_7
; %bb.1:
	ldr	w8, [sp, #4]
	tst	w8, w23
	b.eq	LBB0_3
; %bb.2:
	bic	w2, w8, w23
	mov	x0, x19
	mov	w1, #72
	bl	_pci_write_config_word
LBB0_3:
	ldr	w8, [sp]
	tst	w8, w22
	b.eq	LBB0_5
; %bb.4:
	bic	w2, w8, w22
	mov	x0, x19
	mov	w1, #74
	bl	_pci_write_config_word
LBB0_5:
Lloh3:
	adrp	x8, _XFER_MW_DMA_0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _XFER_MW_DMA_0@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, x21
	b.le	LBB0_11
; %bb.6:
	mov	w1, #2
	b	LBB0_12
LBB0_7:
	sub	x8, x21, x8
	ldr	w9, [x20]
	lsl	w9, w9, #2
	lsl	x20, x8, x9
	ldr	w8, [sp, #4]
	tst	w8, w23
	b.ne	LBB0_9
; %bb.8:
	orr	w2, w8, w23
	mov	x0, x19
	mov	w1, #72
	bl	_pci_write_config_word
LBB0_9:
	ldr	w8, [sp]
	and	w9, w8, w22
	cmp	w9, w20
	b.eq	LBB0_13
; %bb.10:
	bic	w2, w8, w22
	mov	x0, x19
	mov	w1, #74
	bl	_pci_write_config_word
	mov	x2, sp
	mov	x0, x19
	mov	w1, #74
	bl	_pci_read_config_word
	ldr	w8, [sp]
	orr	w2, w8, w20
	mov	x0, x19
	mov	w1, #74
	bl	_pci_write_config_word
	b	LBB0_13
LBB0_11:
	sub	x8, x21, x8
Lloh6:
	adrp	x9, l___const.slc90e66_set_dma_mode.mwdma_to_pio@PAGE
Lloh7:
	add	x9, x9, l___const.slc90e66_set_dma_mode.mwdma_to_pio@PAGEOFF
	ldr	x1, [x9, x8, lsl #3]
LBB0_12:
	mov	x0, x20
	bl	_slc90e66_set_pio_mode
LBB0_13:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_XFER_UDMA_0,8,3                ; @XFER_UDMA_0
	.section	__TEXT,__const
	.p2align	3                               ; @__const.slc90e66_set_dma_mode.mwdma_to_pio
l___const.slc90e66_set_dma_mode.mwdma_to_pio:
	.quad	0                               ; 0x0
	.quad	3                               ; 0x3
	.quad	4                               ; 0x4

	.comm	_XFER_MW_DMA_0,8,3              ; @XFER_MW_DMA_0
	.no_dead_strip	_slc90e66_set_dma_mode
.subsections_via_symbols
