	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sis_ata133_program_timings
_sis_ata133_program_timings:            ## @sis_ata133_program_timings
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movl	(%rax), %edi
	callq	_to_pci_dev
	movq	%rax, %r14
	movl	$0, -36(%rbp)
	movq	%rbx, %rdi
	callq	_sis_ata133_get_base
	movq	%rax, %r15
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_pci_read_config_dword
	movl	-36(%rbp), %edx
	movl	%edx, %ecx
	andl	$-1061154817, %ecx              ## imm = 0xC0C00FFF
	movl	%ecx, -36(%rbp)
	movq	_ATA_133@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ATA_100@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movq	_XFER_MW_DMA_0@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	cmpq	%r12, %rdi
	jle	LBB0_1
## %bb.2:
	movq	_XFER_PIO_0@GOTPCREL(%rip), %rdi
	subq	(%rdi), %r12
	jmp	LBB0_3
LBB0_1:
	movl	%edx, %ecx
	andl	$-1061154821, %ecx              ## imm = 0xC0C00FFB
	movl	%ecx, -36(%rbp)
	subq	%rdi, %r12
	addq	$5, %r12
LBB0_3:
	testb	$8, %dl
	cmoveq	%rsi, %rax
	movq	_ini_time_value@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rdx,%rax,8), %rdx
	movl	(%rdx,%r12,4), %edx
	shll	$12, %edx
	orl	%ecx, %edx
	movl	%edx, -36(%rbp)
	movq	_act_time_value@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%rax,8), %rcx
	movl	(%rcx,%r12,4), %ecx
	shll	$16, %ecx
	orl	%edx, %ecx
	movl	%ecx, -36(%rbp)
	movq	_rco_time_value@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rdx,%rax,8), %rax
	movl	(%rax,%r12,4), %edx
	shll	$24, %edx
	orl	%ecx, %edx
	movl	%edx, -36(%rbp)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_pci_write_config_dword
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_133,8,3                    ## @ATA_133
	.comm	_ATA_100,8,3                    ## @ATA_100
	.comm	_XFER_MW_DMA_0,8,3              ## @XFER_MW_DMA_0
	.comm	_XFER_PIO_0,8,3                 ## @XFER_PIO_0
	.comm	_ini_time_value,8,3             ## @ini_time_value
	.comm	_act_time_value,8,3             ## @act_time_value
	.comm	_rco_time_value,8,3             ## @rco_time_value
	.no_dead_strip	_sis_ata133_program_timings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sis_ata133_program_timings
_sis_ata133_program_timings:            ; @sis_ata133_program_timings
	.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	x21, x1
	mov	x20, x0
	mov	w22, #4091
	movk	w22, #49344, lsl #16
	ldr	x8, [x0]
	ldr	w0, [x8]
	bl	_to_pci_dev
	mov	x19, x0
	str	wzr, [sp, #12]
	mov	x0, x20
	bl	_sis_ata133_get_base
	mov	x20, x0
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x20
	bl	_pci_read_config_dword
	ldr	w9, [sp, #12]
	orr	w8, w22, #0x4
	and	w8, w9, w8
	str	w8, [sp, #12]
Lloh0:
	adrp	x10, _ATA_133@GOTPAGE
Lloh1:
	ldr	x10, [x10, _ATA_133@GOTPAGEOFF]
Lloh2:
	adrp	x11, _ATA_100@GOTPAGE
Lloh3:
	ldr	x11, [x11, _ATA_100@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
Lloh5:
	ldr	x11, [x11]
Lloh6:
	adrp	x12, _XFER_MW_DMA_0@GOTPAGE
Lloh7:
	ldr	x12, [x12, _XFER_MW_DMA_0@GOTPAGEOFF]
Lloh8:
	ldr	x12, [x12]
	cmp	x12, x21
	b.le	LBB0_2
; %bb.1:
Lloh9:
	adrp	x12, _XFER_PIO_0@GOTPAGE
Lloh10:
	ldr	x12, [x12, _XFER_PIO_0@GOTPAGEOFF]
Lloh11:
	ldr	x12, [x12]
	sub	x12, x21, x12
	b	LBB0_3
LBB0_2:
	and	w8, w9, w22
	str	w8, [sp, #12]
	sub	x12, x21, x12
	add	x12, x12, #5
LBB0_3:
	tst	w9, #0x8
	csel	x9, x11, x10, eq
Lloh12:
	adrp	x10, _ini_time_value@GOTPAGE
Lloh13:
	ldr	x10, [x10, _ini_time_value@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	lsl	x9, x9, #3
	ldr	x10, [x10, x9]
	lsl	x11, x12, #2
	ldr	w10, [x10, x11]
	orr	w8, w8, w10, lsl #12
Lloh15:
	adrp	x10, _act_time_value@GOTPAGE
Lloh16:
	ldr	x10, [x10, _act_time_value@GOTPAGEOFF]
	str	w8, [sp, #12]
Lloh17:
	ldr	x10, [x10]
	ldr	x10, [x10, x9]
	ldr	w10, [x10, x11]
	orr	w8, w8, w10, lsl #16
	str	w8, [sp, #12]
Lloh18:
	adrp	x10, _rco_time_value@GOTPAGE
Lloh19:
	ldr	x10, [x10, _rco_time_value@GOTPAGEOFF]
Lloh20:
	ldr	x10, [x10]
	ldr	x9, [x10, x9]
	ldr	w9, [x9, x11]
	orr	w2, w8, w9, lsl #24
	str	w2, [sp, #12]
	mov	x0, x19
	mov	x1, 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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_133,8,3                    ; @ATA_133
	.comm	_ATA_100,8,3                    ; @ATA_100
	.comm	_XFER_MW_DMA_0,8,3              ; @XFER_MW_DMA_0
	.comm	_XFER_PIO_0,8,3                 ; @XFER_PIO_0
	.comm	_ini_time_value,8,3             ; @ini_time_value
	.comm	_act_time_value,8,3             ; @act_time_value
	.comm	_rco_time_value,8,3             ; @rco_time_value
	.no_dead_strip	_sis_ata133_program_timings
.subsections_via_symbols
