	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wavefront_synth_control
_wavefront_synth_control:               ## @wavefront_synth_control
	.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	_WF_DEBUG_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	20(%rsi), %edx
	leaq	L_.str(%rip), %rsi
	callq	_DPRINT
	movl	20(%rbx), %esi
	leal	-131(%rsi), %eax
	cmpl	$11, %eax
	ja	LBB0_17
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_14:
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_snd_printk
	jmp	LBB0_15
LBB0_16:
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	leaq	-26(%rbp), %r15
	movq	%r15, %rsi
	movl	$2, %edx
	callq	_munge_int32
	movq	8(%rbx), %rdi
	movq	%r15, %rsi
	movl	$2, %edx
	callq	_memcpy
	movl	20(%rbx), %esi
LBB0_17:
	movq	(%rbx), %rdx
	movq	8(%rbx), %rcx
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_snd_wavefront_cmd
	movl	%eax, 16(%rbx)
	xorl	%r15d, %r15d
	testl	%eax, %eax
	jne	LBB0_30
## %bb.18:
	movl	20(%rbx), %eax
	addl	$-128, %eax
	cmpl	$9, %eax
	ja	LBB0_30
## %bb.19:
	leaq	LJTI0_1(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_29:
	movq	%r14, %rdi
	callq	_snd_wavefront_midi_enable_virtual
	jmp	LBB0_30
LBB0_13:
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	callq	_wavefront_fetch_multisample
	movl	%eax, 16(%rbx)
	xorl	%r15d, %r15d
	jmp	LBB0_30
LBB0_6:
	movq	8(%rbx), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	jmp	LBB0_7
LBB0_5:
	movl	(%r14), %eax
	movq	(%rbx), %rcx
	movl	%eax, (%rcx)
	xorl	%r15d, %r15d
	jmp	LBB0_30
LBB0_8:
	movq	8(%rbx), %rax
	movl	4(%rax), %esi
	shll	$7, %esi
	orl	(%rax), %esi
	js	LBB0_10
## %bb.9:
	movq	_WF_MAX_SAMPLE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jge	LBB0_10
## %bb.11:
	movq	8(%r14), %rax
	movl	(%rax,%rsi,4), %eax
	movq	(%rbx), %rcx
	movl	%eax, (%rcx)
LBB0_7:
	movl	$0, 16(%rbx)
	xorl	%r15d, %r15d
	jmp	LBB0_30
LBB0_4:
	leaq	L_.str.2(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_snd_printk
	movl	24(%r14), %esi
	movl	$224, %edi
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_snd_printk
	movl	24(%r14), %esi
	movl	$160, %edi
LBB0_3:
	callq	_outb
	movl	$1, (%r14)
	jmp	LBB0_30
LBB0_12:
	movq	8(%rbx), %rax
	movl	(%rax), %esi
	movl	%esi, 16(%r14)
	leaq	L_.str.4(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_snd_printk
	jmp	LBB0_30
LBB0_10:
	leaq	L_.str.3(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_snd_printk
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%r15d, 16(%rbx)
	negl	%r15d
LBB0_30:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_28:
	movq	%r14, %rdi
	callq	_snd_wavefront_midi_disable_virtual
	jmp	LBB0_30
LBB0_26:
	movq	(%rbx), %rdi
	callq	_process_sample_hdr
	jmp	LBB0_30
LBB0_27:
	leaq	L_.str.6(%rip), %rdi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_snd_printk
	jmp	LBB0_30
LBB0_24:
	movq	(%rbx), %rdi
	movq	_WF_PROGRAM_BYTES@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_21:
	movq	(%rbx), %rdi
	movq	_WF_PATCH_BYTES@GOTPCREL(%rip), %rax
LBB0_22:
	movl	(%rax), %edx
	jmp	LBB0_23
LBB0_25:
	movq	(%rbx), %rdi
	movq	_WF_DRUM_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	decl	%edx
LBB0_23:
	movq	%rdi, %rsi
	callq	_demunge_buf
	jmp	LBB0_30
LBB0_20:
	movq	(%rbx), %rdi
	movl	$4, %esi
	callq	_demunge_int32
	movl	%eax, 20(%r14)
	jmp	LBB0_30
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
LJTI0_0:
	.long	L0_0_set_14
	.long	L0_0_set_17
	.long	L0_0_set_16
	.long	L0_0_set_13
	.long	L0_0_set_17
	.long	L0_0_set_6
	.long	L0_0_set_17
	.long	L0_0_set_5
	.long	L0_0_set_8
	.long	L0_0_set_4
	.long	L0_0_set_2
	.long	L0_0_set_12
.set L0_1_set_29, LBB0_29-LJTI0_1
.set L0_1_set_28, LBB0_28-LJTI0_1
.set L0_1_set_26, LBB0_26-LJTI0_1
.set L0_1_set_27, LBB0_27-LJTI0_1
.set L0_1_set_24, LBB0_24-LJTI0_1
.set L0_1_set_21, LBB0_21-LJTI0_1
.set L0_1_set_30, LBB0_30-LJTI0_1
.set L0_1_set_25, LBB0_25-LJTI0_1
.set L0_1_set_20, LBB0_20-LJTI0_1
LJTI0_1:
	.long	L0_1_set_29
	.long	L0_1_set_28
	.long	L0_1_set_26
	.long	L0_1_set_27
	.long	L0_1_set_24
	.long	L0_1_set_21
	.long	L0_1_set_30
	.long	L0_1_set_25
	.long	L0_1_set_30
	.long	L0_1_set_20
	.end_data_region
                                        ## -- End function
	.comm	_WF_DEBUG_CMD,4,2               ## @WF_DEBUG_CMD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"synth control with cmd 0x%x\n"

L_.str.1:                               ## @.str.1
	.asciz	"interrupts disabled.\n"

L_.str.2:                               ## @.str.2
	.asciz	"interrupts enabled.\n"

	.comm	_WF_MAX_SAMPLE,4,2              ## @WF_MAX_SAMPLE
L_.str.3:                               ## @.str.3
	.asciz	"invalid slot ID %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.4:                               ## @.str.4
	.asciz	"debug = 0x%x\n"

L_.str.5:                               ## @.str.5
	.asciz	"support for sample alias upload being considered.\n"

	.comm	_WF_PATCH_BYTES,4,2             ## @WF_PATCH_BYTES
	.comm	_WF_PROGRAM_BYTES,4,2           ## @WF_PROGRAM_BYTES
	.comm	_WF_DRUM_BYTES,4,2              ## @WF_DRUM_BYTES
L_.str.6:                               ## @.str.6
	.asciz	"support for sample aliases still being considered.\n"

	.no_dead_strip	_wavefront_synth_control
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wavefront_synth_control
_wavefront_synth_control:               ; @wavefront_synth_control
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _WF_DEBUG_CMD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WF_DEBUG_CMD@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w2, [x1, #20]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DPRINT
	ldr	w1, [x20, #20]
	sub	w8, w1, #131
	cmp	w8, #11
	b.hi	LBB0_4
; %bb.1:
Lloh5:
	adrp	x9, lJTI0_0@PAGE
Lloh6:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
Lloh7:
	adrp	x0, l_.str.5@PAGE
Lloh8:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_19
LBB0_3:
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	add	x1, sp, #14
	mov	w2, #2
	bl	_munge_int32
	ldr	x0, [x20, #8]
	add	x1, sp, #14
	mov	w2, #2
	bl	_memcpy
	ldr	w1, [x20, #20]
LBB0_4:
	ldp	x2, x3, [x20]
	mov	x0, x19
	bl	_snd_wavefront_cmd
	str	w0, [x20, #16]
	cbnz	w0, LBB0_28
; %bb.5:
	ldr	w8, [x20, #20]
	sub	w8, w8, #128
	cmp	w8, #9
	b.hi	LBB0_29
; %bb.6:
Lloh9:
	adrp	x9, lJTI0_1@PAGE
Lloh10:
	add	x9, x9, lJTI0_1@PAGEOFF
	adr	x10, LBB0_7
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_7:
	mov	x0, x19
	bl	_snd_wavefront_midi_enable_virtual
	b	LBB0_28
LBB0_8:
	ldr	x1, [x20]
	mov	x0, x19
	bl	_wavefront_fetch_multisample
	mov	x8, x0
	mov	w0, #0
	str	w8, [x20, #16]
	b	LBB0_29
LBB0_9:
	mov	w0, #0
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	str	w8, [x19, #4]
	str	wzr, [x20, #16]
	b	LBB0_29
LBB0_10:
	mov	w0, #0
	ldr	w8, [x19]
	ldr	x9, [x20]
	str	w8, [x9]
	b	LBB0_29
LBB0_11:
	ldr	x8, [x20, #8]
	ldp	w9, w8, [x8]
	orr	w8, w9, w8, lsl #7
	tbnz	w8, #31, LBB0_18
; %bb.12:
Lloh11:
	adrp	x9, _WF_MAX_SAMPLE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _WF_MAX_SAMPLE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_18
; %bb.13:
	mov	w0, #0
	ldr	x9, [x19, #8]
	ldr	w8, [x9, x8, lsl #2]
	ldr	x9, [x20]
	str	w8, [x9]
	str	wzr, [x20, #16]
	b	LBB0_29
LBB0_14:
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_snd_printk
	ldr	w1, [x19, #24]
	mov	w0, #224
	b	LBB0_16
LBB0_15:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_snd_printk
	ldr	w1, [x19, #24]
	mov	w0, #160
LBB0_16:
	bl	_outb
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_29
LBB0_17:
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	str	w8, [x19, #16]
	str	x8, [sp]
Lloh18:
	adrp	x0, l_.str.4@PAGE
Lloh19:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_snd_printk
	b	LBB0_28
LBB0_18:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	str	x8, [sp]
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_19:
	bl	_snd_printk
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	str	w8, [x20, #16]
	neg	w0, w8
	b	LBB0_29
LBB0_20:
	mov	x0, x19
	bl	_snd_wavefront_midi_disable_virtual
	b	LBB0_28
LBB0_21:
	ldr	x0, [x20]
	bl	_process_sample_hdr
	b	LBB0_28
LBB0_22:
Lloh25:
	adrp	x0, l_.str.6@PAGE
Lloh26:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_snd_printk
	b	LBB0_28
LBB0_23:
	ldr	x0, [x20]
Lloh27:
	adrp	x8, _WF_PROGRAM_BYTES@GOTPAGE
Lloh28:
	ldr	x8, [x8, _WF_PROGRAM_BYTES@GOTPAGEOFF]
	b	LBB0_25
LBB0_24:
	ldr	x0, [x20]
Lloh29:
	adrp	x8, _WF_PATCH_BYTES@GOTPAGE
Lloh30:
	ldr	x8, [x8, _WF_PATCH_BYTES@GOTPAGEOFF]
LBB0_25:
	ldr	w2, [x8]
	b	LBB0_27
LBB0_26:
	ldr	x0, [x20]
Lloh31:
	adrp	x8, _WF_DRUM_BYTES@GOTPAGE
Lloh32:
	ldr	x8, [x8, _WF_DRUM_BYTES@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	sub	w2, w8, #1
LBB0_27:
	mov	x1, x0
	bl	_demunge_buf
LBB0_28:
	mov	w0, #0
LBB0_29:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_30:
	ldr	x0, [x20]
	mov	w1, #4
	bl	_demunge_int32
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19, #20]
	b	LBB0_29
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
	.byte	(LBB0_15-LBB0_2)>>2
	.byte	(LBB0_17-LBB0_2)>>2
lJTI0_1:
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_20-LBB0_7)>>2
	.byte	(LBB0_21-LBB0_7)>>2
	.byte	(LBB0_22-LBB0_7)>>2
	.byte	(LBB0_23-LBB0_7)>>2
	.byte	(LBB0_24-LBB0_7)>>2
	.byte	(LBB0_29-LBB0_7)>>2
	.byte	(LBB0_26-LBB0_7)>>2
	.byte	(LBB0_29-LBB0_7)>>2
	.byte	(LBB0_30-LBB0_7)>>2
                                        ; -- End function
	.comm	_WF_DEBUG_CMD,4,2               ; @WF_DEBUG_CMD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"synth control with cmd 0x%x\n"

l_.str.1:                               ; @.str.1
	.asciz	"interrupts disabled.\n"

l_.str.2:                               ; @.str.2
	.asciz	"interrupts enabled.\n"

	.comm	_WF_MAX_SAMPLE,4,2              ; @WF_MAX_SAMPLE
l_.str.3:                               ; @.str.3
	.asciz	"invalid slot ID %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.4:                               ; @.str.4
	.asciz	"debug = 0x%x\n"

l_.str.5:                               ; @.str.5
	.asciz	"support for sample alias upload being considered.\n"

	.comm	_WF_PATCH_BYTES,4,2             ; @WF_PATCH_BYTES
	.comm	_WF_PROGRAM_BYTES,4,2           ; @WF_PROGRAM_BYTES
	.comm	_WF_DRUM_BYTES,4,2              ; @WF_DRUM_BYTES
l_.str.6:                               ; @.str.6
	.asciz	"support for sample aliases still being considered.\n"

	.no_dead_strip	_wavefront_synth_control
.subsections_via_symbols
