	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_samples_get_buffer_size     ## -- Begin function av_samples_get_buffer_size
	.p2align	4, 0x90
_av_samples_get_buffer_size:            ## @av_samples_get_buffer_size
	.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
	movl	%r8d, %r13d
	movl	%ecx, %ebx
	movl	%edx, %r12d
	movl	%esi, %r15d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	%ecx, %edi
	callq	_av_get_bytes_per_sample
	movl	%eax, %r14d
	movl	%ebx, %edi
	callq	_av_sample_fmt_is_planar
	testl	%r15d, %r15d
	jle	LBB0_11
## %bb.1:
	testl	%r12d, %r12d
	jle	LBB0_11
## %bb.2:
	testl	%r14d, %r14d
	je	LBB0_11
## %bb.3:
	movl	%eax, %ebx
	testl	%r13d, %r13d
	jne	LBB0_6
## %bb.4:
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	$-31, %eax
	cmpl	%r12d, %eax
	jl	LBB0_11
## %bb.5:
	movl	%r12d, %edi
	movl	$32, %esi
	callq	_FFALIGN
	movl	%eax, %r12d
	movl	$1, %r13d
LBB0_6:
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %eax
	cltd
	idivl	%r13d
	cmpl	%r15d, %eax
	jl	LBB0_11
## %bb.7:
	movl	%r12d, %esi
	imull	%r15d, %esi
	movl	%r13d, %eax
	imull	%r15d, %eax
	subl	%eax, %ecx
	movl	%ecx, %eax
	cltd
	idivl	%r14d
	cmpl	%eax, %esi
	jle	LBB0_8
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_8:
	imull	%r14d, %r12d
	testl	%ebx, %ebx
	movl	$1, %r14d
	movl	$1, %edi
	cmovel	%r15d, %edi
	imull	%r12d, %edi
	movl	%r13d, %esi
	callq	_FFALIGN
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.9:
	movl	%eax, (%rcx)
LBB0_10:
	testl	%ebx, %ebx
	cmovel	%r14d, %r15d
	imull	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.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_samples_get_buffer_size     ; -- Begin function av_samples_get_buffer_size
	.p2align	2
_av_samples_get_buffer_size:            ; @av_samples_get_buffer_size
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x4
	mov	x21, x3
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	mov	x0, x3
	bl	_av_get_bytes_per_sample
	mov	x24, x0
	mov	x0, x21
	bl	_av_sample_fmt_is_planar
	cmp	w19, #1
	b.lt	LBB0_8
; %bb.1:
	cmp	w22, #1
	b.lt	LBB0_8
; %bb.2:
	cbz	w24, LBB0_8
; %bb.3:
	mov	x21, x0
Lloh0:
	adrp	x25, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x25, [x25, _INT_MAX@GOTPAGEOFF]
	cbnz	w23, LBB0_6
; %bb.4:
	ldr	w8, [x25]
	sub	w8, w8, #31
	cmp	w8, w22
	b.lt	LBB0_8
; %bb.5:
	mov	x0, x22
	mov	w1, #32
	bl	_FFALIGN
	mov	x22, x0
	mov	w23, #1
LBB0_6:
	ldr	w8, [x25]
	sdiv	w9, w8, w23
	cmp	w9, w19
	b.lt	LBB0_8
; %bb.7:
	mul	w9, w22, w19
	msub	w8, w23, w19, w8
	sdiv	w8, w8, w24
	cmp	w9, w8
	b.le	LBB0_9
LBB0_8:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_9:
	mul	w8, w22, w24
	cmp	w21, #0
	csinc	w9, w19, wzr, eq
	mul	w0, w8, w9
	mov	x1, x23
	bl	_FFALIGN
	cbz	x20, LBB0_11
; %bb.10:
	str	w0, [x20]
LBB0_11:
	cmp	w21, #0
	csinc	w8, w19, wzr, ne
	mul	w0, w0, w8
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_INT_MAX,4,2                    ; @INT_MAX
.subsections_via_symbols
