	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atiixp_bmdma_start
_atiixp_bmdma_start:                    ## @atiixp_bmdma_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	%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
	movq	%rdi, %r15
	movq	(%rdi), %r12
	movq	8(%rdi), %rbx
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	callq	_to_pci_dev
	movq	%rax, %r14
	movl	(%rbx), %ebx
	addl	%ebx, %ebx
	addl	(%r12), %ebx
	movq	_ATIIXP_IDE_UDMA_CONTROL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-44(%rbp), %rdx
	movq	%rax, %rdi
	callq	_pci_read_config_word
	movq	%r12, %rdi
	callq	_ata_using_udma
	movl	$1, %edx
	movl	%ebx, %ecx
	shll	%cl, %edx
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	orl	-44(%rbp), %edx
	jmp	LBB0_3
LBB0_2:
	notl	%edx
	andl	-44(%rbp), %edx
LBB0_3:
	movl	%edx, -44(%rbp)
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_pci_write_config_word
	movq	%r15, %rdi
	callq	_ata_bmdma_start
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATIIXP_IDE_UDMA_CONTROL,4,2    ## @ATIIXP_IDE_UDMA_CONTROL
	.no_dead_strip	_atiixp_bmdma_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atiixp_bmdma_start
_atiixp_bmdma_start:                    ; @atiixp_bmdma_start
	.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, x0
	ldp	x21, x22, [x0]
	ldr	x8, [x22, #8]
	ldr	w0, [x8]
	bl	_to_pci_dev
	mov	x20, x0
	ldr	w8, [x22]
	ldr	w9, [x21]
	add	w23, w9, w8, lsl #1
Lloh0:
	adrp	x22, _ATIIXP_IDE_UDMA_CONTROL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ATIIXP_IDE_UDMA_CONTROL@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #12
	bl	_pci_read_config_word
	mov	x0, x21
	bl	_ata_using_udma
	mov	w8, #1
	lsl	w8, w8, w23
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w9, [sp, #12]
	orr	w2, w9, w8
	b	LBB0_3
LBB0_2:
	ldr	w9, [sp, #12]
	bic	w2, w9, w8
LBB0_3:
	str	w2, [sp, #12]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_pci_write_config_word
	mov	x0, x19
	bl	_ata_bmdma_start
	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	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ATIIXP_IDE_UDMA_CONTROL,4,2    ; @ATIIXP_IDE_UDMA_CONTROL
	.no_dead_strip	_atiixp_bmdma_start
.subsections_via_symbols
