	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wavefront_send_drum
_wavefront_send_drum:                   ## @wavefront_send_drum
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_WF_DRUM_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	_WF_DEBUG_LOAD_PATCH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %edx
	movl	4(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	callq	_DPRINT
	movb	(%rbx), %al
	andb	$127, %al
	movb	%al, (%r15)
	movzbl	4(%rbx), %edi
	leaq	1(%r15), %rsi
	movl	$2, %edx
	callq	_munge_int32
	movzbl	5(%rbx), %edi
	leaq	3(%r15), %rsi
	movl	$2, %edx
	callq	_munge_int32
	movzbl	6(%rbx), %edi
	leaq	5(%r15), %rsi
	movl	$2, %edx
	callq	_munge_int32
	movzbl	7(%rbx), %edi
	leaq	7(%r15), %rsi
	movl	$2, %edx
	callq	_munge_int32
	movq	_WFC_DOWNLOAD_EDRUM_PROGRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%edx, %edx
	movq	%r15, %rcx
	callq	_snd_wavefront_cmd
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	callq	_snd_printk
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_4
## %bb.3:
	movl	%ebx, %eax
	leaq	-24(%rbp), %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_WF_DRUM_BYTES,4,2              ## @WF_DRUM_BYTES
	.comm	_WF_DEBUG_LOAD_PATCH,4,2        ## @WF_DEBUG_LOAD_PATCH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"downloading edrum for MIDI note %d, patch = %d\n"

	.comm	_WFC_DOWNLOAD_EDRUM_PROGRAM,4,2 ## @WFC_DOWNLOAD_EDRUM_PROGRAM
L_.str.1:                               ## @.str.1
	.asciz	"download drum failed.\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_wavefront_send_drum
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wavefront_send_drum
_wavefront_send_drum:                   ; @wavefront_send_drum
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sub	sp, sp, #16
	mov	x20, x1
	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]
Lloh3:
	adrp	x8, _WF_DRUM_BYTES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WF_DRUM_BYTES@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x21, x9, x8
	mov	sp, x21
Lloh8:
	adrp	x8, _WF_DEBUG_LOAD_PATCH@GOTPAGE
Lloh9:
	ldr	x8, [x8, _WF_DEBUG_LOAD_PATCH@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldp	w2, w3, [x1]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DPRINT
	ldrb	w8, [x20]
	and	w8, w8, #0x7f
	mov	x22, x21
	strb	w8, [x22], #7
	ldrb	w0, [x20, #4]
	add	x1, x21, #1
	mov	w2, #2
	bl	_munge_int32
	ldrb	w0, [x20, #5]
	add	x1, x21, #3
	mov	w2, #2
	bl	_munge_int32
	ldrb	w0, [x20, #6]
	add	x1, x21, #5
	mov	w2, #2
	bl	_munge_int32
	ldrb	w0, [x20, #7]
	mov	x1, x22
	mov	w2, #2
	bl	_munge_int32
Lloh13:
	adrp	x8, _WFC_DOWNLOAD_EDRUM_PROGRAM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _WFC_DOWNLOAD_EDRUM_PROGRAM@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	mov	x3, x21
	bl	_snd_wavefront_cmd
	cbz	x0, LBB0_2
; %bb.1:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_snd_printk
Lloh18:
	adrp	x8, _EIO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_2:
	ldur	x8, [x29, #-40]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	sub	sp, x29, #32
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_WF_DRUM_BYTES,4,2              ; @WF_DRUM_BYTES
	.comm	_WF_DEBUG_LOAD_PATCH,4,2        ; @WF_DEBUG_LOAD_PATCH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"downloading edrum for MIDI note %d, patch = %d\n"

	.comm	_WFC_DOWNLOAD_EDRUM_PROGRAM,4,2 ; @WFC_DOWNLOAD_EDRUM_PROGRAM
l_.str.1:                               ; @.str.1
	.asciz	"download drum failed.\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_wavefront_send_drum
.subsections_via_symbols
