	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sc1200_tunepio
_sc1200_tunepio:                        ## @sc1200_tunepio
	.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	%rsi, %r14
	movq	%rdi, %r13
	movq	8(%rdi), %rbx
	movl	8(%rbx), %edi
	callq	_to_pci_dev
	movq	%rax, %r15
	xorl	%esi, %esi
	cmpq	$0, (%rbx)
	setne	%sil
	shll	$4, %esi
	leal	64(%rsi), %r12d
	movl	$0, -44(%rbp)
	orl	$68, %esi
	leaq	-44(%rbp), %rdx
	movq	%rax, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_pci_read_config_dword
	movl	-44(%rbp), %ecx
	movl	%ecx, %eax
	shrl	$31, %eax
	movl	%eax, -44(%rbp)
	testl	%ecx, %ecx
	jns	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_sc1200_get_pci_clock
	addl	-44(%rbp), %eax
	movl	%eax, -44(%rbp)
LBB0_2:
	movl	(%r13), %esi
	shll	$3, %esi
	andl	$8, %esi
	orl	%r12d, %esi
	movq	_sc1200_pio_timings@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, %eax
	movq	(%rcx,%rax,8), %rax
	movl	(%rax,%r14,4), %edx
	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
	.comm	_sc1200_pio_timings,8,3         ## @sc1200_pio_timings
	.no_dead_strip	_sc1200_tunepio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sc1200_tunepio
_sc1200_tunepio:                        ; @sc1200_tunepio
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	mov	x21, x0
	ldr	x22, [x0, #8]
	ldr	w0, [x22, #8]
	bl	_to_pci_dev
	mov	x20, x0
	ldr	x8, [x22]
	cmp	x8, #0
	mov	w8, #80
	mov	w9, #64
	csel	w22, w9, w8, eq
	str	wzr, [sp, #12]
	orr	w1, w22, #0x4
	add	x2, sp, #12
	bl	_pci_read_config_dword
	ldr	w9, [sp, #12]
	lsr	w8, w9, #31
	str	w8, [sp, #12]
	tbz	w9, #31, LBB0_2
; %bb.1:
	bl	_sc1200_get_pci_clock
	ldr	w8, [sp, #12]
	add	w8, w8, w0
	str	w8, [sp, #12]
LBB0_2:
	ldr	w9, [x21]
	ubfiz	w9, w9, #3, #1
Lloh0:
	adrp	x10, _sc1200_pio_timings@GOTPAGE
Lloh1:
	ldr	x10, [x10, _sc1200_pio_timings@GOTPAGEOFF]
	orr	w1, w9, w22
Lloh2:
	ldr	x9, [x10]
	ldr	x8, [x9, w8, uxtw #3]
	ldr	w2, [x8, x19, lsl #2]
	mov	x0, x20
	bl	_pci_write_config_dword
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_sc1200_pio_timings,8,3         ; @sc1200_pio_timings
	.no_dead_strip	_sc1200_tunepio
.subsections_via_symbols
