	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function remap_layout
_remap_layout:                          ## @remap_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	%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	_kAudioChannelLayoutTag_UseChannelDescriptions@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rdi)
	movl	%edx, (%rdi)
	testl	%edx, %edx
	jle	LBB0_8
## %bb.1:
	movl	%esi, %r15d
	movq	%rdi, %r14
	movl	%edx, %r12d
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	decl	%ebx
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	incl	%ebx
	btl	%ebx, %r15d
	jb	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	cmpl	$64, %ebx
	jl	LBB0_3
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$64, %ebx
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %edi
	callq	_get_channel_label
	movq	8(%r14), %rcx
	movl	%eax, (%rcx,%r13,4)
	testl	%eax, %eax
	js	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	incq	%r13
	cmpq	%r12, %r13
	jne	LBB0_2
LBB0_8:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_kAudioChannelLayoutTag_UseChannelDescriptions,4,2 ## @kAudioChannelLayoutTag_UseChannelDescriptions
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_remap_layout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function remap_layout
_remap_layout:                          ; @remap_layout
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x8, _kAudioChannelLayoutTag_UseChannelDescriptions@GOTPAGE
Lloh1:
	ldr	x8, [x8, _kAudioChannelLayoutTag_UseChannelDescriptions@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0, #16]
	str	w2, [x0]
	cmp	w2, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	mov	x22, #0
	mov	w8, #0
	mov	w23, w2
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
	sub	w21, w8, #1
LBB0_3:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w21, w21, #1
	lsr	w8, w19, w21
	tbnz	w8, #0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=2
	cmp	w21, #64
	b.lt	LBB0_3
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	cmp	w21, #64
	b.eq	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	bl	_get_channel_label
	ldr	x8, [x20, #8]
	str	w0, [x8, x22, lsl #2]
	tbnz	w0, #31, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w8, w21, #1
	add	x22, x22, #1
	cmp	x22, x23
	b.ne	LBB0_2
LBB0_8:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_AVERROR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_kAudioChannelLayoutTag_UseChannelDescriptions,4,2 ; @kAudioChannelLayoutTag_UseChannelDescriptions
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_remap_layout
.subsections_via_symbols
