	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_channels
_set_channels:                          ## @set_channels
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	%edx, %ecx
	testl	%edx, %edx
	jle	LBB0_1
## %bb.2:
	movq	(%rsi), %rax
	movl	%ecx, (%rax)
	cmpl	$1, %ecx
	jne	LBB0_3
## %bb.4:
	movq	_AV_CH_LAYOUT_MONO@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbp
	retq
LBB0_3:
	movq	_AV_CH_LAYOUT_STEREO@GOTPCREL(%rip), %rcx
LBB0_5:
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rax)
	xorl	%eax, %eax
	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	"Channel count %d invalid.\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AV_CH_LAYOUT_MONO,4,2          ## @AV_CH_LAYOUT_MONO
	.comm	_AV_CH_LAYOUT_STEREO,4,2        ## @AV_CH_LAYOUT_STEREO
	.no_dead_strip	_set_channels
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_channels
_set_channels:                          ; @set_channels
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	mov	x3, x2
	cmp	w2, #0
	b.le	LBB0_2
; %bb.1:
	mov	w0, #0
	ldr	x8, [x1]
	str	w3, [x8]
Lloh0:
	adrp	x9, _AV_CH_LAYOUT_MONO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_CH_LAYOUT_MONO@GOTPAGEOFF]
Lloh2:
	adrp	x10, _AV_CH_LAYOUT_STEREO@GOTPAGE
Lloh3:
	ldr	x10, [x10, _AV_CH_LAYOUT_STEREO@GOTPAGEOFF]
	cmp	w3, #1
	csel	x9, x9, x10, eq
	ldr	w9, [x9]
	str	w9, [x8, #4]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_2:
Lloh4:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x2, l_.str@PAGE
Lloh8:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
Lloh9:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Channel count %d invalid.\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV_CH_LAYOUT_MONO,4,2          ; @AV_CH_LAYOUT_MONO
	.comm	_AV_CH_LAYOUT_STEREO,4,2        ; @AV_CH_LAYOUT_STEREO
	.no_dead_strip	_set_channels
.subsections_via_symbols
