	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_element
_write_element:                         ## @write_element
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r15d
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rcx, -64(%rbp)
	movq	%r8, -56(%rbp)
	leaq	72(%rdi), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	_TYPE_CPE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r14d, %r14d
	cmpl	%esi, %eax
	sete	%r14b
	incl	%r14d
	cmpq	$0, 64(%rdi)
	je	LBB0_12
## %bb.1:
	movq	%rcx, %rbx
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	callq	_write_element_header
	movq	48(%r13), %rax
	movq	(%rax), %rcx
	movq	_AV_SAMPLE_FMT_S32P@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_7
## %bb.2:
	movl	$32, %r15d
	subl	8(%rax), %r15d
	movq	%rbx, -80(%rbp)
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -72(%rbp)
	cmpl	$0, (%r13)
	jle	LBB0_34
## %bb.3:
	movl	%r14d, %ecx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	48(%r13), %rax
	movl	8(%rax), %esi
	movq	-80(%rbp,%r14,8), %rax
	movl	(%rax,%r12,4), %edx
	movq	%r13, %rbx
	movq	%rcx, %r13
	movl	%r15d, %ecx
	sarl	%cl, %edx
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_put_sbits
	movq	%r13, %rcx
	movq	%rbx, %r13
	incq	%r14
	cmpq	%r14, %rcx
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%r12
	movslq	(%r13), %rax
	cmpq	%rax, %r12
	jl	LBB0_4
	jmp	LBB0_34
LBB0_12:
	movl	%eax, -88(%rbp)                 ## 4-byte Spill
	movq	48(%r13), %rax
	movl	4(%r13), %ecx
	movl	8(%rax), %eax
	addl	%r14d, %eax
	notl	%ecx
	addl	%eax, %ecx
	movslq	%ecx, %rax
	movq	%rax, 56(%r13)
	leaq	-64(%rbp), %rdx
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_init_sample_buffers
	movq	%r13, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	callq	_write_element_header
	movl	4(%r13), %ecx
	testl	%ecx, %ecx
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_18
## %bb.13:
	movl	$-1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	notl	%eax
	movq	8(%r13), %r8
	movq	16(%r13), %r9
	movl	%r14d, %r10d
	movl	(%r13), %ecx
	xorl	%edx, %edx
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_14 Depth=1
	incq	%rdx
	cmpq	%r10, %rdx
	je	LBB0_18
LBB0_14:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_16 Depth 2
	testl	%ecx, %ecx
	jle	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	(%r8,%rdx,8), %rbx
	movq	(%r9,%rdx,8), %rsi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_16:                                ##   Parent Loop BB0_14 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rsi,%rdi,4), %ecx
	andl	%eax, %ecx
	movl	%ecx, (%rbx,%rdi,4)
	movzbl	4(%r13), %ecx
	sarl	%cl, (%rsi,%rdi,4)
	incq	%rdi
	movslq	(%r13), %rcx
	cmpq	%rcx, %rdi
	jl	LBB0_16
	jmp	LBB0_17
LBB0_18:
	cmpl	%r15d, -88(%rbp)                ## 4-byte Folded Reload
	jne	LBB0_20
## %bb.19:
	movq	%r13, %rdi
	callq	_alac_stereo_decorrelation
	movl	24(%r13), %edx
	jmp	LBB0_21
LBB0_7:
	movq	%rbx, -80(%rbp)
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -72(%rbp)
	cmpl	$0, (%r13)
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	jle	LBB0_34
## %bb.8:
	movl	%r14d, %r15d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	48(%r13), %rax
	movl	8(%rax), %esi
	movq	-80(%rbp,%rbx,8), %rax
	movl	(%rax,%r14,4), %edx
	movq	%r12, %rdi
	callq	_put_sbits
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	incq	%r14
	movslq	(%r13), %rax
	cmpq	%rax, %r14
	jl	LBB0_9
	jmp	LBB0_34
LBB0_20:
	movq	$0, 24(%r13)
	xorl	%edx, %edx
LBB0_21:
	movq	%r12, %rdi
	movl	$8, %esi
	callq	_put_bits
	movl	28(%r13), %edx
	movq	%r12, %rdi
	movl	$8, %esi
	callq	_put_bits
	movl	%r14d, -88(%rbp)                ## 4-byte Spill
	movl	%r14d, %r15d
	xorl	%ebx, %ebx
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_22 Depth=1
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	incq	%rbx
	cmpq	%r15, %rbx
	movq	%r14, %r12
	je	LBB0_26
LBB0_22:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_24 Depth 2
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_calc_predictor_params
	movq	%r12, %rdi
	movl	$4, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	32(%r13), %rax
	movq	%r12, %r14
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movq	%rbx, %r12
	shlq	$4, %r12
	movl	(%rax,%r12), %edx
	movq	%r14, %rdi
	movl	$4, %esi
	callq	_put_bits
	movl	40(%r13), %edx
	movq	%r14, %rdi
	movl	$3, %esi
	callq	_put_bits
	movq	32(%r13), %rax
	movl	4(%rax,%r12), %edx
	movq	%r14, %rdi
	movl	$5, %esi
	callq	_put_bits
	movq	32(%r13), %rax
	cmpl	$0, 4(%rax,%r12)
	jle	LBB0_25
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_24:                                ##   Parent Loop BB0_22 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%rax,%r12), %rax
	movl	(%rax,%rbx,4), %edx
	movq	%r14, %rdi
	movl	$16, %esi
	callq	_put_sbits
	incq	%rbx
	movq	32(%r13), %rax
	movslq	4(%rax,%r12), %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_24
	jmp	LBB0_25
LBB0_26:
	cmpl	$0, 4(%r13)
	je	LBB0_32
## %bb.27:
	cmpl	$0, (%r13)
	jle	LBB0_32
## %bb.28:
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_29:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_30 Depth 2
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_30:                                ##   Parent Loop BB0_29 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	4(%r13), %esi
	movq	8(%r13), %rax
	movq	(%rax,%rbx,8), %rax
	movl	(%rax,%r14,4), %edx
	movq	%r12, %rdi
	callq	_put_bits
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_30
## %bb.31:                              ##   in Loop: Header=BB0_29 Depth=1
	incq	%r14
	movslq	(%r13), %rax
	cmpq	%rax, %r14
	jl	LBB0_29
LBB0_32:
	xorl	%r14d, %r14d
	movl	-88(%rbp), %ebx                 ## 4-byte Reload
	.p2align	4, 0x90
LBB0_33:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_alac_linear_predictor
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_alac_entropy_coder
	incl	%r14d
	cmpl	%r14d, %ebx
	jne	LBB0_33
LBB0_34:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_36
## %bb.35:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_36:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_TYPE_CPE,4,2                   ## @TYPE_CPE
	.comm	_AV_SAMPLE_FMT_S32P,8,3         ## @AV_SAMPLE_FMT_S32P
	.no_dead_strip	_write_element
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_element
_write_element:                         ; @write_element
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	stp	x3, x4, [sp, #24]
Lloh3:
	adrp	x8, _TYPE_CPE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TYPE_CPE@GOTPAGEOFF]
	add	x21, x0, #72
Lloh5:
	ldr	w26, [x8]
	cmp	w26, w1
	mov	w8, #1
	cinc	w20, w8, eq
	ldr	x8, [x0, #64]
	cbz	x8, LBB0_7
; %bb.1:
	mov	x24, x4
	mov	x25, x3
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_write_element_header
	ldr	x8, [x19, #48]
	ldr	x9, [x8]
Lloh6:
	adrp	x10, _AV_SAMPLE_FMT_S32P@GOTPAGE
Lloh7:
	ldr	x10, [x10, _AV_SAMPLE_FMT_S32P@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_15
; %bb.2:
	ldr	w8, [x8, #8]
	stp	x25, x24, [sp, #8]
	ldr	w9, [x19]
	cmp	w9, #1
	b.lt	LBB0_34
; %bb.3:
	mov	x22, #0
	mov	w9, #32
	sub	w23, w9, w8
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	add	x24, sp, #8
	mov	x25, x20
LBB0_5:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #48]
	ldr	w1, [x8, #8]
	ldr	x8, [x24], #8
	ldr	w8, [x8, x22, lsl #2]
	asr	w2, w8, w23
	mov	x0, x21
	bl	_put_sbits
	subs	x25, x25, #1
	b.ne	LBB0_5
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x19]
	cmp	x22, x8
	b.lt	LBB0_4
	b	LBB0_34
LBB0_7:
	ldr	x8, [x19, #48]
	ldr	w8, [x8, #8]
	ldr	w9, [x19, #4]
	mvn	w9, w9
	add	w8, w20, w8
	add	w8, w9, w8
	sxtw	x8, w8
	str	x8, [x19, #56]
	add	x2, sp, #24
	mov	x0, x19
	mov	x1, x20
	bl	_init_sample_buffers
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_write_element_header
	ldr	w9, [x19, #4]
	cbz	w9, LBB0_13
; %bb.8:
	mov	x8, #0
	mov	w10, #-1
	lsl	w9, w10, w9
	mvn	w9, w9
	ldp	x10, x11, [x19, #8]
	ldr	w12, [x19]
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x8, x8, #1
	cmp	x8, x20
	b.eq	LBB0_13
LBB0_10:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	cmp	w12, #1
	b.lt	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x13, #0
	lsl	x12, x8, #3
	ldr	x14, [x10, x12]
	ldr	x15, [x11, x12]
LBB0_12:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x12, x13, #2
	ldr	w16, [x15, x12]
	and	w16, w16, w9
	str	w16, [x14, x12]
	ldr	w16, [x19, #4]
	ldr	w17, [x15, x12]
	asr	w16, w17, w16
	str	w16, [x15, x12]
	add	x13, x13, #1
	ldrsw	x12, [x19]
	cmp	x13, x12
	b.lt	LBB0_12
	b	LBB0_9
LBB0_13:
	cmp	w26, w22
	b.ne	LBB0_20
; %bb.14:
	mov	x0, x19
	bl	_alac_stereo_decorrelation
	ldr	w2, [x19, #24]
	b	LBB0_21
LBB0_15:
	stp	x25, x24, [sp, #8]
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_34
; %bb.16:
	mov	x22, #0
LBB0_17:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_18 Depth 2
	add	x23, sp, #8
	mov	x24, x20
LBB0_18:                                ;   Parent Loop BB0_17 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #48]
	ldr	w1, [x8, #8]
	ldr	x8, [x23], #8
	ldr	w2, [x8, x22, lsl #2]
	mov	x0, x21
	bl	_put_sbits
	subs	x24, x24, #1
	b.ne	LBB0_18
; %bb.19:                               ;   in Loop: Header=BB0_17 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x19]
	cmp	x22, x8
	b.lt	LBB0_17
	b	LBB0_34
LBB0_20:
	mov	w2, #0
	str	xzr, [x19, #24]
LBB0_21:
	mov	x0, x21
	mov	w1, #8
	bl	_put_bits
	ldr	w2, [x19, #28]
	mov	x0, x21
	mov	w1, #8
	bl	_put_bits
	mov	x22, #0
	b	LBB0_23
LBB0_22:                                ;   in Loop: Header=BB0_23 Depth=1
	add	x22, x22, #1
	cmp	x22, x20
	b.eq	LBB0_26
LBB0_23:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_25 Depth 2
	mov	x0, x19
	mov	x1, x22
	bl	_calc_predictor_params
	mov	x0, x21
	mov	w1, #4
	mov	w2, #0
	bl	_put_bits
	ldr	x8, [x19, #32]
	lsl	x23, x22, #4
	ldr	w2, [x8, x23]
	mov	x0, x21
	mov	w1, #4
	bl	_put_bits
	ldr	w2, [x19, #40]
	mov	x0, x21
	mov	w1, #3
	bl	_put_bits
	ldr	x8, [x19, #32]
	add	x8, x8, x23
	ldr	w2, [x8, #4]
	mov	x0, x21
	mov	w1, #5
	bl	_put_bits
	ldr	x8, [x19, #32]
	add	x9, x8, x23
	ldr	w9, [x9, #4]
	cmp	w9, #1
	b.lt	LBB0_22
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	mov	x24, #0
LBB0_25:                                ;   Parent Loop BB0_23 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x8, x8, x23
	ldr	x8, [x8, #8]
	ldr	w2, [x8, x24, lsl #2]
	mov	x0, x21
	mov	w1, #16
	bl	_put_sbits
	add	x24, x24, #1
	ldr	x8, [x19, #32]
	add	x9, x8, x23
	ldrsw	x9, [x9, #4]
	cmp	x24, x9
	b.lt	LBB0_25
	b	LBB0_22
LBB0_26:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_32
; %bb.27:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_32
; %bb.28:
	mov	x22, #0
LBB0_29:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_30 Depth 2
	mov	x23, #0
LBB0_30:                                ;   Parent Loop BB0_29 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w1, [x19, #4]
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x23, lsl #3]
	ldr	w2, [x8, x22, lsl #2]
	mov	x0, x21
	bl	_put_bits
	add	x23, x23, #1
	cmp	x20, x23
	b.ne	LBB0_30
; %bb.31:                               ;   in Loop: Header=BB0_29 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x19]
	cmp	x22, x8
	b.lt	LBB0_29
LBB0_32:
	mov	w21, #0
LBB0_33:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_alac_linear_predictor
	mov	x0, x19
	mov	x1, x21
	bl	_alac_entropy_coder
	add	w21, w21, #1
	cmp	w20, w21
	b.ne	LBB0_33
LBB0_34:
	ldr	x8, [sp, #40]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_36
; %bb.35:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_36:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_TYPE_CPE,4,2                   ; @TYPE_CPE
	.comm	_AV_SAMPLE_FMT_S32P,8,3         ; @AV_SAMPLE_FMT_S32P
	.no_dead_strip	_write_element
.subsections_via_symbols
