	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_seq_midisynth_unregister_port
_snd_seq_midisynth_unregister_port:     ## @snd_seq_midisynth_unregister_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %r12
	movslq	(%rdi), %rbx
	movq	_register_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	_synths@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r12), %rcx
	movq	(%rax,%rcx,8), %r15
	testq	%r15, %r15
	je	LBB0_2
## %bb.1:
	movq	24(%r15), %rax
	movq	(%rax,%rbx,8), %r14
	testq	%r14, %r14
	je	LBB0_2
## %bb.3:
	movq	(%r15), %rcx
	movl	(%rcx,%rbx,4), %r13d
	movl	$0, (%rcx,%rbx,4)
	movq	$0, (%rax,%rbx,8)
	testl	%r13d, %r13d
	jle	LBB0_6
## %bb.4:
	movq	%r14, %rbx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_snd_seq_midisynth_delete
	addq	$32, %rbx
	decq	%r13
	jne	LBB0_5
LBB0_6:
	movq	%r14, %rdi
	callq	_kfree
	movq	8(%r15), %rax
	leaq	-1(%rax), %rcx
	movq	%rcx, 8(%r15)
	cmpq	$1, %rax
	jg	LBB0_8
## %bb.7:
	movl	16(%r15), %edi
	callq	_snd_seq_delete_kernel_client
	movq	_synths@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r12), %rcx
	movq	$0, (%rax,%rcx,8)
	movq	%r15, %rdi
	callq	_kfree
LBB0_8:
	movq	_register_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_2:
	movq	_register_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_register_mutex,4,2             ## @register_mutex
	.comm	_synths,8,3                     ## @synths
	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_snd_seq_midisynth_unregister_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_seq_midisynth_unregister_port
_snd_seq_midisynth_unregister_port:     ; @snd_seq_midisynth_unregister_port
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x22, [x0, #8]
	ldrsw	x21, [x0]
Lloh0:
	adrp	x0, _register_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _register_mutex@GOTPAGEOFF]
	bl	_mutex_lock
Lloh2:
	adrp	x23, _synths@GOTPAGE
Lloh3:
	ldr	x23, [x23, _synths@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	x9, [x22]
	ldr	x19, [x8, x9, lsl #3]
	cbz	x19, LBB0_8
; %bb.1:
	ldr	x8, [x19, #24]
	ldr	x20, [x8, x21, lsl #3]
	cbz	x20, LBB0_8
; %bb.2:
	ldr	x9, [x19]
	lsl	x10, x21, #2
	ldr	w24, [x9, x10]
	str	wzr, [x9, x10]
	str	xzr, [x8, x21, lsl #3]
	cmp	w24, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x21, x20
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_snd_seq_midisynth_delete
	add	x21, x21, #32
	subs	x24, x24, #1
	b.ne	LBB0_4
LBB0_5:
	mov	x0, x20
	bl	_kfree
	ldr	x8, [x19, #8]
	subs	x8, x8, #1
	str	x8, [x19, #8]
	b.gt	LBB0_7
; %bb.6:
	ldr	w0, [x19, #16]
	bl	_snd_seq_delete_kernel_client
	ldr	x8, [x23]
	ldr	x9, [x22]
	str	xzr, [x8, x9, lsl #3]
	mov	x0, x19
	bl	_kfree
LBB0_7:
Lloh4:
	adrp	x0, _register_mutex@GOTPAGE
Lloh5:
	ldr	x0, [x0, _register_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_9
LBB0_8:
Lloh6:
	adrp	x0, _register_mutex@GOTPAGE
Lloh7:
	ldr	x0, [x0, _register_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_register_mutex,4,2             ; @register_mutex
	.comm	_synths,8,3                     ; @synths
	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_snd_seq_midisynth_unregister_port
.subsections_via_symbols
