	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function it821x_program_udma
_it821x_program_udma:                   ## @it821x_program_udma
	.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	%edx, %r12d
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	16(%rdi), %r15
	movl	(%rax), %edi
	callq	_to_pci_dev
	movq	%rax, %r14
	movl	(%rbx), %r13d
	movq	(%r15), %rax
	movq	_ATA_66@GOTPCREL(%rip), %rcx
	movl	%r12d, %edx
	sarl	$8, %edx
	cmpq	(%rcx), %rax
	movzbl	%r12b, %ebx
	cmovel	%edx, %ebx
	cmpq	$0, 8(%r15)
	je	LBB0_1
## %bb.2:
	leal	86(,%r13,4), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_pci_write_config_byte
	leal	87(,%r13,4), %esi
	jmp	LBB0_3
LBB0_1:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	leal	(%rax,%r13,4), %esi
	addl	$86, %esi
LBB0_3:
	movq	%r14, %rdi
	movl	%ebx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pci_write_config_byte          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_66,8,3                     ## @ATA_66
	.no_dead_strip	_it821x_program_udma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function it821x_program_udma
_it821x_program_udma:                   ; @it821x_program_udma
	.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, x2
	mov	x21, x1
	mov	x22, x0
	ldp	x8, x23, [x0, #8]
	ldr	w0, [x8]
	bl	_to_pci_dev
	mov	x19, x0
	ldr	w8, [x22]
Lloh0:
	adrp	x9, _ATA_66@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATA_66@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	asr	w10, w20, #8
	and	w11, w20, #0xff
	ldp	x12, x13, [x23]
	cmp	x12, x9
	csel	w20, w10, w11, eq
	cbz	x13, LBB0_2
; %bb.1:
	lsl	w21, w8, #2
	add	w1, w21, #86
	mov	x0, x19
	mov	x2, x20
	bl	_pci_write_config_byte
	add	w1, w21, #87
	b	LBB0_3
LBB0_2:
	ldr	w9, [x21]
	add	w8, w9, w8, lsl #2
	add	w1, w8, #86
LBB0_3:
	mov	x0, x19
	mov	x2, x20
	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	_pci_write_config_byte
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_66,8,3                     ; @ATA_66
	.no_dead_strip	_it821x_program_udma
.subsections_via_symbols
