	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spdif_header_truehd
_spdif_header_truehd:                   ## @spdif_header_truehd
	.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	%rsi, %r14
	movq	%rdi, %r15
	movq	(%rdi), %rbx
	movl	(%rbx), %eax
	cmpl	$12, %eax
	je	LBB0_3
## %bb.1:
	xorl	%r12d, %r12d
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	movq	_BURST_HEADER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	addl	$20, %r12d
	movq	16(%rbx), %rdi
	leaq	_spdif_header_truehd.mat_start_code(%rip), %rsi
	movl	$20, %edx
	jmp	LBB0_4
LBB0_3:
	movq	_MAT_MIDDLE_CODE_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	12(%rax), %r12d
	movq	_TRUEHD_FRAME_OFFSET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leal	(%rcx,%rcx,2), %ecx
	movq	_BURST_HEADER_SIZE@GOTPCREL(%rip), %rdx
	subl	(%rdx), %eax
	leal	(%rax,%rcx,4), %eax
	movslq	%eax, %rdi
	shlq	$2, %rdi
	addq	16(%rbx), %rdi
	leaq	_spdif_header_truehd.mat_middle_code(%rip), %rsi
	movl	$12, %edx
LBB0_4:
	callq	_memcpy
LBB0_5:
	movl	(%r14), %edx
	movq	_TRUEHD_FRAME_OFFSET@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	movl	%eax, %ecx
	subl	%r12d, %ecx
	cmpl	%ecx, %edx
	jle	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_avpriv_request_sample
	movq	_AVERROR_PATCHWELCOME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_14
LBB0_7:
	imull	(%rbx), %eax
	movq	_BURST_HEADER_SIZE@GOTPCREL(%rip), %r15
	movl	%r12d, %ecx
	subl	(%r15), %ecx
	addl	%eax, %ecx
	movslq	%ecx, %rdi
	shlq	$2, %rdi
	addq	16(%rbx), %rdi
	movq	8(%r14), %rsi
	callq	_memcpy
	movl	(%rbx), %eax
	cmpl	$22, %eax
	jg	LBB0_9
## %bb.8:
	movl	(%r13), %ecx
	addl	(%r14), %r12d
	movl	%r12d, %edx
	subl	(%r15), %edx
	imull	%ecx, %eax
	addl	%eax, %edx
	movslq	%edx, %rdi
	shlq	$2, %rdi
	addq	16(%rbx), %rdi
	subl	%r12d, %ecx
	movslq	%ecx, %rdx
	jmp	LBB0_10
LBB0_9:
	movq	_MAT_FRAME_SIZE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rdi
	imull	(%r13), %eax
	movl	(%r15), %ecx
	addl	%edi, %ecx
	addl	(%r14), %eax
	subl	%eax, %ecx
	movslq	%ecx, %rdx
	subq	%rdx, %rdi
	shlq	$2, %rdi
	addq	16(%rbx), %rdi
LBB0_10:
	xorl	%esi, %esi
	callq	_memset
	movl	(%rbx), %eax
	leal	1(%rax), %ecx
	movl	%ecx, (%rbx)
	cmpl	$22, %eax
	jg	LBB0_12
## %bb.11:
	movl	$0, 4(%rbx)
	jmp	LBB0_13
LBB0_12:
	movq	16(%rbx), %rax
	movq	_MAT_FRAME_SIZE@GOTPCREL(%rip), %r14
	movslq	(%r14), %rcx
	leaq	(%rax,%rcx,4), %rdi
	addq	$-64, %rdi
	leaq	_spdif_header_truehd.mat_end_code(%rip), %rsi
	movl	$16, %edx
	callq	_memcpy
	movl	$0, (%rbx)
	movq	_IEC61937_TRUEHD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movl	$61440, 4(%rbx)                 ## imm = 0xF000
	movq	16(%rbx), %rax
	movq	%rax, 24(%rbx)
	movl	(%r14), %eax
	movl	%eax, 8(%rbx)
	movl	%eax, 12(%rbx)
LBB0_13:
	xorl	%eax, %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @spdif_header_truehd.mat_end_code
_spdif_header_truehd.mat_end_code:
	.ascii	"\303\302\300\304\000\000\000\000\000\000\000\000\000\000\227\021"

	.p2align	4                               ## @spdif_header_truehd.mat_start_code
_spdif_header_truehd.mat_start_code:
	.ascii	"\007\236\000\003\204\001\001\001\200\000V\245;\364\201\203I\200w\340"

	.comm	_BURST_HEADER_SIZE,4,2          ## @BURST_HEADER_SIZE
_spdif_header_truehd.mat_middle_code:   ## @spdif_header_truehd.mat_middle_code
	.ascii	"\303\301BI;\372\202\203I\200w\340"

	.comm	_MAT_MIDDLE_CODE_OFFSET,4,2     ## @MAT_MIDDLE_CODE_OFFSET
	.comm	_TRUEHD_FRAME_OFFSET,4,2        ## @TRUEHD_FRAME_OFFSET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Too large TrueHD frame of %d bytes"

	.comm	_AVERROR_PATCHWELCOME,4,2       ## @AVERROR_PATCHWELCOME
	.comm	_MAT_FRAME_SIZE,4,2             ## @MAT_FRAME_SIZE
	.comm	_IEC61937_TRUEHD,4,2            ## @IEC61937_TRUEHD
	.no_dead_strip	_spdif_header_truehd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function spdif_header_truehd
lCPI0_0:
	.long	0                               ; 0x0
	.long	61440                           ; 0xf000
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_spdif_header_truehd:                   ; @spdif_header_truehd
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [x0]
	ldr	w8, [x21]
Lloh0:
	adrp	x22, _TRUEHD_FRAME_OFFSET@GOTPAGE
Lloh1:
	ldr	x22, [x22, _TRUEHD_FRAME_OFFSET@GOTPAGEOFF]
	cmp	w8, #12
	b.eq	LBB0_3
; %bb.1:
	cbnz	w8, LBB0_5
; %bb.2:
Lloh2:
	adrp	x8, _BURST_HEADER_SIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BURST_HEADER_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	add	w23, w8, #20
	ldr	x0, [x21, #16]
Lloh5:
	adrp	x1, _spdif_header_truehd.mat_start_code@PAGE
Lloh6:
	add	x1, x1, _spdif_header_truehd.mat_start_code@PAGEOFF
	mov	w2, #20
	b	LBB0_4
LBB0_3:
Lloh7:
	adrp	x8, _MAT_MIDDLE_CODE_OFFSET@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MAT_MIDDLE_CODE_OFFSET@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	add	w23, w8, #12
	ldr	x9, [x21, #16]
	ldr	w10, [x22]
	mov	w11, #12
Lloh10:
	adrp	x12, _BURST_HEADER_SIZE@GOTPAGE
Lloh11:
	ldr	x12, [x12, _BURST_HEADER_SIZE@GOTPAGEOFF]
Lloh12:
	ldr	w12, [x12]
	sub	w8, w8, w12
	madd	w8, w10, w11, w8
	add	x0, x9, w8, sxtw #2
Lloh13:
	adrp	x1, _spdif_header_truehd.mat_middle_code@PAGE
Lloh14:
	add	x1, x1, _spdif_header_truehd.mat_middle_code@PAGEOFF
	mov	w2, #12
LBB0_4:
	bl	_memcpy
	b	LBB0_6
LBB0_5:
	mov	w23, #0
LBB0_6:
	ldr	w2, [x19]
	ldr	w8, [x22]
	sub	w9, w8, w23
	cmp	w2, w9
	b.le	LBB0_8
; %bb.7:
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_avpriv_request_sample
Lloh17:
	adrp	x8, _AVERROR_PATCHWELCOME@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AVERROR_PATCHWELCOME@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	b	LBB0_14
LBB0_8:
	ldr	x9, [x21, #16]
Lloh20:
	adrp	x24, _BURST_HEADER_SIZE@GOTPAGE
Lloh21:
	ldr	x24, [x24, _BURST_HEADER_SIZE@GOTPAGEOFF]
	ldr	w10, [x21]
	ldr	w11, [x24]
	sub	w11, w23, w11
	madd	w8, w10, w8, w11
	add	x0, x9, w8, sxtw #2
	ldr	x1, [x19, #8]
	bl	_memcpy
	ldr	w8, [x21]
Lloh22:
	adrp	x20, _MAT_FRAME_SIZE@GOTPAGE
Lloh23:
	ldr	x20, [x20, _MAT_FRAME_SIZE@GOTPAGEOFF]
	cmp	w8, #22
	b.gt	LBB0_10
; %bb.9:
	ldr	x9, [x21, #16]
	ldr	w10, [x22]
	ldr	w11, [x24]
	ldr	w12, [x19]
	add	w12, w12, w23
	sub	w11, w12, w11
	madd	w8, w10, w8, w11
	add	x0, x9, w8, sxtw #2
	sub	w8, w10, w12
	sxtw	x2, w8
	b	LBB0_11
LBB0_10:
	ldrsw	x9, [x20]
	ldr	w10, [x22]
	ldr	w11, [x24]
	ldr	w12, [x19]
	madd	w8, w10, w8, w12
	add	w10, w11, w9
	sub	w8, w10, w8
	sxtw	x2, w8
	ldr	x8, [x21, #16]
	sub	x9, x9, x2
	add	x0, x8, x9, lsl #2
LBB0_11:
	mov	w1, #0
	bl	_memset
	ldr	w8, [x21]
	add	w9, w8, #1
	str	w9, [x21]
	cmp	w8, #22
	b.gt	LBB0_13
; %bb.12:
	mov	w0, #0
	str	wzr, [x21, #4]
	b	LBB0_14
LBB0_13:
	ldr	x8, [x21, #16]
	ldrsw	x9, [x20]
	add	x8, x8, x9, lsl #2
	sub	x0, x8, #64
Lloh24:
	adrp	x1, _spdif_header_truehd.mat_end_code@PAGE
Lloh25:
	add	x1, x1, _spdif_header_truehd.mat_end_code@PAGEOFF
	mov	w2, #16
	bl	_memcpy
	mov	w0, #0
Lloh26:
	adrp	x8, lCPI0_0@PAGE
Lloh27:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x21]
Lloh28:
	adrp	x8, _IEC61937_TRUEHD@GOTPAGE
Lloh29:
	ldr	x8, [x8, _IEC61937_TRUEHD@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	str	w8, [x21, #32]
	ldr	x8, [x21, #16]
	str	x8, [x21, #24]
	ldr	w8, [x20]
	stp	w8, w8, [x21, #8]
LBB0_14:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdrp	Lloh26, Lloh28
	.loh AdrpLdr	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
_spdif_header_truehd.mat_end_code:      ; @spdif_header_truehd.mat_end_code
	.ascii	"\303\302\300\304\000\000\000\000\000\000\000\000\000\000\227\021"

_spdif_header_truehd.mat_start_code:    ; @spdif_header_truehd.mat_start_code
	.ascii	"\007\236\000\003\204\001\001\001\200\000V\245;\364\201\203I\200w\340"

	.comm	_BURST_HEADER_SIZE,4,2          ; @BURST_HEADER_SIZE
_spdif_header_truehd.mat_middle_code:   ; @spdif_header_truehd.mat_middle_code
	.ascii	"\303\301BI;\372\202\203I\200w\340"

	.comm	_MAT_MIDDLE_CODE_OFFSET,4,2     ; @MAT_MIDDLE_CODE_OFFSET
	.comm	_TRUEHD_FRAME_OFFSET,4,2        ; @TRUEHD_FRAME_OFFSET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Too large TrueHD frame of %d bytes"

	.comm	_AVERROR_PATCHWELCOME,4,2       ; @AVERROR_PATCHWELCOME
	.comm	_MAT_FRAME_SIZE,4,2             ; @MAT_FRAME_SIZE
	.comm	_IEC61937_TRUEHD,4,2            ; @IEC61937_TRUEHD
	.no_dead_strip	_spdif_header_truehd
.subsections_via_symbols
