	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sds_read_header
_sds_read_header:                       ## @sds_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	movq	8(%rdi), %r12
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %r14
	movq	%rbx, %rdi
	movl	$4, %esi
	callq	_avio_skip
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_avio_skip
	movq	%rbx, %rdi
	callq	_avio_r8
                                        ## kill: def $eax killed $eax def $rax
	movl	%eax, (%r12)
	leal	-29(%rax), %ecx
	cmpl	$-22, %ecx
	ja	LBB0_3
## %bb.2:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_9
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_3:
	cmpl	$21, %eax
	movl	$160, %edx
	movl	$120, %ecx
	cmovbl	%edx, %ecx
	movq	_byte4_read@GOTPCREL(%rip), %rdx
	cmovbq	_byte3_read@GOTPCREL(%rip), %rdx
	cmpl	$14, %eax
	jae	LBB0_5
## %bb.4:
	movl	$240, %ecx
	movq	_byte2_read@GOTPCREL(%rip), %rdx
LBB0_5:
	movl	(%rdx), %eax
	movl	%eax, 8(%r12)
	movl	%ecx, 4(%r12)
	movq	_AV_CODEC_ID_PCM_U32LE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r14), %rcx
	movl	%eax, 12(%rcx)
	movq	%rbx, %rdi
	callq	_avio_rl24
	movl	%eax, %edi
	callq	_SDS_3BYTE_TO_INT_DECODE
	movl	%eax, %r15d
	movq	%rbx, %rdi
	movl	$11, %esi
	callq	_avio_skip
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r14), %rcx
	movl	%eax, 8(%rcx)
	movl	$1, (%rcx)
	testl	%r15d, %r15d
	je	LBB0_6
## %bb.7:
	movl	$1000000000, %eax               ## imm = 0x3B9ACA00
	xorl	%edx, %edx
	divl	%r15d
	jmp	LBB0_8
LBB0_6:
	movl	$16000, %eax                    ## imm = 0x3E80
LBB0_8:
	movl	%eax, 4(%rcx)
	movq	%rbx, %rdi
	callq	_avio_size
                                        ## kill: def $eax killed $eax def $rax
	movl	%eax, %ecx
	addl	$-21, %ecx
	movslq	%ecx, %rcx
	imulq	$-2130574327, %rcx, %rcx        ## imm = 0x81020409
	shrq	$32, %rcx
	addl	%ecx, %eax
	addl	$-21, %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	sarl	$6, %eax
	addl	%ecx, %eax
	imull	4(%r12), %eax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	movl	%ecx, (%r14)
	movq	8(%r14), %rax
	movl	4(%rax), %ecx
	movq	%r14, %rdi
	movl	$64, %esi
	movl	$1, %edx
	callq	_avpriv_set_pts_info
	xorl	%eax, %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_byte2_read,4,2                 ## @byte2_read
	.comm	_byte3_read,4,2                 ## @byte3_read
	.comm	_byte4_read,4,2                 ## @byte4_read
	.comm	_AV_CODEC_ID_PCM_U32LE,4,2      ## @AV_CODEC_ID_PCM_U32LE
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ## @AVMEDIA_TYPE_AUDIO
	.no_dead_strip	_sds_read_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sds_read_header
_sds_read_header:                       ; @sds_read_header
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldp	x20, x22, [x0]
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	mov	x0, x20
	mov	w1, #4
	bl	_avio_skip
	mov	x0, x20
	mov	w1, #2
	bl	_avio_skip
	mov	x0, x20
	bl	_avio_r8
	str	w0, [x22]
	sub	w8, w0, #29
	cmn	w8, #22
	b.hi	LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_3:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_4:
	mov	w8, #120
	mov	w9, #160
Lloh6:
	adrp	x10, _byte3_read@GOTPAGE
Lloh7:
	ldr	x10, [x10, _byte3_read@GOTPAGEOFF]
	cmp	w0, #21
	csel	w8, w9, w8, lo
Lloh8:
	adrp	x9, _byte4_read@GOTPAGE
Lloh9:
	ldr	x9, [x9, _byte4_read@GOTPAGEOFF]
	csel	x9, x10, x9, lo
	mov	w10, #240
	cmp	w0, #14
	csel	w8, w10, w8, lo
Lloh10:
	adrp	x10, _byte2_read@GOTPAGE
Lloh11:
	ldr	x10, [x10, _byte2_read@GOTPAGEOFF]
	csel	x9, x10, x9, lo
	ldr	w9, [x9]
	stp	w8, w9, [x22, #4]
Lloh12:
	adrp	x8, _AV_CODEC_ID_PCM_U32LE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AV_CODEC_ID_PCM_U32LE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ldr	x9, [x19, #8]
	str	w8, [x9, #12]
	mov	x0, x20
	bl	_avio_rl24
	bl	_SDS_3BYTE_TO_INT_DECODE
	mov	x21, x0
	mov	x0, x20
	mov	w1, #11
	bl	_avio_skip
Lloh15:
	adrp	x8, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	x9, [x19, #8]
	str	w8, [x9, #8]
	mov	w8, #1
	mov	w10, #16000
	mov	w11, #51712
	movk	w11, #15258, lsl #16
	udiv	w11, w11, w21
	cmp	w21, #0
	csel	w10, w10, w11, eq
	stp	w8, w10, [x9]
	mov	x0, x20
	bl	_avio_size
	sub	w8, w0, #21
	mov	w9, #1033
	movk	w9, #33026, lsl #16
	smull	x9, w8, w9
	lsr	x9, x9, #32
	add	w8, w9, w8
	asr	w9, w8, #6
	add	w8, w9, w8, lsr #31
	ldr	w9, [x22, #4]
	mul	w8, w8, w9
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #2
	str	w8, [x19]
	ldr	x8, [x19, #8]
	ldr	w3, [x8, #4]
	mov	x0, x19
	mov	w1, #64
	mov	w2, #1
	bl	_avpriv_set_pts_info
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_byte2_read,4,2                 ; @byte2_read
	.comm	_byte3_read,4,2                 ; @byte3_read
	.comm	_byte4_read,4,2                 ; @byte4_read
	.comm	_AV_CODEC_ID_PCM_U32LE,4,2      ; @AV_CODEC_ID_PCM_U32LE
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ; @AVMEDIA_TYPE_AUDIO
	.no_dead_strip	_sds_read_header
.subsections_via_symbols
