	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_hdspm_midi_output_write
_snd_hdspm_midi_output_write:           ## @snd_hdspm_midi_output_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	%rbx
	subq	$136, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	callq	_spin_lock_irqsave
	movq	16(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	callq	_snd_rawmidi_transmit_empty
	testl	%eax, %eax
	je	LBB0_2
LBB0_6:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	addq	$136, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	4(%r15), %esi
	movl	8(%r15), %edi
	callq	_snd_hdspm_midi_output_possible
	testl	%eax, %eax
	jle	LBB0_6
## %bb.3:
	cmpl	$128, %eax
	movl	$128, %edx
	cmovll	%eax, %edx
	movq	16(%r15), %rdi
	leaq	-160(%rbp), %rsi
	callq	_snd_rawmidi_transmit
	testl	%eax, %eax
	jle	LBB0_6
## %bb.4:
	movl	%eax, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r15), %esi
	movl	8(%r15), %edi
	movzbl	-160(%rbp,%rbx), %edx
	callq	_snd_hdspm_midi_write_byte
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_5
	jmp	LBB0_6
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_snd_hdspm_midi_output_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_hdspm_midi_output_write
_snd_hdspm_midi_output_write:           ; @snd_hdspm_midi_output_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	bl	_spin_lock_irqsave
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_snd_rawmidi_transmit_empty
	cbz	w0, LBB0_4
LBB0_2:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	ldur	x8, [x29, #-40]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.3:
	mov	w0, #0
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_4:
	ldp	w1, w0, [x19, #4]
	bl	_snd_hdspm_midi_output_possible
	cmp	w0, #1
	b.lt	LBB0_2
; %bb.5:
	mov	w8, #128
	cmp	w0, #128
	csel	w2, w0, w8, lt
	ldr	x0, [x19, #16]
	add	x1, sp, #8
	bl	_snd_rawmidi_transmit
	cmp	w0, #1
	b.lt	LBB0_2
; %bb.6:
	mov	w20, w0
	add	x21, sp, #8
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w1, w0, [x19, #4]
	ldrb	w2, [x21], #1
	bl	_snd_hdspm_midi_write_byte
	subs	x20, x20, #1
	b.ne	LBB0_7
	b	LBB0_2
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_snd_hdspm_midi_output_write
.subsections_via_symbols
