	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_codecs_sorted
_get_codecs_sorted:                     ## @get_codecs_sorted
	.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, %r14
	movl	$-1, %r12d
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, %rdi
	callq	_avcodec_descriptor_next
	incl	%r12d
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movl	%r12d, %edi
	movl	$8, %esi
	callq	_av_calloc
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%edi, %edi
	callq	_av_log
	movl	$1, %edi
	callq	_exit_program
LBB0_4:
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_avcodec_descriptor_next
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %ecx
	incl	%ebx
	movq	%rax, (%r15,%rcx,8)
	movq	%rax, %rdi
	callq	_avcodec_descriptor_next
	testq	%rax, %rax
	jne	LBB0_6
LBB0_7:
	xorl	%edi, %edi
	cmpl	%r12d, %ebx
	sete	%dil
	callq	_av_assert0
	movq	_compare_codec_desc@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	$8, %edx
	callq	_qsort
	movq	%r15, (%r14)
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Out of memory\n"

	.comm	_compare_codec_desc,4,2         ## @compare_codec_desc
	.no_dead_strip	_get_codecs_sorted
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_codecs_sorted
_get_codecs_sorted:                     ; @get_codecs_sorted
	.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
	mov	x0, #0
	mov	w20, #-1
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	bl	_avcodec_descriptor_next
	add	w20, w20, #1
	cbnz	x0, LBB0_1
; %bb.2:
	mov	x0, x20
	mov	w1, #8
	bl	_av_calloc
	mov	x21, x0
	cbnz	x0, LBB0_4
; %bb.3:
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
	mov	w0, #1
	bl	_exit_program
LBB0_4:
	mov	x0, #0
	bl	_avcodec_descriptor_next
	cbz	x0, LBB0_7
; %bb.5:
	mov	w8, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	w22, w8, #1
	str	x0, [x21, w8, uxtw #3]
	bl	_avcodec_descriptor_next
	mov	x8, x22
	cbnz	x0, LBB0_6
	b	LBB0_8
LBB0_7:
	mov	w22, #0
LBB0_8:
	cmp	w22, w20
	cset	w0, eq
	bl	_av_assert0
Lloh5:
	adrp	x8, _compare_codec_desc@GOTPAGE
Lloh6:
	ldr	x8, [x8, _compare_codec_desc@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x20
	mov	w2, #8
	bl	_qsort
	str	x21, [x19]
	mov	x0, x20
	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
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Out of memory\n"

	.comm	_compare_codec_desc,4,2         ; @compare_codec_desc
	.no_dead_strip	_get_codecs_sorted
.subsections_via_symbols
