	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_set_dma_mode               ## -- Begin function ide_set_dma_mode
	.p2align	4, 0x90
_ide_set_dma_mode:                      ## @ide_set_dma_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), %rcx
	movl	(%rcx), %eax
	movq	_IDE_HFLAG_NO_SET_MODE@GOTPCREL(%rip), %rdx
	xorl	%ebx, %ebx
	testl	%eax, (%rdx)
	je	LBB0_1
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	8(%rcx), %r12
	movl	$-1, %ebx
	testq	%r12, %r12
	je	LBB0_6
## %bb.2:
	movq	(%r12), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.3:
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_IDE_HFLAG_POST_SET_MODE@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_7
## %bb.4:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_ide_config_drive_speed
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	*(%r12)
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_7:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	*%rcx
	movq	%r15, %rdi
	movl	%r14d, %esi
	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	_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_dma_mode               ; -- Begin function ide_set_dma_mode
	.p2align	2
_ide_set_dma_mode:                      ; @ide_set_dma_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	x9, [x0]
	ldr	w8, [x9]
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, w8
	b.eq	LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_7
LBB0_2:
	ldr	x21, [x9, #8]
	cbz	x21, LBB0_6
; %bb.3:
	ldr	x9, [x21]
	cbz	x9, LBB0_6
; %bb.4:
	mov	x19, x1
	mov	x20, x0
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, w8
	b.eq	LBB0_8
; %bb.5:
	bl	_ide_config_drive_speed
	cbz	w0, LBB0_9
LBB0_6:
	mov	w0, #-1
LBB0_7:
	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_8:
	blr	x9
	mov	x0, x20
	mov	x1, x19
	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_9:
	ldr	x8, [x21]
	mov	x0, x20
	mov	x1, x19
	blr	x8
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_IDE_HFLAG_NO_SET_MODE,4,2      ; @IDE_HFLAG_NO_SET_MODE
	.comm	_IDE_HFLAG_POST_SET_MODE,4,2    ; @IDE_HFLAG_POST_SET_MODE
.subsections_via_symbols
