	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_soundfont_remove_unlocked  ## -- Begin function snd_soundfont_remove_unlocked
	.p2align	4, 0x90
_snd_soundfont_remove_unlocked:         ## @snd_soundfont_remove_unlocked
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_lock_preset
	movq	56(%r14), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	40(%r14), %edi
	callq	*%rax
LBB0_2:
	movl	80(%r14), %edi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	72(%r14), %r15
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%r15), %r15
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
                                        ##     Child Loop BB0_8 Depth 2
	testq	%r15, %r15
	je	LBB0_13
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rdi), %rax
	cmpq	(%r14), %rax
	jl	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	16(%rdi), %rbx
	movq	%rbx, 8(%r15)
	callq	_kfree
	movq	%rbx, %rdi
	testq	%rbx, %rbx
	jne	LBB0_5
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r15), %rbx
	testq	%rbx, %rbx
	jne	LBB0_8
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=2
	movq	%rbx, %rdi
	callq	_kfree
	movq	%r12, %rbx
	testq	%r12, %r12
	je	LBB0_12
LBB0_8:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rbx), %rax
	cmpq	8(%r14), %rax
	jl	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	movq	16(%rbx), %r12
	movq	%r12, (%r15)
	movl	8(%rbx), %eax
	subl	%eax, 64(%r14)
	movq	48(%r14), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=2
	movl	32(%r14), %edx
	movl	40(%r14), %edi
	movq	%rbx, %rsi
	callq	*%rax
	jmp	LBB0_11
LBB0_13:
	movups	(%r14), %xmm0
	movups	%xmm0, 16(%r14)
	movq	%r14, %rdi
	callq	_rebuild_presets
	movq	%r14, %rdi
	callq	_unlock_preset
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_soundfont_remove_unlocked  ; -- Begin function snd_soundfont_remove_unlocked
	.p2align	2
_snd_soundfont_remove_unlocked:         ; @snd_soundfont_remove_unlocked
	.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
	mov	x19, x0
	bl	_lock_preset
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [x19, #40]
	blr	x8
LBB0_2:
	ldr	w0, [x19, #80]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	x21, [x19, #72]
	cbnz	x21, LBB0_5
LBB0_3:
	ldr	q0, [x19]
	str	q0, [x19, #16]
	mov	x0, x19
	bl	_rebuild_presets
	mov	x0, x19
	bl	_unlock_preset
	mov	w0, #0
	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:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x21, [x21, #16]
	cbz	x21, LBB0_3
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;     Child Loop BB0_10 Depth 2
	ldr	x0, [x21, #8]
	cbz	x0, LBB0_8
LBB0_6:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x0]
	ldr	x9, [x19]
	cmp	x8, x9
	b.lt	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x20, [x0, #16]
	str	x20, [x21, #8]
	bl	_kfree
	mov	x0, x20
	cbnz	x20, LBB0_6
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x20, [x21]
	cbnz	x20, LBB0_10
	b	LBB0_4
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	mov	x0, x20
	bl	_kfree
	mov	x20, x22
	cbz	x22, LBB0_4
LBB0_10:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x20]
	ldr	x9, [x19, #8]
	cmp	x8, x9
	b.lt	LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	x22, [x20, #16]
	str	x22, [x21]
	ldr	w8, [x20, #8]
	ldr	w9, [x19, #64]
	sub	w8, w9, w8
	str	w8, [x19, #64]
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w0, [x19, #40]
	ldr	w2, [x19, #32]
	mov	x1, x20
	blr	x8
	b	LBB0_9
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
