	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handlecommand
_handlecommand:                         ## @handlecommand
	.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, %r14
	movl	(%rdi), %ebx
	movl	4(%rdi), %r15d
	xorl	%eax, %eax
	callq	_claim_dma_lock
	movq	%rax, %r12
	movl	%ebx, %edi
	callq	_disable_dma
	movl	%ebx, %edi
	callq	_clear_dma_ff
	movq	_DMA_MODE_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_set_dma_mode
	movq	_ltdmacbuf@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_virt_to_bus
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_set_dma_addr
	movl	%ebx, %edi
	movl	$50, %esi
	callq	_set_dma_count
	movl	%ebx, %edi
	callq	_enable_dma
	movq	%r12, %rdi
	callq	_release_dma_lock
	leal	3(%r15), %edi
	callq	_inb_p
	addl	$2, %r15d
	movl	%r15d, %edi
	callq	_inb_p
	movq	%r14, %rdi
	movl	$250, %esi
	callq	_wait_timeout
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	leaq	L_.str(%rip), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_printk                         ## TAILCALL
LBB0_1:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_MODE_WRITE,4,2             ## @DMA_MODE_WRITE
	.comm	_ltdmacbuf,4,2                  ## @ltdmacbuf
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timed out in handlecommand\n"

	.no_dead_strip	_handlecommand
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handlecommand
_handlecommand:                         ; @handlecommand
	.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
	ldp	w20, w22, [x0]
	bl	_claim_dma_lock
	mov	x21, x0
	mov	x0, x20
	bl	_disable_dma
	mov	x0, x20
	bl	_clear_dma_ff
Lloh0:
	adrp	x8, _DMA_MODE_WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_MODE_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_set_dma_mode
Lloh3:
	adrp	x8, _ltdmacbuf@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ltdmacbuf@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_virt_to_bus
	mov	x1, x0
	mov	x0, x20
	bl	_set_dma_addr
	mov	x0, x20
	mov	w1, #50
	bl	_set_dma_count
	mov	x0, x20
	bl	_enable_dma
	mov	x0, x21
	bl	_release_dma_lock
	add	w0, w22, #3
	bl	_inb_p
	add	w0, w22, #2
	bl	_inb_p
	mov	x0, x19
	mov	w1, #250
	bl	_wait_timeout
	cbz	x0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	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	_printk
LBB0_2:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_MODE_WRITE,4,2             ; @DMA_MODE_WRITE
	.comm	_ltdmacbuf,4,2                  ; @ltdmacbuf
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timed out in handlecommand\n"

	.no_dead_strip	_handlecommand
.subsections_via_symbols
