	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_set_pio_mode               ## -- Begin function ide_set_pio_mode
	.p2align	4, 0x90
_ide_set_pio_mode:                      ## @ide_set_pio_mode
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movl	(%rax), %ecx
	movq	_IDE_HFLAG_NO_SET_MODE@GOTPCREL(%rip), %rdx
	xorl	%ebx, %ebx
	testl	%ecx, (%rdx)
	je	LBB0_1
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	8(%rax), %r12
	movl	$-1, %ebx
	testq	%r12, %r12
	je	LBB0_9
## %bb.2:
	movq	(%r12), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	movq	%rsi, %r14
	movq	%rdi, %r15
	cmpq	$0, 8(%r12)
	je	LBB0_4
## %bb.5:
	movq	_IDE_HFLAG_POST_SET_MODE@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	je	LBB0_10
## %bb.6:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_ide_config_drive_speed
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movq	_XFER_PIO_0@GOTPCREL(%rip), %rax
	subq	(%rax), %r14
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	*(%r12)
	jmp	LBB0_8
LBB0_4:
	movq	_XFER_PIO_0@GOTPCREL(%rip), %rcx
	subq	(%rcx), %r14
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	*%rax
LBB0_8:
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_10:
	movq	_XFER_PIO_0@GOTPCREL(%rip), %rcx
	movq	%r14, %rsi
	subq	(%rcx), %rsi
	movq	%r15, %rdi
	callq	*%rax
	movq	%r15, %rdi
	movq	%r14, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ide_config_drive_speed         ## 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	_IDE_HFLAG_POST_SET_MODE,4,2    ## @IDE_HFLAG_POST_SET_MODE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_set_pio_mode               ; -- Begin function ide_set_pio_mode
	.p2align	2
_ide_set_pio_mode:                      ; @ide_set_pio_mode
	.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	w9, [x8]
Lloh0:
	adrp	x10, _IDE_HFLAG_NO_SET_MODE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _IDE_HFLAG_NO_SET_MODE@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_8
LBB0_2:
	ldr	x21, [x8, #8]
	cbz	x21, LBB0_7
; %bb.3:
	ldr	x8, [x21]
	cbz	x8, LBB0_7
; %bb.4:
	mov	x20, x1
	mov	x19, x0
	ldr	x10, [x21, #8]
	cbz	x10, LBB0_11
; %bb.5:
Lloh3:
	adrp	x10, _IDE_HFLAG_POST_SET_MODE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _IDE_HFLAG_POST_SET_MODE@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_9
; %bb.6:
	mov	x0, x19
	mov	x1, x20
	bl	_ide_config_drive_speed
	cbz	w0, LBB0_10
LBB0_7:
	mov	w0, #-1
LBB0_8:
	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_9:
Lloh6:
	adrp	x9, _XFER_PIO_0@GOTPAGE
Lloh7:
	ldr	x9, [x9, _XFER_PIO_0@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	sub	x1, x20, x9
	mov	x0, x19
	blr	x8
	mov	x0, x19
	mov	x1, x20
	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_config_drive_speed
LBB0_10:
	ldr	x8, [x21]
LBB0_11:
Lloh9:
	adrp	x9, _XFER_PIO_0@GOTPAGE
Lloh10:
	ldr	x9, [x9, _XFER_PIO_0@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	sub	x1, x20, x9
	mov	x0, x19
	blr	x8
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.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	_IDE_HFLAG_POST_SET_MODE,4,2    ; @IDE_HFLAG_POST_SET_MODE
.subsections_via_symbols
