	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alsa_midi_write
_alsa_midi_write:                       ## @alsa_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	%rbx
	subq	$88, %rsp
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_alsa_midi_ev_map@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rsi), %r8
	movl	(%r8), %ecx
	shrq	%rcx
	andl	$56, %ecx
	movq	(%rax,%rcx), %rdx
	movq	_SND_SEQ_TIME_STAMP_REAL@GOTPCREL(%rip), %rax
	movq	_SND_SEQ_TIME_MODE_ABS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	orl	(%rax), %r9d
	movq	%rdx, -96(%rbp)
	movl	%r9d, -88(%rbp)
	movl	24(%rdi), %eax
	movl	%eax, -16(%rbp)
	movslq	8(%rsi), %rax
	imulq	$1125899907, %rax, %rdi         ## imm = 0x431BDE83
	movq	%rdi, %rcx
	shrq	$63, %rcx
	sarq	$50, %rdi
	addl	%ecx, %edi
	movslq	%edi, %rcx
	movq	8(%rbx), %rdi
	addq	%rcx, %rdi
	movq	%rdi, -72(%rbp)
	imull	$1000000, %ecx, %ecx            ## imm = 0xF4240
	subl	%ecx, %eax
	imull	$1000, %eax, %eax               ## imm = 0x3E8
	addl	(%rbx), %eax
	movl	%eax, -80(%rbp)
	cmpl	$1000000000, %eax               ## imm = 0x3B9ACA00
	jl	LBB0_2
## %bb.1:
	incq	%rdi
	movq	%rdi, -72(%rbp)
	addl	$-1000000000, %eax              ## imm = 0xC4653600
	movl	%eax, -80(%rbp)
LBB0_2:
	movl	20(%rbx), %eax
	movl	%eax, -20(%rbp)
	movq	_SND_SEQ_ADDRESS_SUBSCRIBERS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	movq	_SND_SEQ_EVENT_NOTEOFF@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_5
## %bb.3:
	movq	_SND_SEQ_EVENT_NOTEON@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_5
## %bb.4:
	movq	_SND_SEQ_EVENT_KEYPRESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_5
## %bb.6:
	movq	_SND_SEQ_EVENT_CONTROLLER@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_8
## %bb.7:
	movl	(%r8), %eax
	andl	$15, %eax
	movl	%eax, -48(%rbp)
	movl	4(%r8), %eax
	movl	%eax, -44(%rbp)
	movl	8(%r8), %eax
	movl	%eax, -40(%rbp)
	jmp	LBB0_15
LBB0_5:
	movl	(%r8), %eax
	andl	$15, %eax
	movl	%eax, -36(%rbp)
	movl	4(%r8), %eax
	movl	%eax, -32(%rbp)
	movl	8(%r8), %eax
	movl	%eax, -28(%rbp)
	jmp	LBB0_15
LBB0_8:
	movq	_SND_SEQ_EVENT_PGMCHANGE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_10
## %bb.9:
	movq	_SND_SEQ_EVENT_CHANPRESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_10
## %bb.11:
	movq	_SND_SEQ_EVENT_PITCHBEND@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_13
## %bb.12:
	movl	(%r8), %eax
	andl	$15, %eax
	movl	%eax, -48(%rbp)
	movl	8(%r8), %eax
	shll	$7, %eax
	orl	4(%r8), %eax
	addl	$-8192, %eax                    ## imm = 0xE000
	movl	%eax, -40(%rbp)
	jmp	LBB0_15
LBB0_10:
	movl	(%r8), %eax
	andl	$15, %eax
	movl	%eax, -48(%rbp)
	movl	4(%r8), %eax
	movl	%eax, -40(%rbp)
	jmp	LBB0_15
LBB0_13:
	movq	_SND_SEQ_EVENT_SYSEX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_15
## %bb.14:
	movq	_SND_SEQ_EVENT_LENGTH_VARIABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %r9d
	movl	%r9d, -88(%rbp)
	movq	%r8, -64(%rbp)
	movl	12(%rsi), %eax
	movl	%eax, -56(%rbp)
LBB0_15:
	movl	16(%rbx), %edi
	leaq	-96(%rbp), %rsi
	callq	_snd_seq_event_output
	movq	-72(%rbp), %rcx
	movq	%rcx, 8(%rbx)
	movl	-80(%rbp), %ecx
	movl	%ecx, (%rbx)
	notl	%eax
	shrl	$31, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_alsa_midi_ev_map,8,3           ## @alsa_midi_ev_map
	.comm	_SND_SEQ_TIME_STAMP_REAL,4,2    ## @SND_SEQ_TIME_STAMP_REAL
	.comm	_SND_SEQ_TIME_MODE_ABS,4,2      ## @SND_SEQ_TIME_MODE_ABS
	.comm	_SND_SEQ_ADDRESS_SUBSCRIBERS,4,2 ## @SND_SEQ_ADDRESS_SUBSCRIBERS
	.comm	_SND_SEQ_EVENT_NOTEOFF,8,3      ## @SND_SEQ_EVENT_NOTEOFF
	.comm	_SND_SEQ_EVENT_NOTEON,8,3       ## @SND_SEQ_EVENT_NOTEON
	.comm	_SND_SEQ_EVENT_KEYPRESS,8,3     ## @SND_SEQ_EVENT_KEYPRESS
	.comm	_SND_SEQ_EVENT_CONTROLLER,8,3   ## @SND_SEQ_EVENT_CONTROLLER
	.comm	_SND_SEQ_EVENT_PGMCHANGE,8,3    ## @SND_SEQ_EVENT_PGMCHANGE
	.comm	_SND_SEQ_EVENT_CHANPRESS,8,3    ## @SND_SEQ_EVENT_CHANPRESS
	.comm	_SND_SEQ_EVENT_PITCHBEND,8,3    ## @SND_SEQ_EVENT_PITCHBEND
	.comm	_SND_SEQ_EVENT_SYSEX,8,3        ## @SND_SEQ_EVENT_SYSEX
	.comm	_SND_SEQ_EVENT_LENGTH_VARIABLE,4,2 ## @SND_SEQ_EVENT_LENGTH_VARIABLE
	.no_dead_strip	_alsa_midi_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alsa_midi_write
_alsa_midi_write:                       ; @alsa_midi_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	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
	mov	x19, x0
Lloh0:
	adrp	x8, _alsa_midi_ev_map@GOTPAGE
Lloh1:
	ldr	x8, [x8, _alsa_midi_ev_map@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
	ldr	x8, [x1]
	ldr	w10, [x8]
	ubfx	x10, x10, #4, #3
	ldr	x9, [x9, x10, lsl #3]
	str	x9, [sp, #8]
Lloh3:
	adrp	x10, _SND_SEQ_TIME_STAMP_REAL@GOTPAGE
Lloh4:
	ldr	x10, [x10, _SND_SEQ_TIME_STAMP_REAL@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
Lloh6:
	adrp	x11, _SND_SEQ_TIME_MODE_ABS@GOTPAGE
Lloh7:
	ldr	x11, [x11, _SND_SEQ_TIME_MODE_ABS@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	orr	w10, w11, w10
	ldr	w11, [x0, #24]
	str	w11, [sp, #88]
	ldr	x11, [x0, #8]
	ldr	w12, [x1, #8]
	mov	w13, #56963
	movk	w13, #17179, lsl #16
	smull	x13, w12, w13
	lsr	x14, x13, #63
	asr	x13, x13, #50
	add	w13, w13, w14
	add	x11, x11, w13, sxtw
	str	x11, [sp, #32]
	ldr	w14, [x0]
	mov	w15, #16960
	movk	w15, #15, lsl #16
	msub	w12, w13, w15, w12
	mov	w13, #1000
	madd	w12, w12, w13, w14
	str	w10, [sp, #16]
	str	w12, [sp, #24]
	mov	w13, #51712
	movk	w13, #15258, lsl #16
	cmp	w12, w13
	b.lt	LBB0_2
; %bb.1:
	add	x11, x11, #1
	str	x11, [sp, #32]
	mov	w11, #13824
	movk	w11, #50277, lsl #16
	add	w11, w12, w11
	str	w11, [sp, #24]
LBB0_2:
	ldr	w11, [x19, #20]
Lloh9:
	adrp	x12, _SND_SEQ_ADDRESS_SUBSCRIBERS@GOTPAGE
Lloh10:
	ldr	x12, [x12, _SND_SEQ_ADDRESS_SUBSCRIBERS@GOTPAGEOFF]
Lloh11:
	ldr	w12, [x12]
	stp	w12, w11, [sp, #80]
Lloh12:
	adrp	x11, _SND_SEQ_EVENT_NOTEOFF@GOTPAGE
Lloh13:
	ldr	x11, [x11, _SND_SEQ_EVENT_NOTEOFF@GOTPAGEOFF]
Lloh14:
	ldr	x11, [x11]
Lloh15:
	adrp	x12, _SND_SEQ_EVENT_NOTEON@GOTPAGE
Lloh16:
	ldr	x12, [x12, _SND_SEQ_EVENT_NOTEON@GOTPAGEOFF]
Lloh17:
	ldr	x12, [x12]
Lloh18:
	adrp	x13, _SND_SEQ_EVENT_KEYPRESS@GOTPAGE
Lloh19:
	ldr	x13, [x13, _SND_SEQ_EVENT_KEYPRESS@GOTPAGEOFF]
Lloh20:
	ldr	x13, [x13]
	cmp	x9, x11
	ccmp	x9, x12, #4, ne
	ccmp	x9, x13, #4, ne
	b.ne	LBB0_4
; %bb.3:
	ldr	w9, [x8]
	and	w9, w9, #0xf
	str	w9, [sp, #68]
	ldr	w9, [x8, #4]
	str	w9, [sp, #72]
	ldr	w8, [x8, #8]
	str	w8, [sp, #76]
	b	LBB0_13
LBB0_4:
Lloh21:
	adrp	x11, _SND_SEQ_EVENT_CONTROLLER@GOTPAGE
Lloh22:
	ldr	x11, [x11, _SND_SEQ_EVENT_CONTROLLER@GOTPAGEOFF]
Lloh23:
	ldr	x11, [x11]
	cmp	x9, x11
	b.ne	LBB0_6
; %bb.5:
	ldr	w9, [x8]
	and	w9, w9, #0xf
	str	w9, [sp, #56]
	ldr	w9, [x8, #4]
	str	w9, [sp, #60]
	ldr	w8, [x8, #8]
	str	w8, [sp, #64]
	b	LBB0_13
LBB0_6:
Lloh24:
	adrp	x11, _SND_SEQ_EVENT_PGMCHANGE@GOTPAGE
Lloh25:
	ldr	x11, [x11, _SND_SEQ_EVENT_PGMCHANGE@GOTPAGEOFF]
Lloh26:
	ldr	x11, [x11]
	cmp	x9, x11
	b.eq	LBB0_10
; %bb.7:
Lloh27:
	adrp	x11, _SND_SEQ_EVENT_CHANPRESS@GOTPAGE
Lloh28:
	ldr	x11, [x11, _SND_SEQ_EVENT_CHANPRESS@GOTPAGEOFF]
Lloh29:
	ldr	x11, [x11]
	cmp	x9, x11
	b.eq	LBB0_10
; %bb.8:
Lloh30:
	adrp	x11, _SND_SEQ_EVENT_PITCHBEND@GOTPAGE
Lloh31:
	ldr	x11, [x11, _SND_SEQ_EVENT_PITCHBEND@GOTPAGEOFF]
Lloh32:
	ldr	x11, [x11]
	cmp	x9, x11
	b.ne	LBB0_11
; %bb.9:
	ldr	w9, [x8]
	and	w9, w9, #0xf
	str	w9, [sp, #56]
	ldp	w9, w8, [x8, #4]
	orr	w8, w9, w8, lsl #7
	sub	w8, w8, #2, lsl #12             ; =8192
	str	w8, [sp, #64]
	b	LBB0_13
LBB0_10:
	ldr	w9, [x8]
	and	w9, w9, #0xf
	str	w9, [sp, #56]
	ldr	w8, [x8, #4]
	str	w8, [sp, #64]
	b	LBB0_13
LBB0_11:
Lloh33:
	adrp	x11, _SND_SEQ_EVENT_SYSEX@GOTPAGE
Lloh34:
	ldr	x11, [x11, _SND_SEQ_EVENT_SYSEX@GOTPAGEOFF]
Lloh35:
	ldr	x11, [x11]
	cmp	x9, x11
	b.ne	LBB0_13
; %bb.12:
Lloh36:
	adrp	x9, _SND_SEQ_EVENT_LENGTH_VARIABLE@GOTPAGE
Lloh37:
	ldr	x9, [x9, _SND_SEQ_EVENT_LENGTH_VARIABLE@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	orr	w9, w9, w10
	str	w9, [sp, #16]
	str	x8, [sp, #40]
	ldr	w8, [x1, #12]
	str	w8, [sp, #48]
LBB0_13:
	ldr	w0, [x19, #16]
	add	x1, sp, #8
	bl	_snd_seq_event_output
	ldr	x8, [sp, #32]
	str	x8, [x19, #8]
	ldr	w8, [sp, #24]
	str	w8, [x19]
	mvn	w8, w0
	lsr	w0, w8, #31
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_alsa_midi_ev_map,8,3           ; @alsa_midi_ev_map
	.comm	_SND_SEQ_TIME_STAMP_REAL,4,2    ; @SND_SEQ_TIME_STAMP_REAL
	.comm	_SND_SEQ_TIME_MODE_ABS,4,2      ; @SND_SEQ_TIME_MODE_ABS
	.comm	_SND_SEQ_ADDRESS_SUBSCRIBERS,4,2 ; @SND_SEQ_ADDRESS_SUBSCRIBERS
	.comm	_SND_SEQ_EVENT_NOTEOFF,8,3      ; @SND_SEQ_EVENT_NOTEOFF
	.comm	_SND_SEQ_EVENT_NOTEON,8,3       ; @SND_SEQ_EVENT_NOTEON
	.comm	_SND_SEQ_EVENT_KEYPRESS,8,3     ; @SND_SEQ_EVENT_KEYPRESS
	.comm	_SND_SEQ_EVENT_CONTROLLER,8,3   ; @SND_SEQ_EVENT_CONTROLLER
	.comm	_SND_SEQ_EVENT_PGMCHANGE,8,3    ; @SND_SEQ_EVENT_PGMCHANGE
	.comm	_SND_SEQ_EVENT_CHANPRESS,8,3    ; @SND_SEQ_EVENT_CHANPRESS
	.comm	_SND_SEQ_EVENT_PITCHBEND,8,3    ; @SND_SEQ_EVENT_PITCHBEND
	.comm	_SND_SEQ_EVENT_SYSEX,8,3        ; @SND_SEQ_EVENT_SYSEX
	.comm	_SND_SEQ_EVENT_LENGTH_VARIABLE,4,2 ; @SND_SEQ_EVENT_LENGTH_VARIABLE
	.no_dead_strip	_alsa_midi_write
.subsections_via_symbols
