	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atiixp_set_pio_timing
_atiixp_set_pio_timing:                 ## @atiixp_set_pio_timing
	.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, %r14d
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	callq	_to_pci_dev
	movq	%rax, %r15
	movl	(%rbx), %eax
	movl	(%r12), %ebx
	leal	(%rbx,%rax,2), %r12d
	shll	$4, %eax
	shll	$3, %ebx
	xorl	$8, %ebx
	addl	%eax, %ebx
	movq	_ATIIXP_IDE_PIO_MODE@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_pci_read_config_word
	shll	$2, %r12d
	movl	$7, %eax
	movl	%r12d, %ecx
	shll	%cl, %eax
	notl	%eax
	andl	-44(%rbp), %eax
	movl	%r14d, %edx
	shll	%cl, %edx
	orl	%eax, %edx
	movl	%edx, -44(%rbp)
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_pci_write_config_word
	movq	_ATIIXP_IDE_PIO_TIMING@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	callq	_pci_read_config_dword
	movl	$255, %eax
	movl	%ebx, %ecx
	shll	%cl, %eax
	notl	%eax
	andl	-48(%rbp), %eax
	movslq	%r14d, %rcx
	leaq	_atiixp_set_pio_timing.pio_timings(%rip), %rdx
	movl	(%rdx,%rcx,4), %edx
	movl	%ebx, %ecx
	shll	%cl, %edx
	orl	%eax, %edx
	movl	%edx, -48(%rbp)
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_pci_write_config_dword
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @atiixp_set_pio_timing.pio_timings
_atiixp_set_pio_timing.pio_timings:
	.long	93                              ## 0x5d
	.long	71                              ## 0x47
	.long	52                              ## 0x34
	.long	34                              ## 0x22
	.long	32                              ## 0x20

	.comm	_ATIIXP_IDE_PIO_MODE,4,2        ## @ATIIXP_IDE_PIO_MODE
	.comm	_ATIIXP_IDE_PIO_TIMING,4,2      ## @ATIIXP_IDE_PIO_TIMING
	.no_dead_strip	_atiixp_set_pio_timing
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atiixp_set_pio_timing
_atiixp_set_pio_timing:                 ; @atiixp_set_pio_timing
	.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, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
	bl	_to_pci_dev
	mov	x22, x0
	ldr	w8, [x21]
	ldr	w9, [x20]
	add	w20, w9, w8, lsl #1
	lsl	w9, w9, #3
	eor	w9, w9, #0x8
	add	w21, w9, w8, lsl #4
Lloh0:
	adrp	x23, _ATIIXP_IDE_PIO_MODE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ATIIXP_IDE_PIO_MODE@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x2, sp, #8
	bl	_pci_read_config_word
	lsl	w8, w20, #2
	mov	w9, #7
	lsl	w9, w9, w8
	ldr	w10, [sp, #8]
	bic	w9, w10, w9
	lsl	w8, w19, w8
	orr	w2, w9, w8
	str	w2, [sp, #8]
	ldr	w1, [x23]
	mov	x0, x22
	bl	_pci_write_config_word
Lloh2:
	adrp	x20, _ATIIXP_IDE_PIO_TIMING@GOTPAGE
Lloh3:
	ldr	x20, [x20, _ATIIXP_IDE_PIO_TIMING@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x22
	bl	_pci_read_config_dword
	mov	w8, #255
	lsl	w8, w8, w21
	ldr	w9, [sp, #12]
	bic	w8, w9, w8
Lloh4:
	adrp	x9, _atiixp_set_pio_timing.pio_timings@PAGE
Lloh5:
	add	x9, x9, _atiixp_set_pio_timing.pio_timings@PAGEOFF
	ldr	w9, [x9, w19, sxtw #2]
	lsl	w9, w9, w21
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w1, [x20]
	mov	x0, x22
	bl	_pci_write_config_dword
	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 AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @atiixp_set_pio_timing.pio_timings
_atiixp_set_pio_timing.pio_timings:
	.long	93                              ; 0x5d
	.long	71                              ; 0x47
	.long	52                              ; 0x34
	.long	34                              ; 0x22
	.long	32                              ; 0x20

	.comm	_ATIIXP_IDE_PIO_MODE,4,2        ; @ATIIXP_IDE_PIO_MODE
	.comm	_ATIIXP_IDE_PIO_TIMING,4,2      ; @ATIIXP_IDE_PIO_TIMING
	.no_dead_strip	_atiixp_set_pio_timing
.subsections_via_symbols
