	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pdcnew_set_dma_mode
_pdcnew_set_dma_mode:                   ## @pdcnew_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movl	(%r14), %edi
	callq	_to_pci_dev
	movl	(%rbx), %ebx
	shll	$3, %ebx
	andl	$8, %ebx
	movq	%rax, %rdi
	callq	_max_dma_rate
	cmpl	$4, %eax
	jne	LBB0_6
## %bb.1:
	movl	%r15d, %eax
	andl	$7, %eax
	movq	_XFER_UDMA_0@GOTPCREL(%rip), %rcx
	cmpl	%r15d, (%rcx)
	jle	LBB0_2
## %bb.3:
	leal	14(%rbx), %esi
	movq	_mwdma_timings@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	movl	%eax, %r12d
	movl	(%rcx,%r12,8), %edx
	movq	%r14, %rdi
	callq	_set_indexed_reg
	addl	$15, %ebx
	movq	(%r15), %rax
	movl	4(%rax,%r12,8), %edx
	jmp	LBB0_4
LBB0_6:
	movq	_XFER_UDMA_2@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_8
## %bb.7:
	orl	$16, %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_get_indexed_reg
	andl	$127, %eax
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	jmp	LBB0_5
LBB0_2:
	leal	16(%rbx), %esi
	movq	_udma_timings@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	movl	%eax, %eax
	shlq	$2, %rax
	leaq	(%rax,%rax,2), %r12
	movl	(%rcx,%r12), %edx
	movq	%r14, %rdi
	callq	_set_indexed_reg
	movl	%ebx, %esi
	orl	$17, %esi
	movq	(%r15), %rax
	movl	4(%rax,%r12), %edx
	movq	%r14, %rdi
	callq	_set_indexed_reg
	orl	$18, %ebx
	movq	(%r15), %rax
	movl	8(%rax,%r12), %edx
LBB0_4:
	movq	%r14, %rdi
	movl	%ebx, %esi
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_set_indexed_reg                ## TAILCALL
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XFER_UDMA_0,4,2                ## @XFER_UDMA_0
	.comm	_udma_timings,8,3               ## @udma_timings
	.comm	_mwdma_timings,8,3              ## @mwdma_timings
	.comm	_XFER_UDMA_2,4,2                ## @XFER_UDMA_2
	.no_dead_strip	_pdcnew_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 pdcnew_set_dma_mode
_pdcnew_set_dma_mode:                   ; @pdcnew_set_dma_mode
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x21, x0
	ldr	x19, [x0, #8]
	ldr	w0, [x19]
	bl	_to_pci_dev
	ldr	w8, [x21]
	ubfiz	w21, w8, #3, #1
	bl	_max_dma_rate
	cmp	w0, #4
	b.ne	LBB0_3
; %bb.1:
	and	w22, w20, #0x7
Lloh0:
	adrp	x8, _XFER_UDMA_0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XFER_UDMA_0@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w20
	b.le	LBB0_5
; %bb.2:
	add	w1, w21, #14
Lloh3:
	adrp	x20, _mwdma_timings@GOTPAGE
Lloh4:
	ldr	x20, [x20, _mwdma_timings@GOTPAGEOFF]
	ldr	x8, [x20]
	lsl	x22, x22, #3
	ldr	w2, [x8, x22]
	mov	x0, x19
	bl	_set_indexed_reg
	add	w1, w21, #15
	ldr	x8, [x20]
	add	x8, x8, x22
	ldr	w2, [x8, #4]
	b	LBB0_6
LBB0_3:
Lloh5:
	adrp	x8, _XFER_UDMA_2@GOTPAGE
Lloh6:
	ldr	x8, [x8, _XFER_UDMA_2@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_8
; %bb.4:
	orr	w20, w21, #0x10
	mov	x0, x19
	mov	x1, x20
	bl	_get_indexed_reg
	and	w2, w0, #0x7f
	mov	x0, x19
	mov	x1, x20
	b	LBB0_7
LBB0_5:
Lloh8:
	adrp	x20, _udma_timings@GOTPAGE
Lloh9:
	ldr	x20, [x20, _udma_timings@GOTPAGEOFF]
	orr	w1, w21, #0x10
	ldr	x8, [x20]
	mov	w23, #12
	umull	x9, w22, w23
	ldr	w2, [x8, x9]
	mov	x0, x19
	bl	_set_indexed_reg
	mov	w8, #17
	orr	w1, w21, w8
	ldr	x8, [x20]
	umaddl	x8, w22, w23, x8
	ldr	w2, [x8, #4]
	mov	x0, x19
	bl	_set_indexed_reg
	mov	w8, #18
	orr	w1, w21, w8
	ldr	x8, [x20]
	umaddl	x8, w22, w23, x8
	ldr	w2, [x8, #8]
LBB0_6:
	mov	x0, x19
LBB0_7:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_set_indexed_reg
LBB0_8:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_XFER_UDMA_0,4,2                ; @XFER_UDMA_0
	.comm	_udma_timings,8,3               ; @udma_timings
	.comm	_mwdma_timings,8,3              ; @mwdma_timings
	.comm	_XFER_UDMA_2,4,2                ; @XFER_UDMA_2
	.no_dead_strip	_pdcnew_set_dma_mode
.subsections_via_symbols
