	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spdif_header_mpeg
_spdif_header_mpeg:                     ## @spdif_header_mpeg
	.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), %rax
	movl	4(%rax), %r13d
	movl	%r13d, %ebx
	shrl	%ebx
	andl	$3, %ebx
	je	LBB0_2
## %bb.1:
	shrq	$3, %r13
	movl	%r13d, %r15d
	andl	$3, %r15d
	cmpl	$1, %r15d
	je	LBB0_2
## %bb.3:
	movq	(%rdi), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	xorq	$3, %rbx
	movl	8(%rax), %r12d
	andl	$1, %r12d
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	xorl	%r14d, %r14d
	movl	%r15d, %ecx
	movl	%ebx, %r8d
	movl	%r12d, %r9d
	xorl	%eax, %eax
	callq	_av_log
	cmpl	$2, %r15d
	jne	LBB0_6
## %bb.4:
	testl	%r12d, %r12d
	je	LBB0_6
## %bb.5:
	movq	_IEC61937_MPEG2_EXT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 4(%rcx)
	movl	$4608, (%rcx)                   ## imm = 0x1200
	jmp	LBB0_7
LBB0_2:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%eax, %eax
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_7
LBB0_6:
	movq	_mpeg_data_type@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	andl	$1, %r13d
	movq	(%rax,%r13,8), %rax
	movl	(%rax,%rbx,4), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 4(%rcx)
	movq	_spdif_mpeg_pkt_offset@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r13,8), %rax
	movl	(%rax,%rbx,4), %eax
	movl	%eax, (%rcx)
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Wrong MPEG file format\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"version: %i layer: %i extension: %i\n"

	.comm	_IEC61937_MPEG2_EXT,4,2         ## @IEC61937_MPEG2_EXT
	.comm	_mpeg_data_type,8,3             ## @mpeg_data_type
	.comm	_spdif_mpeg_pkt_offset,8,3      ## @spdif_mpeg_pkt_offset
	.no_dead_strip	_spdif_header_mpeg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spdif_header_mpeg
_spdif_header_mpeg:                     ; @spdif_header_mpeg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	x8, [x1]
	ldr	w20, [x8, #4]
	ubfx	w21, w20, #3, #2
	ubfx	x9, x20, #1, #2
	cmp	w9, #0
	ccmp	w21, #1, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
Lloh5:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_2:
	ldr	x19, [x0]
	eor	x22, x9, #0x3
	ldr	w8, [x8, #8]
	and	w23, w8, #0x1
Lloh8:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x8, x22
	stp	x8, x23, [sp, #8]
	str	x21, [sp]
Lloh11:
	adrp	x2, l_.str.1@PAGE
Lloh12:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_av_log
	cmp	w21, #2
	mov	w0, #0
	ccmp	w23, #0, #4, eq
	b.ne	LBB0_4
; %bb.3:
Lloh13:
	adrp	x8, _mpeg_data_type@GOTPAGE
Lloh14:
	ldr	x8, [x8, _mpeg_data_type@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	ubfx	x9, x20, #3, #1
	lsl	x9, x9, #3
	ldr	x8, [x8, x9]
	lsl	x10, x22, #2
	ldr	w8, [x8, x10]
	str	w8, [x19, #4]
Lloh16:
	adrp	x8, _spdif_mpeg_pkt_offset@GOTPAGE
Lloh17:
	ldr	x8, [x8, _spdif_mpeg_pkt_offset@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	ldr	x8, [x8, x9]
	ldr	w8, [x8, x10]
	str	w8, [x19]
	b	LBB0_5
LBB0_4:
Lloh19:
	adrp	x8, _IEC61937_MPEG2_EXT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IEC61937_MPEG2_EXT@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	mov	w9, #4608
	stp	w9, w8, [x19]
LBB0_5:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Wrong MPEG file format\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"version: %i layer: %i extension: %i\n"

	.comm	_IEC61937_MPEG2_EXT,4,2         ; @IEC61937_MPEG2_EXT
	.comm	_mpeg_data_type,8,3             ; @mpeg_data_type
	.comm	_spdif_mpeg_pkt_offset,8,3      ; @spdif_mpeg_pkt_offset
	.no_dead_strip	_spdif_header_mpeg
.subsections_via_symbols
