	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dsf_read_header
_dsf_read_header:                       ## @dsf_read_header
	.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	%rdi, %r14
	movq	8(%rdi), %r13
	movq	16(%rdi), %r12
	movq	%r13, %rdi
	movl	$4, %esi
	callq	_avio_skip
	movq	%r13, %rdi
	callq	_avio_rl64
	cmpl	$28, %eax
	jne	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_27
## %bb.3:
	movq	%rax, %r15
	movq	%r13, %rdi
	movl	$8, %esi
	callq	_avio_skip
	movq	%r13, %rdi
	callq	_avio_rl64
	movq	_AVIO_SEEKABLE_NORMAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r13)
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_read_id3
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	$28, %esi
	callq	_avio_seek
LBB0_5:
	movq	%r13, %rdi
	callq	_avio_rl32
	movl	%eax, %ebx
	movl	$102, %edi
	movl	$109, %esi
	movl	$116, %edx
	movl	$32, %ecx
	callq	_MKTAG
	cmpl	%eax, %ebx
	jne	LBB0_1
## %bb.6:
	movq	%r13, %rdi
	callq	_avio_rl64
	cmpl	$52, %eax
	jne	LBB0_1
## %bb.7:
	movq	%r13, %rdi
	callq	_avio_rl32
	cmpl	$1, %eax
	jne	LBB0_8
## %bb.10:
	movq	%r13, %rdi
	callq	_avio_rl32
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_9
LBB0_27:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_8:
	leaq	L_.str(%rip), %rsi
LBB0_9:
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_avpriv_request_sample
LBB0_1:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_26:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	%r13, %rdi
	callq	_avio_rl32
	movl	%eax, %ebx
	movq	_dsf_channel_layout@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_FF_ARRAY_ELEMS
	cmpl	%eax, %ebx
	jae	LBB0_13
## %bb.14:
	movq	_dsf_channel_layout@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %ecx
	movl	(%rax,%rcx,4), %ecx
	movq	(%r15), %rax
	movl	%ecx, 32(%rax)
	jmp	LBB0_15
LBB0_13:
	movq	(%r15), %rax
	movl	32(%rax), %ecx
LBB0_15:
	testl	%ecx, %ecx
	jne	LBB0_17
## %bb.16:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_avpriv_request_sample
	movq	(%r15), %rax
LBB0_17:
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 28(%rax)
	movq	%r13, %rdi
	callq	_avio_rl32
	movq	(%r15), %rcx
	movl	%eax, (%rcx)
	movq	%r13, %rdi
	callq	_avio_rl32
                                        ## kill: def $eax killed $eax def $rax
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	movq	(%r15), %rax
	movl	%ecx, 4(%rax)
	cmpl	$0, (%rax)
	jle	LBB0_1
## %bb.18:
	movq	%r13, %rdi
	callq	_avio_rl32
	cmpl	$1, %eax
	je	LBB0_19
## %bb.20:
	cmpl	$8, %eax
	jne	LBB0_28
## %bb.21:
	movq	_AV_CODEC_ID_DSD_MSBF_PLANAR@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_19:
	movq	_AV_CODEC_ID_DSD_LSBF_PLANAR@GOTPCREL(%rip), %rax
LBB0_22:
	movl	(%rax), %eax
	movq	(%r15), %rcx
	movl	%eax, 24(%rcx)
	movq	%r13, %rdi
	callq	_avio_rl64
                                        ## kill: def $eax killed $eax def $rax
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	movq	(%r15), %rax
	imull	(%rax), %ecx
	movl	%ecx, (%r12)
	movq	%r13, %rdi
	callq	_avio_rl32
	movl	%eax, %ecx
	movq	(%r15), %rsi
	movl	%eax, 8(%rsi)
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movslq	(%rsi), %rdi
	cltd
	idivl	%edi
	cmpl	%eax, %ecx
	jle	LBB0_24
## %bb.23:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_9
LBB0_28:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_9
LBB0_24:
	imull	%edi, %ecx
	movl	%ecx, 8(%rsi)
	movslq	4(%rsi), %rcx
	imulq	%rcx, %rdi
	shlq	$3, %rdi
	movq	%rdi, 16(%rsi)
	movq	%r15, %rdi
	movl	$64, %esi
	movl	$1, %edx
	callq	_avpriv_set_pts_info
	movq	%r13, %rdi
	movl	$4, %esi
	callq	_avio_skip
	movq	%r13, %rdi
	callq	_avio_tell
	movl	%eax, 4(%r12)
	movq	%r13, %rdi
	callq	_avio_rl32
	movl	%eax, %ebx
	movl	$100, %edi
	movl	$97, %esi
	movl	$116, %edx
	movl	$97, %ecx
	callq	_MKTAG
	cmpl	%eax, %ebx
	jne	LBB0_1
## %bb.25:
	movq	%r13, %rdi
	callq	_avio_rl64
                                        ## kill: def $eax killed $eax def $rax
	leal	-12(%rax), %ecx
	movl	%ecx, 8(%r12)
	addl	%eax, 4(%r12)
	movq	%r13, %rdi
	callq	_avio_tell
	movq	(%r14), %rcx
	movq	%rax, (%rcx)
	xorl	%eax, %eax
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVIO_SEEKABLE_NORMAL,4,2       ## @AVIO_SEEKABLE_NORMAL
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unknown format version"

L_.str.1:                               ## @.str.1
	.asciz	"unknown format id"

	.comm	_dsf_channel_layout,8,3         ## @dsf_channel_layout
L_.str.2:                               ## @.str.2
	.asciz	"channel type %i"

	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ## @AVMEDIA_TYPE_AUDIO
	.comm	_AV_CODEC_ID_DSD_LSBF_PLANAR,4,2 ## @AV_CODEC_ID_DSD_LSBF_PLANAR
	.comm	_AV_CODEC_ID_DSD_MSBF_PLANAR,4,2 ## @AV_CODEC_ID_DSD_MSBF_PLANAR
L_.str.3:                               ## @.str.3
	.asciz	"unknown most significant bit"

	.comm	_INT_MAX,4,2                    ## @INT_MAX
L_.str.4:                               ## @.str.4
	.asciz	"block_align overflow"

	.no_dead_strip	_dsf_read_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dsf_read_header
_dsf_read_header:                       ; @dsf_read_header
	.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
	mov	x19, x0
	ldp	x20, x23, [x0, #8]
	mov	x0, x20
	mov	w1, #4
	bl	_avio_skip
	mov	x0, x20
	bl	_avio_rl64
	cmp	w0, #28
	b.ne	LBB0_12
; %bb.1:
	mov	x0, x19
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_9
; %bb.2:
	mov	x21, x0
	mov	x0, x20
	mov	w1, #8
	bl	_avio_skip
	mov	x0, x20
	bl	_avio_rl64
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _AVIO_SEEKABLE_NORMAL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AVIO_SEEKABLE_NORMAL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	mov	x1, x0
	mov	x0, x19
	bl	_read_id3
Lloh3:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #28
	bl	_avio_seek
LBB0_4:
	mov	x0, x20
	bl	_avio_rl32
	mov	x22, x0
	mov	w0, #102
	mov	w1, #109
	mov	w2, #116
	mov	w3, #32
	bl	_MKTAG
	cmp	w22, w0
	b.ne	LBB0_12
; %bb.5:
	mov	x0, x20
	bl	_avio_rl64
	cmp	w0, #52
	b.ne	LBB0_12
; %bb.6:
	mov	x0, x20
	bl	_avio_rl32
	cmp	w0, #1
	b.ne	LBB0_10
; %bb.7:
	mov	x0, x20
	bl	_avio_rl32
	cbz	w0, LBB0_14
; %bb.8:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_11
LBB0_9:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	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
	b	_AVERROR
LBB0_10:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
LBB0_11:
	mov	x0, x19
	bl	_avpriv_request_sample
LBB0_12:
Lloh13:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
LBB0_13:
	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_14:
	mov	x0, x20
	bl	_avio_rl32
	mov	x22, x0
Lloh16:
	adrp	x24, _dsf_channel_layout@GOTPAGE
Lloh17:
	ldr	x24, [x24, _dsf_channel_layout@GOTPAGEOFF]
	ldr	x0, [x24]
	bl	_FF_ARRAY_ELEMS
	cmp	w22, w0
	b.hs	LBB0_16
; %bb.15:
	ldr	x8, [x24]
	ldr	w9, [x8, w22, uxtw #2]
	ldr	x8, [x21]
	str	w9, [x8, #32]
	b	LBB0_17
LBB0_16:
	ldr	x8, [x21]
	ldr	w9, [x8, #32]
LBB0_17:
	cbnz	w9, LBB0_19
; %bb.18:
	str	x22, [sp]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_avpriv_request_sample
	ldr	x8, [x21]
LBB0_19:
Lloh20:
	adrp	x9, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh21:
	ldr	x9, [x9, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	str	w9, [x8, #28]
	mov	x0, x20
	bl	_avio_rl32
	ldr	x8, [x21]
	str	w0, [x8]
	mov	x0, x20
	bl	_avio_rl32
	add	w8, w0, #7
	cmp	w0, #0
	csel	w8, w8, w0, lt
	asr	w8, w8, #3
	ldr	x9, [x21]
	str	w8, [x9, #4]
	ldr	w8, [x9]
	cmp	w8, #0
	b.le	LBB0_12
; %bb.20:
	mov	x0, x20
	bl	_avio_rl32
	cmp	w0, #1
	b.eq	LBB0_23
; %bb.21:
	cmp	w0, #8
	b.ne	LBB0_26
; %bb.22:
Lloh23:
	adrp	x8, _AV_CODEC_ID_DSD_MSBF_PLANAR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _AV_CODEC_ID_DSD_MSBF_PLANAR@GOTPAGEOFF]
	b	LBB0_24
LBB0_23:
Lloh25:
	adrp	x8, _AV_CODEC_ID_DSD_LSBF_PLANAR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AV_CODEC_ID_DSD_LSBF_PLANAR@GOTPAGEOFF]
LBB0_24:
	ldr	w8, [x8]
	ldr	x9, [x21]
	str	w8, [x9, #24]
	mov	x0, x20
	bl	_avio_rl64
	add	w8, w0, #7
	cmp	w0, #0
	csel	w8, w8, w0, lt
	asr	w8, w8, #3
	ldr	x9, [x21]
	ldr	w9, [x9]
	mul	w8, w9, w8
	str	w8, [x23]
	mov	x0, x20
	bl	_avio_rl32
	ldr	x8, [x21]
	str	w0, [x8, #8]
Lloh27:
	adrp	x9, _INT_MAX@GOTPAGE
Lloh28:
	ldr	x9, [x9, _INT_MAX@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x9]
	ldr	w9, [x8]
	sdiv	w10, w10, w9
	cmp	w0, w10
	b.le	LBB0_27
; %bb.25:
Lloh30:
	adrp	x1, l_.str.4@PAGE
Lloh31:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_11
LBB0_26:
Lloh32:
	adrp	x1, l_.str.3@PAGE
Lloh33:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_11
LBB0_27:
	mul	w10, w9, w0
	str	w10, [x8, #8]
	ldrsw	x3, [x8, #4]
	mul	w9, w3, w9
	sbfiz	x9, x9, #3, #32
	str	x9, [x8, #16]
	mov	x0, x21
	mov	w1, #64
	mov	w2, #1
	bl	_avpriv_set_pts_info
	mov	x0, x20
	mov	w1, #4
	bl	_avio_skip
	mov	x0, x20
	bl	_avio_tell
	str	w0, [x23, #4]
	mov	x0, x20
	bl	_avio_rl32
	mov	x21, x0
	mov	w0, #100
	mov	w1, #97
	mov	w2, #116
	mov	w3, #97
	bl	_MKTAG
	cmp	w21, w0
	b.ne	LBB0_12
; %bb.28:
	mov	x0, x20
	bl	_avio_rl64
	add	x8, x23, #4
	mvni.2s	v0, #11
	ld1.s	{ v0 }[0], [x8]
	dup.2s	v1, w0
	add.2s	v0, v0, v1
	stur	d0, [x23, #4]
	mov	x0, x20
	bl	_avio_tell
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x19]
	str	x8, [x9]
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVIO_SEEKABLE_NORMAL,4,2       ; @AVIO_SEEKABLE_NORMAL
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unknown format version"

l_.str.1:                               ; @.str.1
	.asciz	"unknown format id"

	.comm	_dsf_channel_layout,8,3         ; @dsf_channel_layout
l_.str.2:                               ; @.str.2
	.asciz	"channel type %i"

	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ; @AVMEDIA_TYPE_AUDIO
	.comm	_AV_CODEC_ID_DSD_LSBF_PLANAR,4,2 ; @AV_CODEC_ID_DSD_LSBF_PLANAR
	.comm	_AV_CODEC_ID_DSD_MSBF_PLANAR,4,2 ; @AV_CODEC_ID_DSD_MSBF_PLANAR
l_.str.3:                               ; @.str.3
	.asciz	"unknown most significant bit"

	.comm	_INT_MAX,4,2                    ; @INT_MAX
l_.str.4:                               ; @.str.4
	.asciz	"block_align overflow"

	.no_dead_strip	_dsf_read_header
.subsections_via_symbols
