	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sc1200_dma_end
_sc1200_dma_end:                        ## @sc1200_dma_end
	.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
	movq	(%rax), %r15
	leaq	2(%r15), %r14
	movq	%r14, %rdi
	callq	_inb
	movl	%eax, %ebx
	movl	%eax, %r12d
	andl	$7, %r12d
	testb	$4, %bl
	jne	LBB0_2
## %bb.1:
	xorl	%edx, %edx
	cmpl	$4, %r12d
	setne	%dl
	movl	%ebx, %ecx
	shrl	%ecx
	andl	$1, %ecx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_printk
LBB0_2:
	orl	$27, %ebx
	movl	%ebx, %edi
	movq	%r14, %rsi
	callq	_outb
	movq	%r15, %rdi
	callq	_inb
	andl	$-2, %eax
	movl	%eax, %edi
	movq	%r15, %rsi
	callq	_outb
	xorl	%eax, %eax
	cmpl	$4, %r12d
	setne	%al
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	" ide_dma_end dma_stat=%0x err=%x newerr=%x\n"

	.no_dead_strip	_sc1200_dma_end
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sc1200_dma_end
_sc1200_dma_end:                        ; @sc1200_dma_end
	.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	x19, [x8]
	add	x20, x19, #2
	mov	x0, x20
	bl	_inb
	mov	x21, x0
	and	w22, w0, #0x7
	tbnz	w0, #2, LBB0_2
; %bb.1:
	cmp	w22, #4
	cset	w2, ne
	ubfx	w3, w21, #1, #1
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_printk
LBB0_2:
	mov	w8, #27
	orr	w0, w21, w8
	mov	x1, x20
	bl	_outb
	mov	x0, x19
	bl	_inb
	and	w0, w0, #0xfffffffe
	mov	x1, x19
	bl	_outb
	cmp	w22, #4
	cset	w0, ne
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" ide_dma_end dma_stat=%0x err=%x newerr=%x\n"

	.no_dead_strip	_sc1200_dma_end
.subsections_via_symbols
