	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_emux_reset_port            ## -- Begin function snd_emux_reset_port
	.p2align	4, 0x90
_snd_emux_reset_port:                   ## @snd_emux_reset_port
	.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
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	callq	_snd_emux_sounds_off_all
	leaq	16(%rbx), %rdi
	callq	_snd_midi_channel_set_clear
	movq	(%rbx), %rax
	movq	_EMUX_MD_DEF_BANK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	$0, (%rax,%rcx,4)
	movq	_EMUX_MD_DEF_DRUM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	$0, (%rax,%rcx,4)
	movq	_EMUX_MD_REALTIME_PAN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	$1, (%rax,%rcx,4)
	movl	16(%rbx), %r8d
	testl	%r8d, %r8d
	jle	LBB0_7
## %bb.1:
	movq	24(%rbx), %rax
	movl	8(%rbx), %ecx
	leaq	-1(%r8), %rsi
	movl	%r8d, %edx
	andl	$3, %edx
	cmpq	$3, %rsi
	jae	LBB0_3
## %bb.2:
	xorl	%esi, %esi
	jmp	LBB0_5
LBB0_3:
	andl	$-4, %r8d
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%ebx, %ebx
	btl	%esi, %ecx
	setb	%bl
	movl	%ebx, (%rax,%rsi,4)
	leal	1(%rsi), %ebx
	movzbl	%bl, %ebx
	xorl	%edi, %edi
	btl	%ebx, %ecx
	setb	%dil
	movl	%edi, 4(%rax,%rsi,4)
	leal	2(%rsi), %edi
	movzbl	%dil, %edi
	xorl	%ebx, %ebx
	btl	%edi, %ecx
	setb	%bl
	movl	%ebx, 8(%rax,%rsi,4)
	leal	3(%rsi), %edi
	movzbl	%dil, %edi
	xorl	%ebx, %ebx
	btl	%edi, %ecx
	setb	%bl
	movl	%ebx, 12(%rax,%rsi,4)
	addq	$4, %rsi
	cmpq	%r8, %rsi
	jne	LBB0_4
LBB0_5:
	testq	%rdx, %rdx
	je	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%edi, %edi
	btl	%esi, %ecx
	setb	%dil
	movl	%edi, (%rax,%rsi,4)
	incq	%rsi
	decq	%rdx
	jne	LBB0_6
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EMUX_MD_DEF_BANK,8,3           ## @EMUX_MD_DEF_BANK
	.comm	_EMUX_MD_DEF_DRUM,8,3           ## @EMUX_MD_DEF_DRUM
	.comm	_EMUX_MD_REALTIME_PAN,8,3       ## @EMUX_MD_REALTIME_PAN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function snd_emux_reset_port
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_snd_emux_reset_port
	.p2align	2
_snd_emux_reset_port:                   ; @snd_emux_reset_port
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_snd_emux_sounds_off_all
	add	x0, x19, #16
	bl	_snd_midi_channel_set_clear
Lloh0:
	adrp	x8, _EMUX_MD_DEF_BANK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EMUX_MD_DEF_BANK@GOTPAGEOFF]
	ldr	x9, [x19]
Lloh2:
	ldr	x8, [x8]
	str	wzr, [x9, x8, lsl #2]
Lloh3:
	adrp	x8, _EMUX_MD_DEF_DRUM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EMUX_MD_DEF_DRUM@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	wzr, [x9, x8, lsl #2]
Lloh6:
	adrp	x8, _EMUX_MD_REALTIME_PAN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EMUX_MD_REALTIME_PAN@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	mov	w10, #1
	str	w10, [x9, x8, lsl #2]
	ldr	w8, [x19, #16]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	ldr	x9, [x19, #24]
	ldr	w10, [x19, #8]
	cmp	w8, #16
	b.hs	LBB0_3
; %bb.2:
	mov	x11, #0
	b	LBB0_6
LBB0_3:
	and	x11, x8, #0xfffffff0
	dup.4s	v0, w10
Lloh9:
	adrp	x12, lCPI0_0@PAGE
Lloh10:
	ldr	q1, [x12, lCPI0_0@PAGEOFF]
	add	x12, x9, #32
	mvni.4s	v2, #3
	mvni.4s	v3, #7
	mvni.4s	v4, #11
	movi.4s	v5, #1
	movi.4s	v6, #16
	mov	x13, x11
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	neg.4s	v7, v1
	ushl.4s	v7, v0, v7
	sub.4s	v16, v2, v1
	ushl.4s	v16, v0, v16
	sub.4s	v17, v3, v1
	ushl.4s	v17, v0, v17
	sub.4s	v18, v4, v1
	ushl.4s	v18, v0, v18
	and.16b	v7, v7, v5
	and.16b	v16, v16, v5
	and.16b	v17, v17, v5
	and.16b	v18, v18, v5
	stp	q7, q16, [x12, #-32]
	stp	q17, q18, [x12], #64
	add.4s	v1, v1, v6
	subs	x13, x13, #16
	b.ne	LBB0_4
; %bb.5:
	cmp	x11, x8
	b.eq	LBB0_7
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	lsr	w12, w10, w11
	and	w12, w12, #0x1
	str	w12, [x9, x11, lsl #2]
	add	x11, x11, #1
	cmp	x8, x11
	b.ne	LBB0_6
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdr	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EMUX_MD_DEF_BANK,8,3           ; @EMUX_MD_DEF_BANK
	.comm	_EMUX_MD_DEF_DRUM,8,3           ; @EMUX_MD_DEF_DRUM
	.comm	_EMUX_MD_REALTIME_PAN,8,3       ; @EMUX_MD_REALTIME_PAN
.subsections_via_symbols
