	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sis_ata133_program_udma_timings
_sis_ata133_program_udma_timings:       ## @sis_ata133_program_udma_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), %ecx
	movl	%ecx, %eax
	andl	$-4085, %eax                    ## imm = 0xF00B
	orl	$4, %eax
	movl	%eax, -36(%rbp)
	testb	$8, %cl
	jne	LBB0_1
## %bb.2:
	movq	_ATA_100@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_1:
	movq	_ATA_133@GOTPCREL(%rip), %rcx
LBB0_3:
	movq	(%rcx), %rcx
	movq	_XFER_UDMA_0@GOTPCREL(%rip), %rdx
	subq	(%rdx), %r12
	movq	_cycle_time_value@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rdx,%rcx,8), %rdx
	movl	(%rdx,%r12,4), %esi
	shll	$4, %esi
	orl	%eax, %esi
	movl	%esi, -36(%rbp)
	movq	_cvs_time_value@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%rcx,8), %rax
	movl	(%rax,%r12,4), %edx
	shll	$8, %edx
	orl	%esi, %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_UDMA_0,8,3                ## @XFER_UDMA_0
	.comm	_cycle_time_value,8,3           ## @cycle_time_value
	.comm	_cvs_time_value,8,3             ## @cvs_time_value
	.no_dead_strip	_sis_ata133_program_udma_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_udma_timings
_sis_ata133_program_udma_timings:       ; @sis_ata133_program_udma_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	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
	ldr	w0, [x8]
	bl	_to_pci_dev
	mov	x21, x0
	str	wzr, [sp, #12]
	mov	x0, x20
	bl	_sis_ata133_get_base
	mov	x20, x0
	add	x2, sp, #12
	mov	x0, x21
	mov	x1, x20
	bl	_pci_read_config_dword
	ldr	w8, [sp, #12]
	and	w9, w8, #0xfffff00f
	orr	w9, w9, #0x4
	str	w9, [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]
	tst	w8, #0x8
	csel	x8, x11, x10, eq
Lloh4:
	adrp	x10, _XFER_UDMA_0@GOTPAGE
Lloh5:
	ldr	x10, [x10, _XFER_UDMA_0@GOTPAGEOFF]
	ldr	x8, [x8]
Lloh6:
	ldr	x10, [x10]
	sub	x10, x19, x10
Lloh7:
	adrp	x11, _cycle_time_value@GOTPAGE
Lloh8:
	ldr	x11, [x11, _cycle_time_value@GOTPAGEOFF]
Lloh9:
	ldr	x11, [x11]
	lsl	x8, x8, #3
	ldr	x11, [x11, x8]
	lsl	x10, x10, #2
	ldr	w11, [x11, x10]
	orr	w9, w9, w11, lsl #4
	str	w9, [sp, #12]
Lloh10:
	adrp	x11, _cvs_time_value@GOTPAGE
Lloh11:
	ldr	x11, [x11, _cvs_time_value@GOTPAGEOFF]
Lloh12:
	ldr	x11, [x11]
	ldr	x8, [x11, x8]
	ldr	w8, [x8, x10]
	orr	w2, w9, w8, lsl #8
	str	w2, [sp, #12]
	mov	x0, x21
	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	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_133,8,3                    ; @ATA_133
	.comm	_ATA_100,8,3                    ; @ATA_100
	.comm	_XFER_UDMA_0,8,3                ; @XFER_UDMA_0
	.comm	_cycle_time_value,8,3           ; @cycle_time_value
	.comm	_cvs_time_value,8,3             ; @cvs_time_value
	.no_dead_strip	_sis_ata133_program_udma_timings
.subsections_via_symbols
