	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vt1724_midi_output_drain
_vt1724_midi_output_drain:              ## @vt1724_midi_output_drain
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	(%rax), %r14
	movq	_VT1724_IRQ_MPU_TX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_vt1724_enable_midi_irq
	movq	_jiffies@GOTPCREL(%rip), %r15
	movq	(%r15), %r12
	movl	$15, %edi
	callq	_msecs_to_jiffies
	movq	%rax, %rbx
	addq	%r12, %rbx
	movq	_MPU_CTRL@GOTPCREL(%rip), %r12
	movq	_VT1724_MPU_TX_EMPTY@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_ICEREG1724
	movl	%eax, %edi
	callq	_inb
	testl	%eax, (%r13)
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %edi
	callq	_schedule_timeout_uninterruptible
	movq	(%r15), %rsi
	movq	%rbx, %rdi
	callq	_time_after
	testq	%rax, %rax
	jne	LBB0_1
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VT1724_IRQ_MPU_TX,4,2          ## @VT1724_IRQ_MPU_TX
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_MPU_CTRL,4,2                   ## @MPU_CTRL
	.comm	_VT1724_MPU_TX_EMPTY,4,2        ## @VT1724_MPU_TX_EMPTY
	.no_dead_strip	_vt1724_midi_output_drain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vt1724_midi_output_drain
_vt1724_midi_output_drain:              ; @vt1724_midi_output_drain
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x8, [x0]
	ldr	x19, [x8]
Lloh0:
	adrp	x8, _VT1724_IRQ_MPU_TX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VT1724_IRQ_MPU_TX@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_vt1724_enable_midi_irq
Lloh3:
	adrp	x21, _jiffies@GOTPAGE
Lloh4:
	ldr	x21, [x21, _jiffies@GOTPAGEOFF]
	ldr	x20, [x21]
	mov	w0, #15
	bl	_msecs_to_jiffies
	add	x20, x0, x20
Lloh5:
	adrp	x22, _MPU_CTRL@GOTPAGE
Lloh6:
	ldr	x22, [x22, _MPU_CTRL@GOTPAGEOFF]
Lloh7:
	adrp	x23, _VT1724_MPU_TX_EMPTY@GOTPAGE
Lloh8:
	ldr	x23, [x23, _VT1724_MPU_TX_EMPTY@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	mov	x0, x19
	bl	_ICEREG1724
	bl	_inb
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #1
	bl	_schedule_timeout_uninterruptible
	ldr	x1, [x21]
	mov	x0, x20
	bl	_time_after
	cbnz	x0, LBB0_1
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_VT1724_IRQ_MPU_TX,4,2          ; @VT1724_IRQ_MPU_TX
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_MPU_CTRL,4,2                   ; @MPU_CTRL
	.comm	_VT1724_MPU_TX_EMPTY,4,2        ; @VT1724_MPU_TX_EMPTY
	.no_dead_strip	_vt1724_midi_output_drain
.subsections_via_symbols
