	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_audio_buffer
_get_audio_buffer:                      ## @get_audio_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	%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	%esi, %r15d
	movq	%rdi, %r13
	movl	48(%rdi), %edi
	callq	_av_sample_fmt_is_planar
	movl	%eax, %r14d
	movl	(%r13), %r12d
	testl	%r12d, %r12d
	jne	LBB0_2
## %bb.1:
	movl	56(%r13), %edi
	callq	_av_get_channel_layout_nb_channels
	movl	%eax, %r12d
	movl	%eax, (%r13)
LBB0_2:
	testl	%r14d, %r14d
	movl	$1, %r14d
	cmovnel	%r12d, %r14d
	movq	%r13, %rdi
	callq	_CHECK_CHANNELS_CONSISTENCY
	movq	24(%r13), %rdi
	cmpl	$0, (%rdi)
	jne	LBB0_4
## %bb.3:
	movl	48(%r13), %ecx
	movl	52(%r13), %edx
	movl	%r12d, %esi
	movl	%r15d, %r8d
	callq	_av_samples_get_buffer_size
	testl	%eax, %eax
	js	LBB0_21
LBB0_4:
	movq	_AV_NUM_DATA_POINTERS@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	cmpl	%esi, %r14d
	jle	LBB0_9
## %bb.5:
	movl	%r14d, %edi
	movl	$8, %esi
	callq	_av_mallocz_array
	movq	%rax, 16(%r13)
	movl	%r14d, %edi
	subl	(%r15), %edi
	movl	$8, %esi
	callq	_av_mallocz_array
	movq	%rax, 8(%r13)
	cmpq	$0, 16(%r13)
	je	LBB0_7
## %bb.6:
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movl	(%r15), %esi
	movl	%r14d, %eax
	subl	%esi, %eax
	movl	%eax, 4(%r13)
	jmp	LBB0_10
LBB0_9:
	movq	40(%r13), %rax
	movq	%rax, 16(%r13)
LBB0_10:
	movl	%r14d, %edi
	callq	_FFMIN
	testl	%eax, %eax
	jle	LBB0_16
## %bb.11:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	24(%r13), %rax
	movl	(%rax), %edi
	callq	_av_buffer_alloc
	movq	32(%r13), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	32(%r13), %rax
	movq	(%rax,%rbx,8), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	(%rax), %rax
	movq	40(%r13), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	16(%r13), %rcx
	movq	%rax, (%rcx,%rbx,8)
	incq	%rbx
	movl	(%r15), %esi
	movl	%r14d, %edi
	callq	_FFMIN
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_12
LBB0_16:
	xorl	%eax, %eax
	cmpl	(%r15), %r14d
	jle	LBB0_21
## %bb.17:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	24(%r13), %rax
	movl	(%rax), %edi
	callq	_av_buffer_alloc
	movq	8(%r13), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	8(%r13), %rax
	movq	(%rax,%rbx,8), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	(%rax), %rax
	movq	16(%r13), %rcx
	movl	(%r15), %edx
	leal	(%rbx,%rdx), %esi
	movslq	%esi, %rsi
	movq	%rax, (%rcx,%rsi,8)
	incq	%rbx
	movl	%r14d, %eax
	subl	%edx, %eax
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_18
## %bb.20:
	xorl	%eax, %eax
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	%r13, %rdi
	callq	_av_frame_unref
	jmp	LBB0_14
LBB0_7:
	leaq	16(%r13), %rdi
	addq	$8, %r13
	callq	_av_freep
	movq	%r13, %rdi
	callq	_av_freep
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_NUM_DATA_POINTERS,4,2       ## @AV_NUM_DATA_POINTERS
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_get_audio_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_audio_buffer
_get_audio_buffer:                      ; @get_audio_buffer
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x1
	mov	x19, x0
	ldr	w0, [x0, #48]
	bl	_av_sample_fmt_is_planar
	mov	x20, x0
	ldr	w22, [x19]
	cbnz	w22, LBB0_2
; %bb.1:
	ldr	w0, [x19, #56]
	bl	_av_get_channel_layout_nb_channels
	mov	x22, x0
	str	w0, [x19]
LBB0_2:
	cmp	w20, #0
	csinc	w20, w22, wzr, ne
	mov	x0, x19
	bl	_CHECK_CHANNELS_CONSISTENCY
	ldr	x0, [x19, #24]
	ldr	w8, [x0]
	cbnz	w8, LBB0_4
; %bb.3:
	ldp	w3, w2, [x19, #48]
	mov	x1, x22
	mov	x4, x21
	bl	_av_samples_get_buffer_size
	tbnz	w0, #31, LBB0_18
LBB0_4:
Lloh0:
	adrp	x23, _AV_NUM_DATA_POINTERS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _AV_NUM_DATA_POINTERS@GOTPAGEOFF]
	ldr	w1, [x23]
	cmp	w20, w1
	b.le	LBB0_7
; %bb.5:
	mov	x0, x20
	mov	w1, #8
	bl	_av_mallocz_array
	mov	x21, x19
	str	x0, [x21, #16]!
	ldr	w8, [x23]
	sub	w0, w20, w8
	mov	w1, #8
	bl	_av_mallocz_array
	mov	x22, x19
	str	x0, [x22, #8]!
	ldr	x8, [x21]
	cmp	x8, #0
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_8
; %bb.6:
	mov	x0, x21
	bl	_av_freep
	mov	x0, x22
	bl	_av_freep
	b	LBB0_20
LBB0_7:
	ldr	x8, [x19, #40]
	str	x8, [x19, #16]
	b	LBB0_9
LBB0_8:
	ldr	w1, [x23]
	sub	w8, w20, w1
	str	w8, [x19, #4]
LBB0_9:
	mov	x0, x20
	bl	_FFMIN
	cmp	w0, #1
	b.lt	LBB0_13
; %bb.10:
	mov	x21, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
	bl	_av_buffer_alloc
	ldr	x9, [x19, #32]
	lsl	x8, x21, #3
	str	x0, [x9, x8]
	ldr	x9, [x19, #32]
	ldr	x9, [x9, x8]
	cbz	x9, LBB0_19
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x9, [x9]
	ldr	x10, [x19, #40]
	str	x9, [x10, x8]
	ldr	x10, [x19, #16]
	str	x9, [x10, x8]
	add	x21, x21, #1
	ldr	w1, [x23]
	mov	x0, x20
	bl	_FFMIN
	cmp	x21, w0, sxtw
	b.lt	LBB0_11
LBB0_13:
	ldr	w8, [x23]
	cmp	w20, w8
	b.le	LBB0_17
; %bb.14:
	mov	x21, #0
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
	bl	_av_buffer_alloc
	ldr	x8, [x19, #8]
	lsl	x9, x21, #3
	str	x0, [x8, x9]
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x9]
	cbz	x8, LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [x8]
	ldr	x9, [x19, #16]
	ldr	w10, [x23]
	add	w11, w21, w10
	str	x8, [x9, w11, sxtw #3]
	add	x21, x21, #1
	sub	w8, w20, w10
	cmp	x21, w8, sxtw
	b.lt	LBB0_15
LBB0_17:
	mov	w0, #0
LBB0_18:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_19:
	mov	x0, x19
	bl	_av_frame_unref
LBB0_20:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_AVERROR
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_NUM_DATA_POINTERS,4,2       ; @AV_NUM_DATA_POINTERS
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_get_audio_buffer
.subsections_via_symbols
