	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function parse_channel_name
_parse_channel_name:                    ## @parse_channel_name
	.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
	movq	%r8, %rbx
	movq	%rcx, %r14
	movq	%rdx, %r15
	movl	%esi, %r12d
	movq	%rdi, %r13
	movq	(%rdx), %rdi
	leaq	L_.str(%rip), %rsi
	leaq	-44(%rbp), %rcx
	movq	%r8, %rdx
	callq	_sscanf
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rbx, %rdi
	callq	_av_get_channel_layout
	movq	_AV_CH_LOW_FREQUENCY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movl	%r12d, (%r13)
LBB0_3:
	movl	$4294967295, %edx               ## imm = 0xFFFFFFFF
	xorl	%ecx, %ecx
	cmpq	%rdx, %rax
	setg	%cl
	movl	%ecx, %esi
	shlb	$5, %cl
	movq	%rax, %rdx
                                        ## kill: def $cl killed $cl killed $ecx
	sarq	%cl, %rdx
	shll	$5, %esi
	xorl	%ecx, %ecx
	cmpq	$65536, %rdx                    ## imm = 0x10000
	setge	%cl
	movl	%ecx, %edi
	shll	$4, %edi
	orl	%esi, %edi
	shlb	$4, %cl
                                        ## kill: def $cl killed $cl killed $ecx
	sarq	%cl, %rdx
	xorl	%ecx, %ecx
	cmpq	$256, %rdx                      ## imm = 0x100
	setge	%cl
	leal	(%rdi,%rcx,8), %esi
	shlb	$3, %cl
                                        ## kill: def $cl killed $cl killed $rcx
	sarq	%cl, %rdx
	xorl	%ecx, %ecx
	cmpq	$16, %rdx
	setge	%cl
	leal	(%rsi,%rcx,4), %esi
	shlb	$2, %cl
                                        ## kill: def $cl killed $cl killed $rcx
	sarq	%cl, %rdx
	xorl	%ecx, %ecx
	cmpq	$4, %rdx
	setge	%cl
	leal	(%rsi,%rcx,2), %esi
	addb	%cl, %cl
                                        ## kill: def $cl killed $cl killed $rcx
	sarq	%cl, %rdx
	xorl	%ecx, %ecx
	cmpq	$2, %rdx
	setge	%cl
	orl	%esi, %ecx
	movl	$1, %edx
	shlq	%cl, %rdx
	cmpq	%rdx, %rax
	jne	LBB0_5
## %bb.4:
	movl	%ecx, (%r14)
	movslq	-44(%rbp), %rax
	addq	%rax, (%r15)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%7[A-Z]%n"

	.comm	_AV_CH_LOW_FREQUENCY,8,3        ## @AV_CH_LOW_FREQUENCY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_parse_channel_name
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function parse_channel_name
_parse_channel_name:                    ; @parse_channel_name
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x23, x4
	mov	x20, x3
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x0, [x2]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x3, sp, #12
	mov	x2, x4
	bl	_sscanf
	cbz	x0, LBB0_5
; %bb.1:
	mov	x0, x23
	bl	_av_get_channel_layout
Lloh2:
	adrp	x8, _AV_CH_LOW_FREQUENCY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_CH_LOW_FREQUENCY@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_3
; %bb.2:
	str	w21, [x22]
LBB0_3:
	mov	w8, #-1
	cmp	x0, x8
	cset	w8, gt
	lsl	w9, w8, #5
	lsl	x8, x8, #5
	asr	x8, x0, x8
	cmp	x8, #16, lsl #12                ; =65536
	cset	w10, ge
	bfi	w9, w10, #4, #1
	lsl	x10, x10, #4
	asr	x8, x8, x10
	cmp	x8, #255
	cset	w10, gt
	bfi	w9, w10, #3, #1
	lsl	x10, x10, #3
	asr	x8, x8, x10
	cmp	x8, #15
	cset	w10, gt
	bfi	w9, w10, #2, #1
	lsl	x10, x10, #2
	asr	x8, x8, x10
	cmp	x8, #3
	cset	w10, gt
	bfi	w9, w10, #1, #1
	lsl	x10, x10, #1
	asr	x8, x8, x10
	cmp	x8, #1
	cset	w8, gt
	orr	w8, w9, w8
	mov	w9, #1
	lsl	x9, x9, x8
	cmp	x0, x9
	b.ne	LBB0_5
; %bb.4:
	mov	w0, #0
	str	w8, [x20]
	ldrsw	x8, [sp, #12]
	ldr	x9, [x19]
	add	x8, x9, x8
	str	x8, [x19]
	b	LBB0_6
LBB0_5:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%7[A-Z]%n"

	.comm	_AV_CH_LOW_FREQUENCY,8,3        ; @AV_CH_LOW_FREQUENCY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_parse_channel_name
.subsections_via_symbols
