	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qsv_create_mids
_qsv_create_mids:                       ## @qsv_create_mids
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	(%rax), %r12
	movl	(%r12), %r14d
	callq	_av_buffer_ref
	movq	%rax, -40(%rbp)
	testq	%rax, %rax
	je	LBB0_13
## %bb.1:
	movq	%rax, %rbx
	movl	%r14d, %edi
	movl	$16, %esi
	callq	_av_mallocz_array
	movq	%rax, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_11
## %bb.2:
	movq	%rax, %r15
	movl	%r14d, %esi
	shll	$4, %esi
	movq	_mids_buf_free@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%rbx, %rcx
	xorl	%r8d, %r8d
	callq	_av_buffer_create
	testq	%rax, %rax
	je	LBB0_12
## %bb.3:
	testl	%r14d, %r14d
	jle	LBB0_14
## %bb.4:
	movq	8(%r12), %r9
	movl	(%r9), %edx
	movl	%edx, 8(%r15)
	movq	%rbx, (%r15)
	cmpl	$1, %r14d
	je	LBB0_14
## %bb.5:
	movl	%r14d, %esi
	decq	%r14
	movl	$1, %edx
	cmpl	$2, %esi
	je	LBB0_8
## %bb.6:
	movq	%r14, %r8
	andq	$-2, %r8
	negq	%r8
	movl	$1, %edx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rbx
	movq	-40(%rbp), %rsi
	movl	(%r9,%rdx,4), %ecx
	movl	%ecx, 24(%rbx,%rdi)
	movq	%rsi, 16(%rbx,%rdi)
	movq	-48(%rbp), %rcx
	movq	-40(%rbp), %rsi
	movl	4(%r9,%rdx,4), %ebx
	movl	%ebx, 40(%rcx,%rdi)
	movq	%rsi, 32(%rcx,%rdi)
	addq	$32, %rdi
	leaq	(%r8,%rdx), %rcx
	addq	$2, %rcx
	addq	$2, %rdx
	cmpq	$1, %rcx
	jne	LBB0_7
LBB0_8:
	testb	$1, %r14b
	je	LBB0_14
## %bb.9:
	movq	-48(%rbp), %rcx
	movq	-40(%rbp), %rsi
	movl	(%r9,%rdx,4), %edi
	shlq	$4, %rdx
	movl	%edi, 8(%rcx,%rdx)
	movq	%rsi, (%rcx,%rdx)
	jmp	LBB0_14
LBB0_11:
	leaq	-40(%rbp), %rdi
	callq	_av_buffer_unref
	jmp	LBB0_13
LBB0_12:
	leaq	-40(%rbp), %rdi
	callq	_av_buffer_unref
	leaq	-48(%rbp), %rdi
	callq	_av_freep
LBB0_13:
	xorl	%eax, %eax
LBB0_14:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mids_buf_free,4,2              ## @mids_buf_free
	.no_dead_strip	_qsv_create_mids
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qsv_create_mids
_qsv_create_mids:                       ; @qsv_create_mids
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	x8, [x0]
	ldr	x22, [x8]
	ldr	w19, [x22]
	bl	_av_buffer_ref
	str	x0, [sp, #8]
	cbz	x0, LBB0_10
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	mov	w1, #16
	bl	_av_mallocz_array
	str	x0, [sp]
	cbz	x0, LBB0_7
; %bb.2:
	mov	x21, x0
	lsl	w1, w19, #4
Lloh0:
	adrp	x8, _mids_buf_free@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mids_buf_free@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x3, x20
	mov	w4, #0
	bl	_av_buffer_create
	cbz	x0, LBB0_8
; %bb.3:
	cmp	w19, #1
	b.lt	LBB0_10
; %bb.4:
	ldr	x10, [x22, #8]
	ldr	w8, [x10]
	str	w8, [x21, #8]
	str	x20, [x21]
	cmp	w19, #1
	b.eq	LBB0_10
; %bb.5:
	mov	x8, #0
	sub	x9, x19, #1
	add	x10, x10, #4
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x11, x13, [sp]
	ldr	w12, [x10], #4
	add	x11, x11, x8
	str	w12, [x11, #24]
	str	x13, [x11, #16]
	add	x8, x8, #16
	subs	x9, x9, #1
	b.ne	LBB0_6
	b	LBB0_10
LBB0_7:
	add	x0, sp, #8
	bl	_av_buffer_unref
	b	LBB0_9
LBB0_8:
	add	x0, sp, #8
	bl	_av_buffer_unref
	mov	x0, sp
	bl	_av_freep
LBB0_9:
	mov	x0, #0
LBB0_10:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_mids_buf_free,4,2              ; @mids_buf_free
	.no_dead_strip	_qsv_create_mids
.subsections_via_symbols
