	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_bprint_finalize             ## -- Begin function av_bprint_finalize
	.p2align	4, 0x90
_av_bprint_finalize:                    ## @av_bprint_finalize
	.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, %r15
	movq	%rdi, %rbx
	movq	16(%rdi), %rdi
	incq	%rdi
	movl	(%rbx), %esi
	callq	_FFMIN
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_av_bprint_is_allocated
	testq	%r15, %r15
	je	LBB0_5
## %bb.1:
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	8(%rbx), %rdi
	movl	%r14d, %esi
	callq	_av_realloc
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	8(%rbx), %rax
LBB0_4:
	movq	$0, 8(%rbx)
	xorl	%r12d, %r12d
LBB0_10:
	movq	%rax, (%r15)
	jmp	LBB0_11
LBB0_5:
	xorl	%r12d, %r12d
	testq	%rax, %rax
	je	LBB0_11
## %bb.6:
	leaq	8(%rbx), %rdi
	callq	_av_freep
	jmp	LBB0_11
LBB0_7:
	movl	%r14d, %edi
	callq	_av_malloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%rax, %r13
	movq	8(%rbx), %rsi
	movq	%rax, %rdi
	movl	%r14d, %edx
	callq	_memcpy
	xorl	%r12d, %r12d
	movq	%r13, (%r15)
LBB0_11:
	movl	%r14d, (%rbx)
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r12d
	xorl	%eax, %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_bprint_finalize             ; -- Begin function av_bprint_finalize
	.p2align	2
_av_bprint_finalize:                    ; @av_bprint_finalize
	.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	x21, x1
	mov	x19, x0
	ldr	x8, [x0, #16]
	add	x0, x8, #1
	ldr	w1, [x19]
	bl	_FFMIN
	mov	x20, x0
	mov	x0, x19
	bl	_av_bprint_is_allocated
	cbz	x21, LBB0_5
; %bb.1:
	cbz	x0, LBB0_7
; %bb.2:
	ldr	x0, [x19, #8]
	mov	x1, x20
	bl	_av_realloc
	mov	x8, x0
	cbnz	x0, LBB0_4
; %bb.3:
	ldr	x8, [x19, #8]
LBB0_4:
	mov	w0, #0
	str	xzr, [x19, #8]
	str	x8, [x21]
	b	LBB0_10
LBB0_5:
	cbz	x0, LBB0_10
; %bb.6:
	add	x0, x19, #8
	bl	_av_freep
	mov	w0, #0
	b	LBB0_10
LBB0_7:
	mov	x0, x20
	bl	_av_malloc
	cbz	x0, LBB0_9
; %bb.8:
	mov	x22, x0
	ldr	x1, [x19, #8]
	mov	x2, x20
	bl	_memcpy
	mov	w0, #0
	str	x22, [x21]
	b	LBB0_10
LBB0_9:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_AVERROR
	str	xzr, [x21]
LBB0_10:
	str	w20, [x19]
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
