	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function it821x_dma_start
_it821x_dma_start:                      ## @it821x_dma_start
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %rdi
	callq	_ide_get_hwifdata
	movl	(%rbx), %ecx
	andl	$1, %ecx
	movq	(%rax), %rdx
	movq	(%rdx,%rcx,8), %rsi
	movq	_MWDMA_OFF@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rsi
	jne	LBB0_1
## %bb.2:
	movq	8(%rax), %rdx
	movq	(%rdx,%rcx,8), %rsi
	movq	_UDMA_OFF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rsi
	je	LBB0_5
## %bb.3:
	cmpq	$0, 16(%rax)
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_it821x_program_udma
	jmp	LBB0_5
LBB0_1:
	movq	%rbx, %rdi
	callq	_it821x_program
LBB0_5:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_ide_dma_start                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MWDMA_OFF,8,3                  ## @MWDMA_OFF
	.comm	_UDMA_OFF,8,3                   ## @UDMA_OFF
	.no_dead_strip	_it821x_dma_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function it821x_dma_start
_it821x_dma_start:                      ; @it821x_dma_start
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x0, [x0, #8]
	bl	_ide_get_hwifdata
	ldr	w8, [x19]
	and	x8, x8, #0x1
	ldr	x9, [x0]
	ldr	x1, [x9, x8, lsl #3]
Lloh0:
	adrp	x9, _MWDMA_OFF@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MWDMA_OFF@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x1, x9
	b.ne	LBB0_4
; %bb.1:
	ldr	x9, [x0, #8]
	ldr	x1, [x9, x8, lsl #3]
Lloh3:
	adrp	x8, _UDMA_OFF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _UDMA_OFF@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x1, x8
	b.eq	LBB0_5
; %bb.2:
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_it821x_program_udma
	b	LBB0_5
LBB0_4:
	mov	x0, x19
	bl	_it821x_program
LBB0_5:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ide_dma_start
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MWDMA_OFF,8,3                  ; @MWDMA_OFF
	.comm	_UDMA_OFF,8,3                   ; @UDMA_OFF
	.no_dead_strip	_it821x_dma_start
.subsections_via_symbols
