	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cs5535_set_dmamode
_cs5535_set_dmamode:                    ## @cs5535_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
	movslq	(%rsi), %rbx
	movq	_ATAC_CH0D0_DMA@GOTPCREL(%rip), %r14
	movslq	4(%rsi), %rdi
	addq	%rdi, %rdi
	addq	(%r14), %rdi
	callq	_rdmsr
	movq	_XFER_UDMA_0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ebx
	jge	LBB0_1
## %bb.2:
	movq	_XFER_MW_DMA_0@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	subq	%rax, %rbx
	leaq	_cs5535_set_dmamode.mwdma_timings(%rip), %rax
	leaq	(%rax,%rbx,4), %rax
	jmp	LBB0_3
LBB0_1:
	subl	%eax, %ebx
	movslq	%ebx, %rax
	leaq	_cs5535_set_dmamode.udma_timings(%rip), %rcx
	leaq	(%rcx,%rax,4), %rax
LBB0_3:
	movl	(%rax), %esi
	movslq	4(%r15), %rdi
	addq	%rdi, %rdi
	addq	(%r14), %rdi
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wrmsr                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @cs5535_set_dmamode.udma_timings
_cs5535_set_dmamode.udma_timings:
	.long	2138322593                      ## 0x7f7436a1
	.long	2138256513                      ## 0x7f733481
	.long	2138190433                      ## 0x7f723261
	.long	2138124641                      ## 0x7f713161
	.long	2138058849                      ## 0x7f703061

	.p2align	2                               ## @cs5535_set_dmamode.mwdma_timings
_cs5535_set_dmamode.mwdma_timings:
	.long	2131754995                      ## 0x7f0ffff3
	.long	2130924370                      ## 0x7f035352
	.long	2130854465                      ## 0x7f024241

	.comm	_ATAC_CH0D0_DMA,8,3             ## @ATAC_CH0D0_DMA
	.comm	_XFER_UDMA_0,4,2                ## @XFER_UDMA_0
	.comm	_XFER_MW_DMA_0,4,2              ## @XFER_MW_DMA_0
	.no_dead_strip	_cs5535_set_dmamode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cs5535_set_dmamode
_cs5535_set_dmamode:                    ; @cs5535_set_dmamode
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x1
Lloh0:
	adrp	x20, _ATAC_CH0D0_DMA@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ATAC_CH0D0_DMA@GOTPAGEOFF]
	ldr	x8, [x20]
	ldp	w21, w9, [x1]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	add	x0, x8, x9, lsl #1
	bl	_rdmsr
Lloh2:
	adrp	x8, _XFER_UDMA_0@GOTPAGE
Lloh3:
	ldr	x8, [x8, _XFER_UDMA_0@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	subs	w8, w21, w8
	b.ge	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _XFER_MW_DMA_0@GOTPAGE
Lloh6:
	ldr	x8, [x8, _XFER_MW_DMA_0@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	sub	w8, w21, w8
Lloh8:
	adrp	x9, _cs5535_set_dmamode.mwdma_timings@PAGE
Lloh9:
	add	x9, x9, _cs5535_set_dmamode.mwdma_timings@PAGEOFF
	b	LBB0_3
LBB0_2:
Lloh10:
	adrp	x9, _cs5535_set_dmamode.udma_timings@PAGE
Lloh11:
	add	x9, x9, _cs5535_set_dmamode.udma_timings@PAGEOFF
LBB0_3:
	add	x8, x9, w8, sxtw #2
	ldr	w1, [x8]
	ldr	x8, [x20]
	ldrsw	x9, [x19, #4]
	add	x0, x8, x9, lsl #1
	mov	w2, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_wrmsr
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @cs5535_set_dmamode.udma_timings
_cs5535_set_dmamode.udma_timings:
	.long	2138322593                      ; 0x7f7436a1
	.long	2138256513                      ; 0x7f733481
	.long	2138190433                      ; 0x7f723261
	.long	2138124641                      ; 0x7f713161
	.long	2138058849                      ; 0x7f703061

	.p2align	2                               ; @cs5535_set_dmamode.mwdma_timings
_cs5535_set_dmamode.mwdma_timings:
	.long	2131754995                      ; 0x7f0ffff3
	.long	2130924370                      ; 0x7f035352
	.long	2130854465                      ; 0x7f024241

	.comm	_ATAC_CH0D0_DMA,8,3             ; @ATAC_CH0D0_DMA
	.comm	_XFER_UDMA_0,4,2                ; @XFER_UDMA_0
	.comm	_XFER_MW_DMA_0,4,2              ; @XFER_MW_DMA_0
	.no_dead_strip	_cs5535_set_dmamode
.subsections_via_symbols
