	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_spdif
_set_spdif:                             ## @set_spdif
	.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	_CONFIG_SPDIF_DEMUXER@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.1:
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	cmpl	$1, (%rax)
	jne	LBB0_11
## %bb.2:
	movq	%rsi, %r14
	movl	(%rbx), %edi
	movl	$65536, %esi                    ## imm = 0x10000
	callq	_ffio_ensure_seekback
	testl	%eax, %eax
	js	LBB0_10
## %bb.3:
	movl	$65536, %edi                    ## imm = 0x10000
	callq	_av_malloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	movl	(%rbx), %edi
	callq	_avio_tell
	movl	%eax, %r13d
	movl	(%rbx), %edi
	movq	%r15, %rsi
	movl	$65536, %edx                    ## imm = 0x10000
	callq	_avio_read
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_8
## %bb.6:
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_ff_spdif_probe
	movl	%eax, %r12d
	movq	_AVPROBE_SCORE_EXTENSION@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jle	LBB0_8
## %bb.7:
	movl	-44(%rbp), %eax
	movq	8(%rbx), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	movl	%eax, 4(%rcx)
	movl	$1, (%r14)
LBB0_8:
	movl	(%rbx), %edi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r13d, %esi
	callq	_avio_seek
	movq	%r15, %rdi
	callq	_av_free
	testl	%r12d, %r12d
	jns	LBB0_11
LBB0_10:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_av_log
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r12d
	testl	%r12d, %r12d
	jns	LBB0_11
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_CONFIG_SPDIF_DEMUXER,8,3       ## @CONFIG_SPDIF_DEMUXER
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVPROBE_SCORE_EXTENSION,4,2    ## @AVPROBE_SCORE_EXTENSION
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot check for SPDIF\n"

	.no_dead_strip	_set_spdif
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_spdif
_set_spdif:                             ; @set_spdif
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, _CONFIG_SPDIF_DEMUXER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONFIG_SPDIF_DEMUXER@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_9
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	w8, [x8]
	cmp	w8, #1
	b.ne	LBB0_9
; %bb.2:
	mov	x20, x1
	ldr	w0, [x19]
	mov	w1, #65536
	bl	_ffio_ensure_seekback
	tbnz	w0, #31, LBB0_8
; %bb.3:
	mov	w0, #65536
	bl	_av_malloc
	cbz	x0, LBB0_10
; %bb.4:
	mov	x21, x0
	ldr	w0, [x19]
	bl	_avio_tell
	mov	x23, x0
	ldr	w0, [x19]
	mov	x1, x21
	mov	w2, #65536
	bl	_avio_read
	mov	x22, x0
	tbnz	w0, #31, LBB0_7
; %bb.5:
	add	x2, sp, #12
	mov	x0, x21
	mov	x1, x22
	bl	_ff_spdif_probe
	mov	x22, x0
Lloh3:
	adrp	x8, _AVPROBE_SCORE_EXTENSION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVPROBE_SCORE_EXTENSION@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.le	LBB0_7
; %bb.6:
	ldr	w8, [sp, #12]
	ldr	x9, [x19, #8]
	ldr	x9, [x9]
	ldr	x9, [x9]
	str	w8, [x9, #4]
	mov	w8, #1
	str	w8, [x20]
LBB0_7:
	ldr	w0, [x19]
Lloh6:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x1, x23
	bl	_avio_seek
	mov	x0, x21
	bl	_av_free
	tbz	w22, #31, LBB0_9
LBB0_8:
Lloh9:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_10:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x22, x0
	tbz	w22, #31, LBB0_9
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIG_SPDIF_DEMUXER,8,3       ; @CONFIG_SPDIF_DEMUXER
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVPROBE_SCORE_EXTENSION,4,2    ; @AVPROBE_SCORE_EXTENSION
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot check for SPDIF\n"

	.no_dead_strip	_set_spdif
.subsections_via_symbols
