	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_frame_new_side_data_from_buf ## -- Begin function av_frame_new_side_data_from_buf
	.p2align	4, 0x90
_av_frame_new_side_data_from_buf:       ## @av_frame_new_side_data_from_buf
	.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
	testq	%rdx, %rdx
	je	LBB0_8
## %bb.1:
	movq	%rdi, %r15
	movslq	(%rdi), %rax
	movq	_INT_MAX@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	shrq	$3, %rcx
	decq	%rcx
	cmpq	%rax, %rcx
	jb	LBB0_8
## %bb.4:
	movq	%rdx, %rbx
	movl	%esi, %r14d
	movq	8(%r15), %rdi
	leal	8(,%rax,8), %esi
	callq	_av_realloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	movq	%rax, 8(%r15)
	movl	$24, %edi
	callq	_av_mallocz
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	%rbx, 8(%rax)
	movl	4(%rbx), %ecx
	movl	%ecx, 16(%rax)
	movl	(%rbx), %ecx
	movl	%ecx, 4(%rax)
	movl	%r14d, (%rax)
	movq	8(%r15), %rcx
	movslq	(%r15), %rdx
	leal	1(%rdx), %esi
	movl	%esi, (%r15)
	movq	%rax, (%rcx,%rdx,8)
	jmp	LBB0_9
LBB0_8:
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_MAX,4,2                    ## @INT_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_frame_new_side_data_from_buf ; -- Begin function av_frame_new_side_data_from_buf
	.p2align	2
_av_frame_new_side_data_from_buf:       ; @av_frame_new_side_data_from_buf
	.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
	cbz	x2, LBB0_2
; %bb.1:
	mov	x19, x0
	ldrsw	x8, [x0]
Lloh0:
	adrp	x9, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _INT_MAX@GOTPAGEOFF]
Lloh2:
	ldrsw	x9, [x9]
	lsr	x9, x9, #3
	sub	x9, x9, #1
	cmp	x9, x8
	b.hs	LBB0_4
LBB0_2:
	mov	x0, #0
LBB0_3:
	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:
	mov	x21, x2
	mov	x20, x1
	ldr	x0, [x19, #8]
	lsl	w8, w8, #3
	add	w1, w8, #8
	bl	_av_realloc
	cbz	x0, LBB0_3
; %bb.5:
	str	x0, [x19, #8]
	mov	w0, #24
	bl	_av_mallocz
	cbz	x0, LBB0_3
; %bb.6:
	str	x21, [x0, #8]
	ldp	w9, w8, [x21]
	str	w8, [x0, #16]
	stp	w20, w9, [x0]
	ldr	x8, [x19, #8]
	ldrsw	x9, [x19]
	add	w10, w9, #1
	str	w10, [x19]
	str	x0, [x8, x9, lsl #3]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_MAX,4,2                    ; @INT_MAX
.subsections_via_symbols
