	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cs5535_set_piomode
_cs5535_set_piomode:                    ## @cs5535_set_piomode
	.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	%rsi, %rdi
	callq	_ata_dev_pair
	movq	%rax, %r13
	movslq	(%r14), %r12
	movq	_XFER_PIO_0@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	subq	%rax, %r12
	testq	%r13, %r13
	je	LBB0_1
## %bb.2:
	movslq	(%r13), %rbx
	subq	%rax, %rbx
	movl	%r12d, %edi
	movl	%ebx, %esi
	callq	_min
	movl	%eax, %r15d
	cmpl	%ebx, %eax
	jge	LBB0_4
## %bb.3:
	movq	_ATAC_CH0D0_PIO@GOTPCREL(%rip), %rax
	movslq	4(%r13), %rdi
	addq	%rdi, %rdi
	addq	(%rax), %rdi
	movslq	%r15d, %rax
	leaq	_cs5535_set_piomode.pio_cmd_timings(%rip), %rcx
	movl	(%rcx,%rax,4), %esi
	shll	$16, %esi
	orl	(%rcx,%rbx,4), %esi
	xorl	%edx, %edx
	callq	_wrmsr
	jmp	LBB0_4
LBB0_1:
	movl	%r12d, %r15d
LBB0_4:
	movq	_ATAC_CH0D0_PIO@GOTPCREL(%rip), %rax
	movslq	4(%r14), %rdi
	addq	%rdi, %rdi
	addq	(%rax), %rdi
	movslq	%r15d, %rax
	leaq	_cs5535_set_piomode.pio_cmd_timings(%rip), %rcx
	movl	(%rcx,%rax,4), %esi
	shll	$16, %esi
	orl	(%rcx,%r12,4), %esi
	xorl	%edx, %edx
	callq	_wrmsr
	movq	_ATAC_CH0D0_DMA@GOTPCREL(%rip), %rbx
	movslq	4(%r14), %rdi
	addq	%rdi, %rdi
	addq	(%rbx), %rdi
	callq	_rdmsr
	movslq	4(%r14), %rdi
	addq	%rdi, %rdi
	addq	(%rbx), %rdi
	movl	$-2147483648, %esi              ## imm = 0x80000000
	xorl	%edx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wrmsr                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @cs5535_set_piomode.pio_cmd_timings
_cs5535_set_piomode.pio_cmd_timings:
	.long	63476                           ## 0xf7f4
	.long	21491                           ## 0x53f3
	.long	5105                            ## 0x13f1
	.long	20785                           ## 0x5131
	.long	4401                            ## 0x1131

	.comm	_XFER_PIO_0,4,2                 ## @XFER_PIO_0
	.comm	_ATAC_CH0D0_PIO,8,3             ## @ATAC_CH0D0_PIO
	.comm	_ATAC_CH0D0_DMA,8,3             ## @ATAC_CH0D0_DMA
	.no_dead_strip	_cs5535_set_piomode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cs5535_set_piomode
_cs5535_set_piomode:                    ; @cs5535_set_piomode
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x0, x1
	bl	_ata_dev_pair
	ldr	w9, [x19]
Lloh0:
	adrp	x8, _XFER_PIO_0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XFER_PIO_0@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sub	w20, w9, w8
Lloh3:
	adrp	x25, _ATAC_CH0D0_PIO@GOTPAGE
Lloh4:
	ldr	x25, [x25, _ATAC_CH0D0_PIO@GOTPAGEOFF]
Lloh5:
	adrp	x24, _cs5535_set_piomode.pio_cmd_timings@PAGE
Lloh6:
	add	x24, x24, _cs5535_set_piomode.pio_cmd_timings@PAGEOFF
	cbz	x0, LBB0_3
; %bb.1:
	mov	x22, x0
	ldr	w9, [x0]
	sub	w23, w9, w8
	mov	x0, x20
	mov	x1, x23
	bl	_min
	mov	x21, x0
	cmp	w0, w23
	b.ge	LBB0_4
; %bb.2:
	ldr	x8, [x25]
	ldrsw	x9, [x22, #4]
	add	x0, x8, x9, lsl #1
	ldr	w8, [x24, w21, sxtw #2]
	ldr	w9, [x24, w23, sxtw #2]
	orr	w1, w9, w8, lsl #16
	mov	w2, #0
	bl	_wrmsr
	b	LBB0_4
LBB0_3:
	mov	x21, x20
LBB0_4:
	ldr	x8, [x25]
	ldrsw	x9, [x19, #4]
	add	x0, x8, x9, lsl #1
	ldr	w8, [x24, w21, sxtw #2]
	ldr	w9, [x24, w20, sxtw #2]
	orr	w1, w9, w8, lsl #16
	mov	w2, #0
	bl	_wrmsr
Lloh7:
	adrp	x20, _ATAC_CH0D0_DMA@GOTPAGE
Lloh8:
	ldr	x20, [x20, _ATAC_CH0D0_DMA@GOTPAGEOFF]
	ldr	x8, [x20]
	ldrsw	x9, [x19, #4]
	add	x0, x8, x9, lsl #1
	bl	_rdmsr
	ldr	x8, [x20]
	ldrsw	x9, [x19, #4]
	add	x0, x8, x9, lsl #1
	mov	w1, #-2147483648
	mov	w2, #0
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_wrmsr
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @cs5535_set_piomode.pio_cmd_timings
_cs5535_set_piomode.pio_cmd_timings:
	.long	63476                           ; 0xf7f4
	.long	21491                           ; 0x53f3
	.long	5105                            ; 0x13f1
	.long	20785                           ; 0x5131
	.long	4401                            ; 0x1131

	.comm	_XFER_PIO_0,4,2                 ; @XFER_PIO_0
	.comm	_ATAC_CH0D0_PIO,8,3             ; @ATAC_CH0D0_PIO
	.comm	_ATAC_CH0D0_DMA,8,3             ; @ATAC_CH0D0_DMA
	.no_dead_strip	_cs5535_set_piomode
.subsections_via_symbols
