	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_get_extended_channel_layout ## -- Begin function av_get_extended_channel_layout
	.p2align	4, 0x90
_av_get_extended_channel_layout:        ## @av_get_extended_channel_layout
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_av_get_channel_layout
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rax, (%r15)
	movq	%rax, %rdi
	callq	_av_get_channel_layout_nb_channels
LBB0_8:
	movl	%eax, (%r14)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	leaq	-32(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$10, %edx
	callq	_strtol
	movq	_errno@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	jne	LBB0_9
## %bb.3:
	movq	-32(%rbp), %rcx
	cmpb	$67, (%rcx)
	jne	LBB0_9
## %bb.4:
	cmpb	$0, 1(%rcx)
	jne	LBB0_9
## %bb.5:
	testl	%eax, %eax
	jle	LBB0_9
## %bb.6:
	cmpl	$63, %eax
	jg	LBB0_9
## %bb.7:
	movq	$0, (%r15)
	jmp	LBB0_8
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,4,2                      ## @errno
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_get_extended_channel_layout ; -- Begin function av_get_extended_channel_layout
	.p2align	2
_av_get_extended_channel_layout:        ; @av_get_extended_channel_layout
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_av_get_channel_layout
	cbz	x0, LBB0_3
; %bb.1:
	str	x0, [x20]
	bl	_av_get_channel_layout_nb_channels
LBB0_2:
	str	w0, [x19]
	mov	w0, #0
	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
LBB0_3:
	add	x1, sp, #8
	mov	x0, x21
	mov	w2, #10
	bl	_strtol
Lloh0:
	adrp	x8, _errno@GOTPAGE
Lloh1:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbnz	w8, LBB0_8
; %bb.4:
	ldr	x8, [sp, #8]
	ldrb	w9, [x8]
	cmp	w9, #67
	b.ne	LBB0_8
; %bb.5:
	ldrb	w8, [x8, #1]
	cmp	w8, #0
	ccmp	w0, #1, #8, eq
	b.lt	LBB0_8
; %bb.6:
	cmp	w0, #63
	b.gt	LBB0_8
; %bb.7:
	str	xzr, [x20]
	b	LBB0_2
LBB0_8:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	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
	add	sp, sp, #64
	b	_AVERROR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,4,2                      ; @errno
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
