	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function g2m_init_buffers
_g2m_init_buffers:                      ## @g2m_init_buffers
	.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
	movq	%rdi, %rbx
	cmpl	$0, 104(%rdi)
	je	LBB0_1
## %bb.2:
	movq	8(%rbx), %rdi
	cmpq	%rdi, (%rbx)
	jl	LBB0_4
## %bb.3:
	movl	16(%rbx), %eax
	cmpl	20(%rbx), %eax
	jl	LBB0_4
	jmp	LBB0_5
LBB0_1:
	movq	8(%rbx), %rdi
LBB0_4:
	addl	$15, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	movl	$16, %esi
	callq	_FFALIGN
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rax,2), %eax
	movl	%eax, 24(%rbx)
	movl	20(%rbx), %r14d
	movl	104(%rbx), %edi
	addl	$15, %r14d
	callq	_av_free
	movl	24(%rbx), %edi
	movl	%r14d, %esi
	callq	_av_mallocz_array
	movl	%eax, 104(%rbx)
	testl	%eax, %eax
	je	LBB0_19
LBB0_5:
	cmpq	$0, 96(%rbx)
	je	LBB0_11
## %bb.6:
	cmpq	$0, 88(%rbx)
	je	LBB0_11
## %bb.7:
	cmpl	$2, 28(%rbx)
	jne	LBB0_9
## %bb.8:
	cmpq	$0, 56(%rbx)
	je	LBB0_11
LBB0_9:
	movl	32(%rbx), %eax
	cmpl	36(%rbx), %eax
	jl	LBB0_11
## %bb.10:
	movl	40(%rbx), %eax
	cmpl	44(%rbx), %eax
	jge	LBB0_18
LBB0_11:
	leaq	96(%rbx), %r15
	movl	36(%rbx), %edi
	movl	$16, %esi
	callq	_FFALIGN
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rax,2), %eax
	movl	%eax, 48(%rbx)
	movl	36(%rbx), %edi
	shll	$2, %edi
	movl	$16, %esi
	callq	_FFALIGN
	movl	%eax, 52(%rbx)
	movl	44(%rbx), %edi
	movl	$16, %esi
	callq	_FFALIGN
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_av_freep
	leaq	88(%rbx), %r15
	movq	%r15, %rdi
	callq	_av_freep
	leaq	80(%rbx), %r12
	movq	%r12, %rdi
	callq	_av_freep
	leaq	72(%rbx), %rdi
	callq	_av_freep
	leaq	56(%rbx), %rdi
	callq	_av_freep
	movq	$0, 64(%rbx)
	movl	48(%rbx), %edi
	imull	%r14d, %edi
	callq	_av_mallocz
	movq	%rax, 96(%rbx)
	movl	48(%rbx), %edi
	imull	%r14d, %edi
	callq	_av_mallocz
	movq	%rax, 88(%rbx)
	movl	36(%rbx), %edi
	incl	%edi
	imull	%r14d, %edi
	movq	_AV_INPUT_BUFFER_PADDING_SIZE@GOTPCREL(%rip), %rax
	addl	(%rax), %edi
	callq	_av_mallocz
	movq	%rax, 80(%rbx)
	movl	36(%rbx), %edi
	imull	%r14d, %edi
	callq	_av_mallocz
	movq	%rax, 72(%rbx)
	cmpq	$0, 96(%rbx)
	je	LBB0_19
## %bb.12:
	cmpq	$0, (%r15)
	je	LBB0_19
## %bb.13:
	cmpq	$0, (%r12)
	je	LBB0_19
## %bb.14:
	testq	%rax, %rax
	je	LBB0_19
## %bb.15:
	cmpl	$2, 28(%rbx)
	jne	LBB0_18
## %bb.16:
	imull	52(%rbx), %r14d
	addl	$4, %r14d
	movl	%r14d, %edi
	callq	_av_mallocz
	movq	%rax, 56(%rbx)
	testq	%rax, %rax
	je	LBB0_19
## %bb.17:
	addq	$4, %rax
	movq	%rax, 64(%rbx)
LBB0_18:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,4,2 ## @AV_INPUT_BUFFER_PADDING_SIZE
	.no_dead_strip	_g2m_init_buffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function g2m_init_buffers
_g2m_init_buffers:                      ; @g2m_init_buffers
	.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
	ldr	w8, [x0, #104]
	cbz	w8, LBB0_3
; %bb.1:
	ldp	x9, x8, [x19]
	cmp	x9, x8
	b.lt	LBB0_4
; %bb.2:
	ldp	w9, w10, [x19, #16]
	cmp	w9, w10
	b.lt	LBB0_4
	b	LBB0_5
LBB0_3:
	ldr	x8, [x19, #8]
LBB0_4:
	add	w0, w8, #15
	mov	w1, #16
	bl	_FFALIGN
	add	w8, w0, w0, lsl #1
	str	w8, [x19, #24]
	ldr	w8, [x19, #20]
	add	w20, w8, #15
	ldr	w0, [x19, #104]
	bl	_av_free
	ldr	w0, [x19, #24]
	mov	x1, x20
	bl	_av_mallocz_array
	str	w0, [x19, #104]
	cbz	w0, LBB0_19
LBB0_5:
	mov	x21, x19
	ldr	x8, [x21, #96]!
	cbz	x8, LBB0_11
; %bb.6:
	ldr	x8, [x19, #88]
	cbz	x8, LBB0_11
; %bb.7:
	ldr	w8, [x19, #28]
	cmp	w8, #2
	b.ne	LBB0_9
; %bb.8:
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_11
LBB0_9:
	ldp	w8, w9, [x19, #32]
	cmp	w8, w9
	b.lt	LBB0_11
; %bb.10:
	ldp	w8, w9, [x19, #40]
	cmp	w8, w9
	b.ge	LBB0_18
LBB0_11:
	ldr	w0, [x19, #36]
	mov	w1, #16
	bl	_FFALIGN
	add	w8, w0, w0, lsl #1
	str	w8, [x19, #48]
	ldr	w8, [x19, #36]
	lsl	w0, w8, #2
	mov	w1, #16
	bl	_FFALIGN
	str	w0, [x19, #52]
	ldr	w0, [x19, #44]
	mov	w1, #16
	bl	_FFALIGN
	mov	x20, x0
	mov	x0, x21
	bl	_av_freep
	add	x21, x19, #88
	mov	x0, x21
	bl	_av_freep
	add	x22, x19, #80
	mov	x0, x22
	bl	_av_freep
	add	x0, x19, #72
	bl	_av_freep
	add	x0, x19, #56
	bl	_av_freep
	str	xzr, [x19, #64]
	ldr	w8, [x19, #48]
	mul	w0, w8, w20
	bl	_av_mallocz
	str	x0, [x19, #96]
	ldr	w8, [x19, #48]
	mul	w0, w8, w20
	bl	_av_mallocz
	str	x0, [x19, #88]
	ldr	w8, [x19, #36]
	madd	w8, w20, w8, w20
Lloh0:
	adrp	x9, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_INPUT_BUFFER_PADDING_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	add	w0, w8, w9
	bl	_av_mallocz
	str	x0, [x19, #80]
	ldr	w8, [x19, #36]
	mul	w0, w8, w20
	bl	_av_mallocz
	str	x0, [x19, #72]
	ldr	x8, [x19, #96]
	cbz	x8, LBB0_19
; %bb.12:
	ldr	x8, [x21]
	cbz	x8, LBB0_19
; %bb.13:
	ldr	x8, [x22]
	cbz	x8, LBB0_19
; %bb.14:
	cbz	x0, LBB0_19
; %bb.15:
	ldr	w8, [x19, #28]
	cmp	w8, #2
	b.ne	LBB0_18
; %bb.16:
	ldr	w8, [x19, #52]
	orr	w9, wzr, #0x4
	madd	w0, w8, w20, w9
	bl	_av_mallocz
	str	x0, [x19, #56]
	cbz	x0, LBB0_19
; %bb.17:
	add	x8, x0, #4
	str	x8, [x19, #64]
LBB0_18:
	mov	w0, #0
	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_19:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AV_INPUT_BUFFER_PADDING_SIZE,4,2 ; @AV_INPUT_BUFFER_PADDING_SIZE
	.no_dead_strip	_g2m_init_buffers
.subsections_via_symbols
