	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function select_channel_layout
_select_channel_layout:                 ## @select_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	(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.1:
	movl	(%rbx), %edi
	testl	%edi, %edi
	je	LBB0_2
## %bb.4:
	addq	$4, %rbx
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	(%rbx), %edi
	addq	$4, %rbx
	testl	%edi, %edi
	je	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	callq	_av_get_channel_layout_nb_channels
	cmpl	%r15d, %eax
	jle	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	-4(%rbx), %r14d
	movl	%eax, %r15d
	jmp	LBB0_7
LBB0_3:
	movq	_AV_CH_LAYOUT_STEREO@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_8
LBB0_2:
	xorl	%r14d, %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_CH_LAYOUT_STEREO,4,2        ## @AV_CH_LAYOUT_STEREO
	.no_dead_strip	_select_channel_layout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function select_channel_layout
_select_channel_layout:                 ; @select_channel_layout
	.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
	ldr	x8, [x0]
	cbz	x8, LBB0_6
; %bb.1:
	ldr	w0, [x8]
	cbz	w0, LBB0_7
; %bb.2:
	mov	w21, #0
	mov	w19, #0
	add	x20, x8, #4
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x20], #4
	cbz	w0, LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	bl	_av_get_channel_layout_nb_channels
	cmp	w0, w21
	b.le	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldur	w19, [x20, #-4]
	mov	x21, x0
	b	LBB0_3
LBB0_6:
Lloh0:
	adrp	x8, _AV_CH_LAYOUT_STEREO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_CH_LAYOUT_STEREO@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	b	LBB0_8
LBB0_7:
	mov	w19, #0
LBB0_8:
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_CH_LAYOUT_STEREO,4,2        ; @AV_CH_LAYOUT_STEREO
	.no_dead_strip	_select_channel_layout
.subsections_via_symbols
