	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sc1200_set_pio_mode
_sc1200_set_pio_mode:                   ## @sc1200_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %r15
	cmpl	$199, %esi
	jg	LBB0_5
## %bb.1:
	cmpl	$100, %esi
	je	LBB0_11
## %bb.2:
	cmpl	$101, %esi
	je	LBB0_12
## %bb.3:
	cmpl	$102, %esi
	jne	LBB0_17
## %bb.4:
	movq	_XFER_MW_DMA_2@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_5:
	cmpl	$200, %esi
	je	LBB0_6
## %bb.7:
	cmpl	$202, %esi
	je	LBB0_10
## %bb.8:
	cmpl	$201, %esi
	jne	LBB0_17
## %bb.9:
	movq	_XFER_UDMA_1@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_11:
	movq	_XFER_MW_DMA_0@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_12:
	movq	_XFER_MW_DMA_1@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_6:
	movq	_XFER_UDMA_0@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_10:
	movq	_XFER_UDMA_2@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %ebx
	cmpl	$-1, %ebx
	je	LBB0_17
## %bb.14:
	movl	4(%r14), %esi
	leaq	L_.str(%rip), %rdi
	callq	_printk
	movq	%r14, %rdi
	callq	_ide_dma_off_quietly
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_ide_set_dma_mode
	testq	%rax, %rax
	je	LBB0_15
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sc1200_tunepio                 ## TAILCALL
LBB0_15:
	movq	_IDE_DFLAG_USING_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_18
## %bb.16:
	movq	(%r15), %rax
	movq	(%rax), %rax
	movq	%r14, %rdi
	movl	$1, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_XFER_UDMA_0,4,2                ## @XFER_UDMA_0
	.comm	_XFER_UDMA_1,4,2                ## @XFER_UDMA_1
	.comm	_XFER_UDMA_2,4,2                ## @XFER_UDMA_2
	.comm	_XFER_MW_DMA_0,4,2              ## @XFER_MW_DMA_0
	.comm	_XFER_MW_DMA_1,4,2              ## @XFER_MW_DMA_1
	.comm	_XFER_MW_DMA_2,4,2              ## @XFER_MW_DMA_2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SC1200: %s: changing (U)DMA mode\n"

	.comm	_IDE_DFLAG_USING_DMA,4,2        ## @IDE_DFLAG_USING_DMA
	.no_dead_strip	_sc1200_set_pio_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sc1200_set_pio_mode
_sc1200_set_pio_mode:                   ; @sc1200_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
	mov	x19, x0
	ldr	x21, [x0, #8]
	cmp	w1, #199
	b.gt	LBB0_5
; %bb.1:
	cmp	w1, #100
	b.eq	LBB0_9
; %bb.2:
	cmp	w1, #101
	b.eq	LBB0_10
; %bb.3:
	cmp	w1, #102
	b.ne	LBB0_16
; %bb.4:
Lloh0:
	adrp	x8, _XFER_MW_DMA_2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XFER_MW_DMA_2@GOTPAGEOFF]
	b	LBB0_13
LBB0_5:
	cmp	w1, #200
	b.eq	LBB0_11
; %bb.6:
	cmp	w1, #202
	b.eq	LBB0_12
; %bb.7:
	cmp	w1, #201
	b.ne	LBB0_16
; %bb.8:
Lloh2:
	adrp	x8, _XFER_UDMA_1@GOTPAGE
Lloh3:
	ldr	x8, [x8, _XFER_UDMA_1@GOTPAGEOFF]
	b	LBB0_13
LBB0_9:
Lloh4:
	adrp	x8, _XFER_MW_DMA_0@GOTPAGE
Lloh5:
	ldr	x8, [x8, _XFER_MW_DMA_0@GOTPAGEOFF]
	b	LBB0_13
LBB0_10:
Lloh6:
	adrp	x8, _XFER_MW_DMA_1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _XFER_MW_DMA_1@GOTPAGEOFF]
	b	LBB0_13
LBB0_11:
Lloh8:
	adrp	x8, _XFER_UDMA_0@GOTPAGE
Lloh9:
	ldr	x8, [x8, _XFER_UDMA_0@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh10:
	adrp	x8, _XFER_UDMA_2@GOTPAGE
Lloh11:
	ldr	x8, [x8, _XFER_UDMA_2@GOTPAGEOFF]
LBB0_13:
	ldr	w20, [x8]
	cmn	w20, #1
	b.eq	LBB0_16
; %bb.14:
	ldr	w1, [x19, #4]
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
	mov	x0, x19
	bl	_ide_dma_off_quietly
	mov	x0, x19
	mov	x1, x20
	bl	_ide_set_dma_mode
	cbz	x0, LBB0_17
LBB0_15:
	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_16:
	mov	x0, 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	_sc1200_tunepio
LBB0_17:
	ldr	w8, [x19]
Lloh14:
	adrp	x9, _IDE_DFLAG_USING_DMA@GOTPAGE
Lloh15:
	ldr	x9, [x9, _IDE_DFLAG_USING_DMA@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.18:
	ldr	x8, [x21]
	ldr	x2, [x8]
	mov	x0, x19
	mov	w1, #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
	br	x2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_XFER_UDMA_0,4,2                ; @XFER_UDMA_0
	.comm	_XFER_UDMA_1,4,2                ; @XFER_UDMA_1
	.comm	_XFER_UDMA_2,4,2                ; @XFER_UDMA_2
	.comm	_XFER_MW_DMA_0,4,2              ; @XFER_MW_DMA_0
	.comm	_XFER_MW_DMA_1,4,2              ; @XFER_MW_DMA_1
	.comm	_XFER_MW_DMA_2,4,2              ; @XFER_MW_DMA_2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SC1200: %s: changing (U)DMA mode\n"

	.comm	_IDE_DFLAG_USING_DMA,4,2        ; @IDE_DFLAG_USING_DMA
	.no_dead_strip	_sc1200_set_pio_mode
.subsections_via_symbols
