	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_set_xfer_rate              ## -- Begin function ide_set_xfer_rate
	.p2align	4, 0x90
_ide_set_xfer_rate:                     ## @ide_set_xfer_rate
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	8(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.1:
	cmpq	$0, (%rcx)
	je	LBB0_6
## %bb.2:
	movq	_IDE_HFLAG_NO_SET_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_3
LBB0_6:
	movl	$-1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rdi, %rbx
	callq	_ide_rate_filter
	movq	%rax, %r14
	movq	_XFER_PIO_0@GOTPCREL(%rip), %r15
	xorl	%edi, %edi
	cmpq	(%r15), %rax
	setl	%dil
	callq	_BUG_ON
	cmpq	(%r15), %r14
	jl	LBB0_5
## %bb.4:
	movq	_XFER_PIO_6@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jg	LBB0_5
## %bb.7:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ide_set_pio_mode               ## TAILCALL
LBB0_5:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ide_set_dma_mode               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IDE_HFLAG_NO_SET_MODE,4,2      ## @IDE_HFLAG_NO_SET_MODE
	.comm	_XFER_PIO_0,8,3                 ## @XFER_PIO_0
	.comm	_XFER_PIO_6,8,3                 ## @XFER_PIO_6
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_set_xfer_rate              ; -- Begin function ide_set_xfer_rate
	.p2align	2
_ide_set_xfer_rate:                     ; @ide_set_xfer_rate
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x0]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_3
; %bb.1:
	ldr	x9, [x9]
	cbz	x9, LBB0_3
; %bb.2:
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _IDE_HFLAG_NO_SET_MODE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IDE_HFLAG_NO_SET_MODE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
LBB0_3:
	mov	w0, #-1
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x19, x0
	bl	_ide_rate_filter
	mov	x20, x0
Lloh3:
	adrp	x21, _XFER_PIO_0@GOTPAGE
Lloh4:
	ldr	x21, [x21, _XFER_PIO_0@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	cset	w0, lt
	bl	_BUG_ON
	ldr	x8, [x21]
Lloh5:
	adrp	x9, _XFER_PIO_6@GOTPAGE
Lloh6:
	ldr	x9, [x9, _XFER_PIO_6@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x20, x8
	mov	x0, x19
	mov	x1, x20
	ccmp	x20, x9, #0, ge
	b.le	LBB0_6
; %bb.5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ide_set_dma_mode
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ide_set_pio_mode
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_IDE_HFLAG_NO_SET_MODE,4,2      ; @IDE_HFLAG_NO_SET_MODE
	.comm	_XFER_PIO_0,8,3                 ; @XFER_PIO_0
	.comm	_XFER_PIO_6,8,3                 ; @XFER_PIO_6
.subsections_via_symbols
