	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function realloc_buffer
_realloc_buffer:                        ## @realloc_buffer
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	cmpl	$0, 8(%rdi)
	je	LBB0_1
## %bb.2:
	movl	(%rbx), %edx
	movl	4(%rbx), %ecx
	movl	%edx, %edi
	subl	%ecx, %edi
	movq	_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%eax, %eax
	cmpl	%esi, %edi
	jl	LBB0_3
	jmp	LBB0_6
LBB0_1:
	movl	(%rbx), %edx
	movl	4(%rbx), %ecx
	movq	_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_3:
	leaq	8(%rbx), %r15
	leal	(%rcx,%rsi,2), %r14d
	movl	12(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %ecx
	callq	_ff_dlog
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_av_reallocp
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jns	LBB0_5
## %bb.4:
	movl	$0, 4(%rbx)
	xorl	%r14d, %r14d
	movl	%ecx, %eax
LBB0_5:
	movl	%r14d, (%rbx)
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BUFFER_SIZE,4,2                ## @BUFFER_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"resizing output buffer: %d -> %d\n"

	.no_dead_strip	_realloc_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function realloc_buffer
_realloc_buffer:                        ; @realloc_buffer
	.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
	mov	x20, x0
	ldr	w8, [x20, #8]!
	cbz	w8, LBB0_3
; %bb.1:
	ldp	w2, w8, [x19]
Lloh0:
	adrp	x9, _BUFFER_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BUFFER_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	sub	w10, w2, w8
	cmp	w10, w9
	b.lt	LBB0_4
; %bb.2:
	mov	w0, #0
	b	LBB0_8
LBB0_3:
Lloh3:
	adrp	x8, _BUFFER_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BUFFER_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x8]
	ldp	w2, w8, [x19]
LBB0_4:
	add	w21, w8, w9, lsl #1
	ldr	w0, [x19, #12]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x21
	bl	_ff_dlog
	mov	x0, x20
	mov	x1, x21
	bl	_av_reallocp
	tbnz	w0, #31, LBB0_6
; %bb.5:
	mov	w0, #0
	b	LBB0_7
LBB0_6:
	mov	w21, #0
	str	wzr, [x19, #4]
LBB0_7:
	str	w21, [x19]
LBB0_8:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_BUFFER_SIZE,4,2                ; @BUFFER_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"resizing output buffer: %d -> %d\n"

	.no_dead_strip	_realloc_buffer
.subsections_via_symbols
