	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vt1724_midi_write
_vt1724_midi_write:                     ## @vt1724_midi_write
	.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
	subq	$152, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_SNDRV_RAWMIDI_STREAM_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_get_rawmidi_substream
	movq	%rax, -184(%rbp)                ## 8-byte Spill
	movq	_MPU_TXFIFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ICEREG1724
	movl	%eax, %edi
	callq	_inb
	cmpl	$30, %eax
	jg	LBB0_4
## %bb.1:
	movl	$31, %edx
	subl	%eax, %edx
	leaq	-176(%rbp), %rsi
	movq	-184(%rbp), %rdi                ## 8-byte Reload
	callq	_snd_rawmidi_transmit
	testl	%eax, %eax
	jle	LBB0_4
## %bb.2:
	movl	%eax, %r12d
	xorl	%ebx, %ebx
	movq	_MPU_DATA@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	-176(%rbp,%rbx,4), %r13d
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_ICEREG1724
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_outb
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_3
LBB0_4:
	movq	_VT1724_IRQ_MPU_TX@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-184(%rbp), %rdi                ## 8-byte Reload
	callq	_snd_rawmidi_transmit_empty
	xorl	%edx, %edx
	testl	%eax, %eax
	sete	%dl
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_enable_midi_irq
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	addq	$152, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SNDRV_RAWMIDI_STREAM_OUTPUT,4,2 ## @SNDRV_RAWMIDI_STREAM_OUTPUT
	.comm	_MPU_TXFIFO,4,2                 ## @MPU_TXFIFO
	.comm	_MPU_DATA,4,2                   ## @MPU_DATA
	.comm	_VT1724_IRQ_MPU_TX,4,2          ## @VT1724_IRQ_MPU_TX
	.no_dead_strip	_vt1724_midi_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vt1724_midi_write
_vt1724_midi_write:                     ; @vt1724_midi_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _SNDRV_RAWMIDI_STREAM_OUTPUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SNDRV_RAWMIDI_STREAM_OUTPUT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_get_rawmidi_substream
	mov	x20, x0
Lloh6:
	adrp	x8, _MPU_TXFIFO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MPU_TXFIFO@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ICEREG1724
	bl	_inb
	cmp	w0, #30
	b.gt	LBB0_4
; %bb.1:
	mov	w8, #31
	sub	w2, w8, w0
	add	x1, sp, #8
	mov	x0, x20
	bl	_snd_rawmidi_transmit
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.2:
	mov	w22, w0
	add	x23, sp, #8
Lloh9:
	adrp	x24, _MPU_DATA@GOTPAGE
Lloh10:
	ldr	x24, [x24, _MPU_DATA@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w21, [x23], #4
	ldr	w1, [x24]
	mov	x0, x19
	bl	_ICEREG1724
	mov	x1, x0
	mov	x0, x21
	bl	_outb
	subs	x22, x22, #1
	b.ne	LBB0_3
LBB0_4:
Lloh11:
	adrp	x8, _VT1724_IRQ_MPU_TX@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VT1724_IRQ_MPU_TX@GOTPAGEOFF]
Lloh13:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_snd_rawmidi_transmit_empty
	cmp	w0, #0
	cset	w2, eq
	mov	x0, x19
	mov	x1, x21
	bl	_enable_midi_irq
	ldur	x8, [x29, #-56]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_SNDRV_RAWMIDI_STREAM_OUTPUT,4,2 ; @SNDRV_RAWMIDI_STREAM_OUTPUT
	.comm	_MPU_TXFIFO,4,2                 ; @MPU_TXFIFO
	.comm	_MPU_DATA,4,2                   ; @MPU_DATA
	.comm	_VT1724_IRQ_MPU_TX,4,2          ; @VT1724_IRQ_MPU_TX
	.no_dead_strip	_vt1724_midi_write
.subsections_via_symbols
