	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function av_bprint_alloc
_av_bprint_alloc:                       ## @av_bprint_alloc
	.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
	movl	(%rdi), %eax
	cmpl	4(%rdi), %eax
	jne	LBB0_3
## %bb.1:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_av_bprint_is_complete
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	8(%rbx), %r15d
	movq	_UINT_MAX@GOTPCREL(%rip), %rax
	movl	%r15d, %edi
	notl	%edi
	addl	(%rax), %edi
	movl	%r14d, %esi
	callq	_FFMIN
                                        ## kill: def $eax killed $eax def $rax
	leal	(%r15,%rax), %esi
	incl	%esi
	movl	(%rbx), %eax
	movl	4(%rbx), %edi
	movl	%edi, %ecx
	shrl	$31, %ecx
	addl	%edi, %ecx
	sarl	%ecx
	leal	(%rax,%rax), %r14d
	cmpl	%ecx, %eax
	cmovgl	%edi, %r14d
	cmpl	%esi, %r14d
	jae	LBB0_7
## %bb.6:
	callq	_FFMIN
	movl	%eax, %r14d
LBB0_7:
	movq	%rbx, %rdi
	callq	_av_bprint_is_allocated
	testq	%rax, %rax
	je	LBB0_13
## %bb.8:
	movq	16(%rbx), %r12
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_av_realloc
	testq	%rax, %rax
	je	LBB0_14
## %bb.9:
	movq	%rax, %r15
	testq	%r12, %r12
	jne	LBB0_11
	jmp	LBB0_10
LBB0_4:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_12
LBB0_13:
	xorl	%edi, %edi
	movl	%r14d, %esi
	callq	_av_realloc
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_14
LBB0_10:
	movq	16(%rbx), %rsi
	movl	8(%rbx), %edx
	incl	%edx
	movq	%r15, %rdi
	callq	_memcpy
LBB0_11:
	movq	%r15, 16(%rbx)
	movl	%r14d, (%rbx)
	xorl	%eax, %eax
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_UINT_MAX,4,2                   ## @UINT_MAX
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_av_bprint_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function av_bprint_alloc
_av_bprint_alloc:                       ; @av_bprint_alloc
	.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
	ldp	w8, w9, [x0]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_14
LBB0_2:
	mov	x20, x1
	mov	x19, x0
	bl	_av_bprint_is_complete
	cbz	w0, LBB0_8
; %bb.3:
	ldr	w21, [x19, #8]
Lloh2:
	adrp	x8, _UINT_MAX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _UINT_MAX@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	mvn	w9, w21
	add	w0, w8, w9
	mov	x1, x20
	bl	_FFMIN
	add	w8, w21, w0
	add	w1, w8, #1
	ldp	w8, w0, [x19]
	cmp	w0, #0
	cinc	w9, w0, lt
	lsl	w10, w8, #1
	cmp	w8, w9, asr #1
	csel	w20, w0, w10, gt
	cmp	w20, w1
	b.hs	LBB0_5
; %bb.4:
	bl	_FFMIN
	mov	x20, x0
LBB0_5:
	mov	x0, x19
	bl	_av_bprint_is_allocated
	cbz	x0, LBB0_9
; %bb.6:
	ldr	x22, [x19, #16]
	mov	x0, x22
	mov	x1, x20
	bl	_av_realloc
	cbz	x0, LBB0_13
; %bb.7:
	mov	x21, x0
	cbnz	x22, LBB0_11
	b	LBB0_10
LBB0_8:
Lloh5:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	b	LBB0_12
LBB0_9:
	mov	x1, x20
	bl	_av_realloc
	mov	x21, x0
	cbz	x0, LBB0_13
LBB0_10:
	ldr	x1, [x19, #16]
	ldr	w8, [x19, #8]
	add	w2, w8, #1
	mov	x0, x21
	bl	_memcpy
LBB0_11:
	mov	w0, #0
	str	x21, [x19, #16]
	str	w20, [x19]
LBB0_12:
	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_13:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_14:
	ldr	w0, [x8]
	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
	b	_AVERROR
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_UINT_MAX,4,2                   ; @UINT_MAX
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_av_bprint_alloc
.subsections_via_symbols
