	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_virmidi_output_trigger
_snd_virmidi_output_trigger:            ## @snd_virmidi_output_trigger
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rdi, -88(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	8(%rax), %r14
	testl	%esi, %esi
	je	LBB0_18
## %bb.1:
	movl	$1, (%r14)
	movq	8(%r14), %rcx
	movq	_SNDRV_VIRMIDI_SEQ_DISPATCH@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_5
## %bb.2:
	movq	32(%r14), %rcx
	movq	_SNDRV_VIRMIDI_SUBSCRIBE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rcx)
	je	LBB0_3
LBB0_5:
	leaq	16(%r14), %r12
	movq	16(%r14), %rax
	movq	_SNDRV_SEQ_EVENT_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.6:
	movl	24(%r14), %ebx
	xorl	%eax, %eax
	callq	_in_atomic
	movl	%ebx, %edi
	movq	%r12, %rsi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_snd_seq_kernel_client_dispatch
	testq	%rax, %rax
	js	LBB0_19
## %bb.7:
	movq	_SNDRV_SEQ_EVENT_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
LBB0_8:
	leaq	-80(%rbp), %rsi
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movl	$32, %edx
	callq	_snd_rawmidi_transmit_peek
	testl	%eax, %eax
	jle	LBB0_19
## %bb.9:
	movl	%eax, %r13d
	leaq	-80(%rbp), %rbx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	%r15d, %eax
	addq	%rax, %rbx
	subl	%r15d, %r13d
	testl	%r13d, %r13d
	jle	LBB0_10
LBB0_11:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	movl	28(%r14), %edi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	movq	%r12, %rcx
	callq	_snd_midi_event_encode
	movl	%eax, %r15d
	testl	%eax, %eax
	jns	LBB0_14
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_11 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	28(%r14), %edi
	callq	_snd_midi_event_reset_encode
	movl	28(%r14), %edi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	movq	%r12, %rcx
	callq	_snd_midi_event_encode
	testl	%eax, %eax
	js	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	%eax, %r15d
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	callq	_snd_rawmidi_transmit_ack
	movq	(%r12), %rax
	movq	_SNDRV_SEQ_EVENT_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	24(%r14), %eax
	movl	%eax, -92(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	callq	_in_atomic
	movl	-92(%rbp), %edi                 ## 4-byte Reload
	movq	%r12, %rsi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_snd_seq_kernel_client_dispatch
	testq	%rax, %rax
	js	LBB0_19
## %bb.16:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	_SNDRV_SEQ_EVENT_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rsi
	movl	$32, %edx
	callq	_snd_rawmidi_transmit_peek
	movl	%eax, %r13d
	testl	%eax, %eax
	jg	LBB0_11
	jmp	LBB0_19
LBB0_18:
	movl	$0, (%r14)
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_21
## %bb.20:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	(%rax), %esi
	subl	4(%rax), %esi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_21
## %bb.4:
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_snd_rawmidi_transmit_ack       ## TAILCALL
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SNDRV_VIRMIDI_SEQ_DISPATCH,8,3 ## @SNDRV_VIRMIDI_SEQ_DISPATCH
	.comm	_SNDRV_VIRMIDI_SUBSCRIBE,4,2    ## @SNDRV_VIRMIDI_SUBSCRIBE
	.comm	_SNDRV_SEQ_EVENT_NONE,8,3       ## @SNDRV_SEQ_EVENT_NONE
	.no_dead_strip	_snd_virmidi_output_trigger
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_virmidi_output_trigger
_snd_virmidi_output_trigger:            ; @snd_virmidi_output_trigger
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldr	x8, [x0]
	ldr	x25, [x8, #8]
	cbz	w1, LBB0_16
; %bb.1:
	mov	x19, x0
	mov	w9, #1
	str	w9, [x25]
	ldr	x9, [x25, #8]
Lloh3:
	adrp	x10, _SNDRV_VIRMIDI_SEQ_DISPATCH@GOTPAGE
Lloh4:
	ldr	x10, [x10, _SNDRV_VIRMIDI_SEQ_DISPATCH@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_3
; %bb.2:
	ldr	x9, [x25, #32]
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _SNDRV_VIRMIDI_SUBSCRIBE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _SNDRV_VIRMIDI_SUBSCRIBE@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_19
LBB0_3:
	mov	x20, x25
	ldr	x8, [x20, #16]!
Lloh9:
	adrp	x26, _SNDRV_SEQ_EVENT_NONE@GOTPAGE
Lloh10:
	ldr	x26, [x26, _SNDRV_SEQ_EVENT_NONE@GOTPAGEOFF]
	ldr	x9, [x26]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.4:
	ldr	w21, [x25, #24]
	bl	_in_atomic
	mov	x2, x0
	mov	x0, x21
	mov	x1, x20
	mov	w3, #0
	bl	_snd_seq_kernel_client_dispatch
	tbnz	x0, #63, LBB0_17
; %bb.5:
	ldr	x8, [x26]
	str	x8, [x20]
LBB0_6:
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #32
	bl	_snd_rawmidi_transmit_peek
	cmp	w0, #1
	b.lt	LBB0_17
; %bb.7:
	mov	x22, x0
	add	x21, sp, #8
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x21, x21, w23, uxtw
	sub	w22, w22, w23
	cmp	w22, #0
	b.le	LBB0_15
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	ldr	w0, [x25, #28]
	mov	x1, x21
	mov	x2, x22
	mov	x3, x20
	bl	_snd_midi_event_encode
	mov	x23, x0
	tbz	w0, #31, LBB0_12
LBB0_10:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x25, #28]
	bl	_snd_midi_event_reset_encode
	ldr	w0, [x25, #28]
	mov	x1, x21
	mov	x2, x22
	mov	x3, x20
	bl	_snd_midi_event_encode
	tbnz	w0, #31, LBB0_10
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x23, x0
LBB0_12:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x19
	mov	x1, x23
	bl	_snd_rawmidi_transmit_ack
	ldr	x8, [x20]
	ldr	x9, [x26]
	cmp	x8, x9
	b.eq	LBB0_8
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w24, [x25, #24]
	bl	_in_atomic
	mov	x2, x0
	mov	x0, x24
	mov	x1, x20
	mov	w3, #0
	bl	_snd_seq_kernel_client_dispatch
	tbnz	x0, #63, LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x26]
	str	x8, [x20]
	b	LBB0_8
LBB0_15:                                ;   in Loop: Header=BB0_9 Depth=1
	add	x21, sp, #8
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #32
	bl	_snd_rawmidi_transmit_peek
	mov	x22, x0
	cmp	w0, #1
	b.ge	LBB0_9
	b	LBB0_17
LBB0_16:
	str	wzr, [x25]
LBB0_17:
	ldr	x8, [sp, #40]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.18:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_19:
	ldp	w9, w8, [x8]
	ldr	x10, [sp, #40]
Lloh14:
	adrp	x11, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x11, [x11, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x11, [x11]
	cmp	x11, x10
	b.ne	LBB0_21
; %bb.20:
	sub	w1, w9, w8
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_snd_rawmidi_transmit_ack
LBB0_21:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_SNDRV_VIRMIDI_SEQ_DISPATCH,8,3 ; @SNDRV_VIRMIDI_SEQ_DISPATCH
	.comm	_SNDRV_VIRMIDI_SUBSCRIBE,4,2    ; @SNDRV_VIRMIDI_SUBSCRIBE
	.comm	_SNDRV_SEQ_EVENT_NONE,8,3       ; @SNDRV_SEQ_EVENT_NONE
	.no_dead_strip	_snd_virmidi_output_trigger
.subsections_via_symbols
