	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function id3_metadata_append
_id3_metadata_append:                   ## @id3_metadata_append
	.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	%rsi, %rbx
	movq	%rdi, %r14
	movl	(%rdi), %eax
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movq	8(%r14), %rsi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, %edi
	movq	(%rsi,%rdi,8), %rdi
	cmpq	%rbx, (%rdi)
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%ecx
	cmpl	%ecx, %eax
	jne	LBB0_2
	jmp	LBB0_7
LBB0_4:
	xorl	%ecx, %ecx
LBB0_5:
	cmpl	%eax, %ecx
	jb	LBB0_12
LBB0_7:
	movl	%edx, %edi
	movl	$512, %esi                      ## imm = 0x200
	callq	_MIN
	movl	%eax, %r12d
	leal	24(%r12), %r13d
	movl	%r13d, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.8:
	movq	%rax, %r15
	movq	8(%r14), %rdi
	movl	(%r14), %eax
	leal	8(,%rax,8), %esi
	callq	_realloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movq	%rax, 8(%r14)
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%r13d, %edx
	callq	_memset
	movq	8(%r14), %rax
	movl	(%r14), %ecx
	movq	%r15, (%rax,%rcx,8)
	movq	%rbx, (%r15)
	movq	%r15, %rax
	addq	$24, %rax
	movq	%rax, 8(%r15)
	movl	%r12d, 16(%r15)
	leal	1(%rcx), %eax
	movl	%eax, (%r14)
	jmp	LBB0_13
LBB0_11:
	movq	%r15, %rdi
	callq	_free
LBB0_12:
	xorl	%r15d, %r15d
LBB0_13:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_id3_metadata_append
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function id3_metadata_append
_id3_metadata_append:                   ; @id3_metadata_append
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_4
; %bb.1:
	mov	w9, #0
	ldr	x10, [x19, #8]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10, w9, uxtw #3]
	ldr	x11, [x11]
	cmp	x11, x20
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w9, w9, #1
	cmp	w8, w9
	b.ne	LBB0_2
	b	LBB0_6
LBB0_4:
	mov	w9, #0
LBB0_5:
	cmp	w9, w8
	b.lo	LBB0_10
LBB0_6:
	mov	x0, x2
	mov	w1, #512
	bl	_MIN
	mov	x22, x0
	add	w23, w0, #24
	mov	x0, x23
	bl	_malloc
	mov	x21, x0
	cbz	x0, LBB0_11
; %bb.7:
	ldr	x0, [x19, #8]
	ldr	w8, [x19]
	lsl	w8, w8, #3
	add	w1, w8, #8
	bl	_realloc
	cbz	x0, LBB0_9
; %bb.8:
	str	x0, [x19, #8]
	mov	x0, x21
	mov	w1, #0
	mov	x2, x23
	bl	_memset
	ldr	x8, [x19, #8]
	ldr	w9, [x19]
	str	x21, [x8, x9, lsl #3]
	add	x8, x21, #24
	stp	x20, x8, [x21]
	str	w22, [x21, #16]
	add	w8, w9, #1
	str	w8, [x19]
	b	LBB0_11
LBB0_9:
	mov	x0, x21
	bl	_free
LBB0_10:
	mov	x21, #0
LBB0_11:
	mov	x0, x21
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_id3_metadata_append
.subsections_via_symbols
