	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function it8172_set_dma_mode
_it8172_set_dma_mode:                   ## @it8172_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %edi
	callq	_to_pci_dev
	movq	%rax, %r12
	movl	(%rbx), %eax
	leal	(,%rax,4), %ecx
	movl	$3, %r14d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r14d
	movl	$1, %r15d
	movl	%eax, %ecx
	shll	%cl, %r15d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %rbx
	leaq	-64(%rbp), %rdx
	movq	%r12, %rdi
	movl	$72, %esi
	callq	_pci_read_config_byte
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	movl	$74, %esi
	callq	_pci_read_config_byte
	movq	_XFER_UDMA_0@GOTPCREL(%rip), %rax
	movq	%rbx, %r13
	subq	(%rax), %r13
	jge	LBB0_1
## %bb.2:
	notl	%r15d
	movslq	%r15d, %rdx
	andq	-64(%rbp), %rdx
	movq	%r12, %rdi
	movl	$72, %esi
	callq	_pci_write_config_byte
	notl	%r14d
	movslq	%r14d, %rdx
	andq	-48(%rbp), %rdx
	movq	%r12, %rdi
	movl	$74, %esi
	callq	_pci_write_config_byte
	movq	_XFER_MW_DMA_0@GOTPCREL(%rip), %rax
	subq	(%rax), %rbx
	leaq	l___const.it8172_set_dma_mode.mwdma_to_pio(%rip), %rax
	movq	_XFER_PIO_0@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	(%rax,%rbx,8), %rcx
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%rcx, 16(%rsi)
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_it8172_set_pio_mode
	jmp	LBB0_3
LBB0_1:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movb	(%rax), %cl
	shlb	$2, %cl
	shlq	%cl, %r13
	movslq	%r15d, %rdx
	orq	-64(%rbp), %rdx
	movq	%r12, %rdi
	movl	$72, %esi
	callq	_pci_write_config_byte
	notl	%r14d
	movslq	%r14d, %rax
	andq	-48(%rbp), %rax
	movq	%rax, -48(%rbp)
	movslq	%r13d, %rdx
	orq	%rax, %rdx
	movq	%r12, %rdi
	movl	$74, %esi
	callq	_pci_write_config_byte
LBB0_3:
	addq	$40, %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.it8172_set_dma_mode.mwdma_to_pio
l___const.it8172_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
	.comm	_XFER_PIO_0,8,3                 ## @XFER_PIO_0
	.no_dead_strip	_it8172_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 it8172_set_dma_mode
_it8172_set_dma_mode:                   ; @it8172_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	x20, x1
	mov	x21, x0
	ldr	w0, [x0]
	bl	_to_pci_dev
	mov	x19, x0
	ldr	w8, [x20]
	lsl	w9, w8, #2
	mov	w10, #3
	lsl	w22, w10, w9
	mov	w9, #1
	lsl	w24, w9, w8
	ldr	x23, [x20, #8]
	add	x2, sp, #8
	mov	w1, #72
	bl	_pci_read_config_byte
	mov	x2, sp
	mov	x0, x19
	mov	w1, #74
	bl	_pci_read_config_byte
Lloh0:
	adrp	x8, _XFER_UDMA_0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XFER_UDMA_0@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	subs	x8, x23, x8
	b.ge	LBB0_2
; %bb.1:
	ldr	x8, [sp, #8]
	mvn	w9, w24
	sxtw	x9, w9
	and	x2, x8, x9
	mov	x0, x19
	mov	w1, #72
	bl	_pci_write_config_byte
	ldr	x8, [sp]
	mvn	w9, w22
	sxtw	x9, w9
	and	x2, x8, x9
	mov	x0, x19
	mov	w1, #74
	bl	_pci_write_config_byte
Lloh3:
	adrp	x8, _XFER_MW_DMA_0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _XFER_MW_DMA_0@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	sub	x8, x23, x8
Lloh6:
	adrp	x9, l___const.it8172_set_dma_mode.mwdma_to_pio@PAGE
Lloh7:
	add	x9, x9, l___const.it8172_set_dma_mode.mwdma_to_pio@PAGEOFF
	ldr	x8, [x9, x8, lsl #3]
Lloh8:
	adrp	x9, _XFER_PIO_0@GOTPAGE
Lloh9:
	ldr	x9, [x9, _XFER_PIO_0@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	add	x8, x9, x8
	str	x8, [x20, #16]
	mov	x0, x21
	mov	x1, x20
	bl	_it8172_set_pio_mode
	b	LBB0_3
LBB0_2:
	ldr	w9, [x20]
	lsl	w9, w9, #2
	lsl	x20, x8, x9
	ldr	x8, [sp, #8]
	sxtw	x9, w24
	orr	x2, x8, x9
	mov	x0, x19
	mov	w1, #72
	bl	_pci_write_config_byte
	mvn	w8, w22
	sxtw	x8, w8
	ldr	x9, [sp]
	and	x8, x9, x8
	str	x8, [sp]
	sxtw	x9, w20
	orr	x2, x9, x8
	mov	x0, x19
	mov	w1, #74
	bl	_pci_write_config_byte
LBB0_3:
	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	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_XFER_UDMA_0,8,3                ; @XFER_UDMA_0
	.section	__TEXT,__const
	.p2align	3                               ; @__const.it8172_set_dma_mode.mwdma_to_pio
l___const.it8172_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
	.comm	_XFER_PIO_0,8,3                 ; @XFER_PIO_0
	.no_dead_strip	_it8172_set_dma_mode
.subsections_via_symbols
