	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aptx_insert_sync
_aptx_insert_sync:                      ## @aptx_insert_sync
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_aptx_check_parity
	testq	%rax, %rax
	je	LBB0_14
## %bb.1:
	movq	_NB_CHANNELS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	-8(%r14,%rax,8), %rcx
	addq	$16, %rcx
	testq	%rax, %rax
	jle	LBB0_13
## %bb.2:
	leaq	(%r14,%rax,8), %r9
	addq	$-8, %r9
	movq	_NB_SUBBANDS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	%r8d, %r10d
	andl	$-2, %r10d
	leaq	_aptx_insert_sync.map(%rip), %rdi
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	addq	$-8, %r9
	cmpq	%r14, %r9
	jb	LBB0_13
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	testl	%r8d, %r8d
	jle	LBB0_12
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r9), %rbx
	xorl	%edx, %edx
	cmpl	$1, %r8d
	jne	LBB0_5
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	testb	$1, %r8b
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movslq	(%rdi,%rdx,4), %rax
	shlq	$4, %rax
	leaq	(%rbx,%rax), %rdx
	movq	(%rbx,%rax), %rax
	cmpq	(%rcx), %rax
	cmovlq	%rdx, %rcx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=2
	addq	$2, %rdx
	cmpq	%rdx, %r10
	je	LBB0_10
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movslq	(%rdi,%rdx,4), %rax
	shlq	$4, %rax
	movq	(%rbx,%rax), %rsi
	cmpq	(%rcx), %rsi
	jge	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	addq	%rbx, %rax
	movq	%rax, %rcx
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=2
	movslq	4(%rdi,%rdx,4), %rax
	shlq	$4, %rax
	movq	(%rbx,%rax), %rsi
	cmpq	(%rcx), %rsi
	jge	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=2
	addq	%rbx, %rax
	movq	%rax, %rcx
	jmp	LBB0_9
LBB0_13:
	movl	8(%rcx), %eax
	movl	%eax, 12(%rcx)
LBB0_14:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NB_CHANNELS,4,2                ## @NB_CHANNELS
	.section	__TEXT,__const
	.p2align	4                               ## @aptx_insert_sync.map
_aptx_insert_sync.map:
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	0                               ## 0x0
	.long	3                               ## 0x3

	.comm	_NB_SUBBANDS,4,2                ## @NB_SUBBANDS
	.no_dead_strip	_aptx_insert_sync
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aptx_insert_sync
_aptx_insert_sync:                      ; @aptx_insert_sync
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_aptx_check_parity
	cbz	x0, LBB0_8
; %bb.1:
Lloh0:
	adrp	x8, _NB_CHANNELS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NB_CHANNELS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	subs	w8, w8, #1
	add	x9, x19, w8, sxtw #3
	ldr	x8, [x9]
	add	x8, x8, #16
	b.lt	LBB0_7
; %bb.2:
Lloh3:
	adrp	x10, _NB_SUBBANDS@GOTPAGE
Lloh4:
	ldr	x10, [x10, _NB_SUBBANDS@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
Lloh6:
	adrp	x11, _aptx_insert_sync.map@PAGE
Lloh7:
	add	x11, x11, _aptx_insert_sync.map@PAGEOFF
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	sub	x9, x9, #8
	cmp	x9, x19
	b.lo	LBB0_7
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	cmp	w10, #1
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x12, [x9]
	mov	x13, x10
	mov	x14, x11
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrsw	x15, [x14], #4
	add	x15, x12, x15, lsl #4
	ldr	x16, [x15]
	ldr	x17, [x8]
	cmp	x16, x17
	csel	x8, x15, x8, lt
	subs	x13, x13, #1
	b.ne	LBB0_6
	b	LBB0_3
LBB0_7:
	ldr	w9, [x8, #8]
	str	w9, [x8, #12]
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_NB_CHANNELS,4,2                ; @NB_CHANNELS
	.section	__TEXT,__const
	.p2align	2                               ; @aptx_insert_sync.map
_aptx_insert_sync.map:
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	0                               ; 0x0
	.long	3                               ; 0x3

	.comm	_NB_SUBBANDS,4,2                ; @NB_SUBBANDS
	.no_dead_strip	_aptx_insert_sync
.subsections_via_symbols
