	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cmd64x_set_dma_mode
_cmd64x_set_dma_mode:                   ## @cmd64x_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	8(%rdi), %rbx
	movl	8(%rbx), %edi
	callq	_to_pci_dev
	movq	%rax, %rdi
	movl	(%r14), %r13d
	movl	$0, -44(%rbp)
	cmpq	$0, (%rbx)
	jne	LBB0_1
## %bb.2:
	movq	_UDIDETCR0@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_UDIDETCR1@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r8d
	movq	_XFER_SW_DMA_0@GOTPCREL(%rip), %rsi
	xorl	%eax, %eax
	cmpl	%r12d, (%rsi)
	jg	LBB0_5
## %bb.4:
	leaq	-44(%rbp), %rdx
	movq	%rdi, %rbx
	movl	%r8d, %esi
	movl	%r8d, %r15d
	callq	_pci_read_config_byte
	movl	%r15d, %r8d
	movq	_XFER_SW_DMA_0@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	testb	$1, %r13b
	movl	$-54, %ecx
	movl	$-203, %eax
	cmovel	%ecx, %eax
	andl	-44(%rbp), %eax
	movl	%eax, -44(%rbp)
LBB0_5:
	leal	-128(%r12), %ecx
	cmpl	$8, %ecx
	ja	LBB0_18
## %bb.6:
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_7:
	andl	$1, %r13d
	leal	5(%r13,%r13,4), %ecx
	orl	%ecx, %eax
	movl	%eax, -44(%rbp)
	cmpl	%r12d, (%rsi)
	jle	LBB0_19
	jmp	LBB0_20
LBB0_8:
	testb	$1, %r13b
	movl	$21, %ecx
	movl	$74, %edx
	jmp	LBB0_9
LBB0_10:
	testb	$1, %r13b
	movl	$37, %ecx
	movl	$138, %edx
	jmp	LBB0_9
LBB0_11:
	testb	$1, %r13b
	movl	$17, %ecx
	movl	$66, %edx
	jmp	LBB0_9
LBB0_12:
	testb	$1, %r13b
	movl	$33, %ecx
	movl	$130, %edx
	jmp	LBB0_9
LBB0_13:
	testb	$1, %r13b
	movl	$49, %ecx
	movl	$194, %edx
LBB0_9:
	cmovel	%ecx, %edx
	orl	%edx, %eax
	movl	%eax, -44(%rbp)
LBB0_18:
	cmpl	%r12d, (%rsi)
	jg	LBB0_20
LBB0_19:
	movl	-44(%rbp), %edx
	movl	%r8d, %esi
	callq	_pci_write_config_byte
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	%rdi, %r15
	movq	%r14, %rdi
	movq	%rsi, %r14
	movl	$120, %esi
	movl	$70, %edx
	jmp	LBB0_17
LBB0_15:
	movq	%rdi, %r15
	movq	%r14, %rdi
	movq	%rsi, %r14
	movl	$150, %esi
	movl	$80, %edx
	jmp	LBB0_17
LBB0_16:
	movq	%rdi, %r15
	movq	%r14, %rdi
	movq	%rsi, %r14
	movl	$480, %esi                      ## imm = 0x1E0
	movl	$215, %edx
LBB0_17:
	movl	%r8d, %ebx
	callq	_program_cycle_times
	movl	%ebx, %r8d
	movq	%r14, %rsi
	movq	%r15, %rdi
	cmpl	%r12d, (%rsi)
	jle	LBB0_19
	jmp	LBB0_20
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_8
	.long	L0_0_set_10
	.long	L0_0_set_11
	.long	L0_0_set_12
	.long	L0_0_set_13
	.long	L0_0_set_14
	.long	L0_0_set_15
	.long	L0_0_set_16
	.end_data_region
                                        ## -- End function
	.comm	_UDIDETCR1,4,2                  ## @UDIDETCR1
	.comm	_UDIDETCR0,4,2                  ## @UDIDETCR0
	.comm	_XFER_SW_DMA_0,4,2              ## @XFER_SW_DMA_0
	.no_dead_strip	_cmd64x_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 cmd64x_set_dma_mode
_cmd64x_set_dma_mode:                   ; @cmd64x_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	x19, x1
	mov	x22, x0
	ldr	x21, [x0, #8]
	ldr	w0, [x21, #8]
	bl	_to_pci_dev
	mov	x20, x0
	mov	w8, #0
	ldr	w24, [x22]
	str	wzr, [sp, #12]
	ldr	x9, [x21]
Lloh0:
	adrp	x10, _UDIDETCR1@GOTPAGE
Lloh1:
	ldr	x10, [x10, _UDIDETCR1@GOTPAGEOFF]
Lloh2:
	adrp	x11, _UDIDETCR0@GOTPAGE
Lloh3:
	ldr	x11, [x11, _UDIDETCR0@GOTPAGEOFF]
	cmp	x9, #0
	csel	x9, x11, x10, eq
	ldr	w21, [x9]
Lloh4:
	adrp	x23, _XFER_SW_DMA_0@GOTPAGE
Lloh5:
	ldr	x23, [x23, _XFER_SW_DMA_0@GOTPAGEOFF]
	ldr	w9, [x23]
	cmp	w9, w19
	b.gt	LBB0_2
; %bb.1:
	add	x2, sp, #12
	mov	x0, x20
	mov	x1, x21
	bl	_pci_read_config_byte
	tst	w24, #0x1
	mov	w8, #-203
	mov	w9, #-54
	csel	w8, w9, w8, eq
	ldr	w9, [sp, #12]
	and	w8, w9, w8
	str	w8, [sp, #12]
LBB0_2:
	sub	w9, w19, #128
	cmp	w9, #8
	b.hi	LBB0_15
; %bb.3:
Lloh6:
	adrp	x10, lJTI0_0@PAGE
Lloh7:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_4
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_4:
	tst	w24, #0x1
	mov	w9, #10
	mov	w10, #5
	b	LBB0_10
LBB0_5:
	tst	w24, #0x1
	mov	w9, #74
	mov	w10, #21
	b	LBB0_10
LBB0_6:
	tst	w24, #0x1
	mov	w9, #138
	mov	w10, #37
	b	LBB0_10
LBB0_7:
	tst	w24, #0x1
	mov	w9, #66
	mov	w10, #17
	b	LBB0_10
LBB0_8:
	tst	w24, #0x1
	mov	w9, #130
	mov	w10, #33
	b	LBB0_10
LBB0_9:
	tst	w24, #0x1
	mov	w9, #194
	mov	w10, #49
LBB0_10:
	csel	w9, w10, w9, eq
	orr	w8, w8, w9
	str	w8, [sp, #12]
	b	LBB0_15
LBB0_11:
	mov	x0, x22
	mov	w1, #120
	mov	w2, #70
	b	LBB0_14
LBB0_12:
	mov	x0, x22
	mov	w1, #150
	mov	w2, #80
	b	LBB0_14
LBB0_13:
	mov	x0, x22
	mov	w1, #480
	mov	w2, #215
LBB0_14:
	bl	_program_cycle_times
LBB0_15:
	ldr	w8, [x23]
	cmp	w8, w19
	b.gt	LBB0_17
; %bb.16:
	ldr	w2, [sp, #12]
	mov	x0, x20
	mov	x1, x21
	bl	_pci_write_config_byte
LBB0_17:
	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 AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_5-LBB0_4)>>2
	.byte	(LBB0_6-LBB0_4)>>2
	.byte	(LBB0_7-LBB0_4)>>2
	.byte	(LBB0_8-LBB0_4)>>2
	.byte	(LBB0_9-LBB0_4)>>2
	.byte	(LBB0_11-LBB0_4)>>2
	.byte	(LBB0_12-LBB0_4)>>2
	.byte	(LBB0_13-LBB0_4)>>2
                                        ; -- End function
	.comm	_UDIDETCR1,4,2                  ; @UDIDETCR1
	.comm	_UDIDETCR0,4,2                  ; @UDIDETCR0
	.comm	_XFER_SW_DMA_0,4,2              ; @XFER_SW_DMA_0
	.no_dead_strip	_cmd64x_set_dma_mode
.subsections_via_symbols
