	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_timing_compute             ## -- Begin function ide_timing_compute
	.p2align	4, 0x90
_ide_timing_compute:                    ## @ide_timing_compute
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r15d
	movq	%rdx, %rbx
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	(%rdi), %r14
	movq	%rsi, %rdi
	callq	_ide_timing_find_mode
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	32(%rax), %rcx
	movq	%rcx, 32(%rbx)
	movups	(%rax), %xmm0
	movups	16(%rax), %xmm1
	movups	%xmm1, 16(%rbx)
	movups	%xmm0, (%rbx)
	movq	_ATA_ID_FIELD_VALID@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testb	$2, (%r14,%rax,4)
	je	LBB0_15
## %bb.3:
	leaq	-88(%rbp), %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movq	_XFER_PIO_2@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jge	LBB0_4
## %bb.6:
	movq	_XFER_PIO_4@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jge	LBB0_9
## %bb.7:
	movq	_XFER_PIO_5@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jne	LBB0_10
## %bb.8:
	movq	%r14, %rdi
	callq	_ata_id_is_cfa
	testl	%eax, %eax
	je	LBB0_9
LBB0_10:
	movq	_XFER_MW_DMA_0@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jg	LBB0_14
## %bb.11:
	movq	_XFER_MW_DMA_2@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jl	LBB0_14
## %bb.12:
	movq	_ATA_ID_EIDE_DMA_MIN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%r14,%rax,4), %eax
	jmp	LBB0_13
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_21
LBB0_4:
	movq	_ATA_ID_EIDE_PIO@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_9:
	movq	_ATA_ID_EIDE_PIO_IORDY@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %rax
	movl	(%r14,%rax,4), %eax
	movl	%eax, -84(%rbp)
LBB0_13:
	movl	%eax, -88(%rbp)
LBB0_14:
	movq	_IDE_TIMING_CYCLE@GOTPCREL(%rip), %rax
	movq	_IDE_TIMING_CYC8B@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	leaq	-88(%rbp), %rdi
	movq	%rbx, %rsi
	movq	%rbx, %rdx
	callq	_ide_timing_merge
LBB0_15:
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %ecx
	callq	_ide_timing_quantize
	movq	_XFER_SW_DMA_0@GOTPCREL(%rip), %rax
	cmpq	%r13, (%rax)
	jg	LBB0_17
## %bb.16:
	movq	%r12, %rdi
	movl	$255, %esi
	movl	$5, %edx
	callq	_ide_get_best_pio_mode
	movq	_XFER_PIO_0@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movl	%r14d, %r8d
	leaq	-88(%rbp), %r14
	movq	%r12, %rdi
	movq	%rax, %rsi
	movq	%r14, %rdx
	movl	%r15d, %ecx
	callq	_ide_timing_compute
	movq	_IDE_TIMING_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%rbx, %rdx
	callq	_ide_timing_merge
LBB0_17:
	movq	8(%rbx), %rax
	movq	16(%rbx), %rdx
	addq	%rax, %rdx
	movslq	4(%rbx), %rcx
	cmpq	%rcx, %rdx
	jge	LBB0_19
## %bb.18:
	movq	%rcx, %rsi
	subq	%rdx, %rsi
	movq	%rsi, %rdx
	shrq	$63, %rdx
	addq	%rsi, %rdx
	sarq	%rdx
	addq	%rax, %rdx
	movq	%rdx, 8(%rbx)
	subq	%rdx, %rcx
	movq	%rcx, 16(%rbx)
LBB0_19:
	movq	24(%rbx), %rcx
	movq	32(%rbx), %rsi
	addq	%rcx, %rsi
	movslq	(%rbx), %rdx
	xorl	%eax, %eax
	cmpq	%rdx, %rsi
	jge	LBB0_21
## %bb.20:
	movq	%rdx, %rdi
	subq	%rsi, %rdi
	movq	%rdi, %rsi
	shrq	$63, %rsi
	addq	%rdi, %rsi
	sarq	%rsi
	addq	%rcx, %rsi
	movq	%rsi, 24(%rbx)
	subq	%rsi, %rdx
	movq	%rdx, 32(%rbx)
LBB0_21:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ATA_ID_FIELD_VALID,8,3         ## @ATA_ID_FIELD_VALID
	.comm	_XFER_PIO_2,8,3                 ## @XFER_PIO_2
	.comm	_ATA_ID_EIDE_PIO,8,3            ## @ATA_ID_EIDE_PIO
	.comm	_XFER_PIO_4,8,3                 ## @XFER_PIO_4
	.comm	_XFER_PIO_5,8,3                 ## @XFER_PIO_5
	.comm	_ATA_ID_EIDE_PIO_IORDY,8,3      ## @ATA_ID_EIDE_PIO_IORDY
	.comm	_XFER_MW_DMA_0,8,3              ## @XFER_MW_DMA_0
	.comm	_XFER_MW_DMA_2,8,3              ## @XFER_MW_DMA_2
	.comm	_ATA_ID_EIDE_DMA_MIN,8,3        ## @ATA_ID_EIDE_DMA_MIN
	.comm	_IDE_TIMING_CYCLE,4,2           ## @IDE_TIMING_CYCLE
	.comm	_IDE_TIMING_CYC8B,4,2           ## @IDE_TIMING_CYC8B
	.comm	_XFER_SW_DMA_0,8,3              ## @XFER_SW_DMA_0
	.comm	_XFER_PIO_0,8,3                 ## @XFER_PIO_0
	.comm	_IDE_TIMING_ALL,4,2             ## @IDE_TIMING_ALL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_timing_compute             ; -- Begin function ide_timing_compute
	.p2align	2
_ide_timing_compute:                    ; @ide_timing_compute
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x4
	mov	x21, x3
	mov	x19, x2
	mov	x23, x1
	mov	x22, x0
	ldr	x24, [x0]
	mov	x0, x1
	bl	_ide_timing_find_mode
	cbz	x0, LBB0_8
; %bb.1:
	ldp	q0, q1, [x0]
	ldr	x8, [x0, #32]
	str	x8, [x19, #32]
	stp	q0, q1, [x19]
Lloh0:
	adrp	x8, _ATA_ID_FIELD_VALID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATA_ID_FIELD_VALID@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w8, [x24, x8, lsl #2]
	tbz	w8, #1, LBB0_14
; %bb.2:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #40
	bl	_memset
Lloh3:
	adrp	x8, _XFER_PIO_2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _XFER_PIO_2@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, x23
	b.ge	LBB0_9
; %bb.3:
Lloh6:
	adrp	x8, _XFER_PIO_4@GOTPAGE
Lloh7:
	ldr	x8, [x8, _XFER_PIO_4@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x8, x23
	b.ge	LBB0_10
; %bb.4:
Lloh9:
	adrp	x8, _XFER_PIO_5@GOTPAGE
Lloh10:
	ldr	x8, [x8, _XFER_PIO_5@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x8, x23
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x24
	bl	_ata_id_is_cfa
	cbz	w0, LBB0_10
LBB0_6:
Lloh12:
	adrp	x8, _XFER_MW_DMA_0@GOTPAGE
Lloh13:
	ldr	x8, [x8, _XFER_MW_DMA_0@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
Lloh15:
	adrp	x9, _XFER_MW_DMA_2@GOTPAGE
Lloh16:
	ldr	x9, [x9, _XFER_MW_DMA_2@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x23
	ccmp	x9, x23, #8, le
	b.lt	LBB0_13
; %bb.7:
Lloh18:
	adrp	x8, _ATA_ID_EIDE_DMA_MIN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ATA_ID_EIDE_DMA_MIN@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	ldr	w8, [x24, x8, lsl #2]
	b	LBB0_12
LBB0_8:
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_21
LBB0_9:
Lloh24:
	adrp	x8, _ATA_ID_EIDE_PIO@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ATA_ID_EIDE_PIO@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh26:
	adrp	x8, _ATA_ID_EIDE_PIO_IORDY@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ATA_ID_EIDE_PIO_IORDY@GOTPAGEOFF]
LBB0_11:
	ldr	x8, [x8]
	ldr	w8, [x24, x8, lsl #2]
	str	w8, [sp, #12]
LBB0_12:
	str	w8, [sp, #8]
LBB0_13:
Lloh28:
	adrp	x8, _IDE_TIMING_CYCLE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _IDE_TIMING_CYCLE@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
Lloh31:
	adrp	x9, _IDE_TIMING_CYC8B@GOTPAGE
Lloh32:
	ldr	x9, [x9, _IDE_TIMING_CYC8B@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	orr	w3, w9, w8
	add	x0, sp, #8
	mov	x1, x19
	mov	x2, x19
	bl	_ide_timing_merge
LBB0_14:
	mov	x0, x19
	mov	x1, x19
	mov	x2, x21
	mov	x3, x20
	bl	_ide_timing_quantize
Lloh34:
	adrp	x8, _XFER_SW_DMA_0@GOTPAGE
Lloh35:
	ldr	x8, [x8, _XFER_SW_DMA_0@GOTPAGEOFF]
Lloh36:
	ldr	x8, [x8]
	cmp	x8, x23
	b.gt	LBB0_16
; %bb.15:
	mov	x0, x22
	mov	w1, #255
	mov	w2, #5
	bl	_ide_get_best_pio_mode
Lloh37:
	adrp	x8, _XFER_PIO_0@GOTPAGE
Lloh38:
	ldr	x8, [x8, _XFER_PIO_0@GOTPAGEOFF]
Lloh39:
	ldr	x8, [x8]
	add	x1, x8, x0
	add	x2, sp, #8
	mov	x0, x22
	mov	x3, x21
	mov	x4, x20
	bl	_ide_timing_compute
Lloh40:
	adrp	x8, _IDE_TIMING_ALL@GOTPAGE
Lloh41:
	ldr	x8, [x8, _IDE_TIMING_ALL@GOTPAGEOFF]
Lloh42:
	ldr	w3, [x8]
	add	x0, sp, #8
	mov	x1, x19
	mov	x2, x19
	bl	_ide_timing_merge
LBB0_16:
	ldp	x8, x10, [x19, #8]
	ldrsw	x9, [x19, #4]
	add	x10, x10, x8
	cmp	x10, x9
	b.ge	LBB0_18
; %bb.17:
	sub	x10, x9, x10
	cmp	x10, #0
	cinc	x10, x10, lt
	add	x8, x8, x10, asr #1
	sub	x9, x9, x8
	stp	x8, x9, [x19, #8]
LBB0_18:
	ldp	x8, x10, [x19, #24]
	ldrsw	x9, [x19]
	add	x10, x10, x8
	cmp	x10, x9
	b.ge	LBB0_20
; %bb.19:
	mov	w0, #0
	sub	x10, x9, x10
	cmp	x10, #0
	cinc	x10, x10, lt
	add	x8, x8, x10, asr #1
	sub	x9, x9, x8
	stp	x8, x9, [x19, #24]
	b	LBB0_21
LBB0_20:
	mov	w0, #0
LBB0_21:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ATA_ID_FIELD_VALID,8,3         ; @ATA_ID_FIELD_VALID
	.comm	_XFER_PIO_2,8,3                 ; @XFER_PIO_2
	.comm	_ATA_ID_EIDE_PIO,8,3            ; @ATA_ID_EIDE_PIO
	.comm	_XFER_PIO_4,8,3                 ; @XFER_PIO_4
	.comm	_XFER_PIO_5,8,3                 ; @XFER_PIO_5
	.comm	_ATA_ID_EIDE_PIO_IORDY,8,3      ; @ATA_ID_EIDE_PIO_IORDY
	.comm	_XFER_MW_DMA_0,8,3              ; @XFER_MW_DMA_0
	.comm	_XFER_MW_DMA_2,8,3              ; @XFER_MW_DMA_2
	.comm	_ATA_ID_EIDE_DMA_MIN,8,3        ; @ATA_ID_EIDE_DMA_MIN
	.comm	_IDE_TIMING_CYCLE,4,2           ; @IDE_TIMING_CYCLE
	.comm	_IDE_TIMING_CYC8B,4,2           ; @IDE_TIMING_CYC8B
	.comm	_XFER_SW_DMA_0,8,3              ; @XFER_SW_DMA_0
	.comm	_XFER_PIO_0,8,3                 ; @XFER_PIO_0
	.comm	_IDE_TIMING_ALL,4,2             ; @IDE_TIMING_ALL
.subsections_via_symbols
