	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdx_read_header
_sdx_read_header:                       ## @sdx_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	movl	$4, %esi
	callq	_avio_skip
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_avio_feof
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%rbx), %edi
	callq	_avio_r8
	cmpl	$26, %eax
	jne	LBB0_1
LBB0_3:
	movl	(%rbx), %edi
	callq	_avio_r8
	cmpl	$1, %eax
	jne	LBB0_4
## %bb.5:
	movl	(%rbx), %edi
	callq	_avio_r8
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_avio_skip
	movl	(%rbx), %edi
	movl	$4, %esi
	callq	_avio_skip
	movl	(%rbx), %edi
	callq	_avio_r8
	movl	%eax, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_avformat_new_stream
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	movq	%rax, %r15
	movq	_AVMEDIA_TYPE_AUDIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r15), %rcx
	movl	%eax, 16(%rcx)
	movl	$1, (%rcx)
	movl	(%rbx), %edi
	callq	_avio_rl32
	movq	(%r15), %rcx
	movl	%eax, 12(%rcx)
	leal	-8(%r14), %eax
	roll	$29, %eax
	cmpl	$4, %eax
	jae	LBB0_4
## %bb.7:
	cltq
	leaq	l_switch.table.sdx_read_header(%rip), %rdx
	movq	(%rdx,%rax,8), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rcx)
	movl	(%rbx), %edi
	movl	$16, %esi
	callq	_avio_skip
	leal	7(%r14), %eax
	testl	%r14d, %r14d
	cmovnsl	%r14d, %eax
	sarl	$3, %eax
	movq	(%r15), %rcx
	movl	%eax, 4(%rcx)
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_4:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ## @AVMEDIA_TYPE_AUDIO
	.comm	_AV_CODEC_ID_PCM_U8,4,2         ## @AV_CODEC_ID_PCM_U8
	.comm	_AV_CODEC_ID_PCM_U16LE,4,2      ## @AV_CODEC_ID_PCM_U16LE
	.comm	_AV_CODEC_ID_PCM_U24LE,4,2      ## @AV_CODEC_ID_PCM_U24LE
	.comm	_AV_CODEC_ID_PCM_U32LE,4,2      ## @AV_CODEC_ID_PCM_U32LE
	.no_dead_strip	_sdx_read_header
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.sdx_read_header
l_switch.table.sdx_read_header:
	.quad	_AV_CODEC_ID_PCM_U8
	.quad	_AV_CODEC_ID_PCM_U16LE
	.quad	_AV_CODEC_ID_PCM_U24LE
	.quad	_AV_CODEC_ID_PCM_U32LE

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdx_read_header
_sdx_read_header:                       ; @sdx_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
	mov	x19, x0
	ldr	w0, [x0]
	mov	w1, #4
	bl	_avio_skip
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	bl	_avio_feof
	cbnz	w0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x19]
	bl	_avio_r8
	cmp	w0, #26
	b.ne	LBB0_1
LBB0_3:
	ldr	w0, [x19]
	bl	_avio_r8
	cmp	w0, #1
	b.ne	LBB0_7
; %bb.4:
	ldr	w0, [x19]
	bl	_avio_r8
	mov	x1, x0
	ldr	w0, [x19]
	bl	_avio_skip
	ldr	w0, [x19]
	mov	w1, #4
	bl	_avio_skip
	ldr	w0, [x19]
	bl	_avio_r8
	mov	x20, x0
	mov	x0, x19
	mov	x1, #0
	bl	_avformat_new_stream
	cbz	x0, LBB0_9
; %bb.5:
	mov	x21, x0
Lloh0:
	adrp	x8, _AVMEDIA_TYPE_AUDIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVMEDIA_TYPE_AUDIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x9, [x0]
	str	w8, [x9, #16]
	mov	w8, #1
	str	w8, [x9]
	ldr	w0, [x19]
	bl	_avio_rl32
	ldr	x8, [x21]
	str	w0, [x8, #12]
	sub	w9, w20, #8
	ror	w9, w9, #3
	cmp	w9, #4
	b.hs	LBB0_7
; %bb.6:
Lloh3:
	adrp	x10, l_switch.table.sdx_read_header@PAGE
Lloh4:
	add	x10, x10, l_switch.table.sdx_read_header@PAGEOFF
	ldr	x9, [x10, w9, sxtw #3]
	ldr	w9, [x9]
	str	w9, [x8, #8]
	ldr	w0, [x19]
	mov	w1, #16
	bl	_avio_skip
	mov	w0, #0
	add	w8, w20, #7
	cmp	w20, #0
	csel	w8, w8, w20, lt
	asr	w8, w8, #3
	ldr	x9, [x21]
	str	w8, [x9, #4]
	b	LBB0_8
LBB0_7:
Lloh5:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
LBB0_8:
	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
LBB0_9:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AVMEDIA_TYPE_AUDIO,4,2         ; @AVMEDIA_TYPE_AUDIO
	.comm	_AV_CODEC_ID_PCM_U8,4,2         ; @AV_CODEC_ID_PCM_U8
	.comm	_AV_CODEC_ID_PCM_U16LE,4,2      ; @AV_CODEC_ID_PCM_U16LE
	.comm	_AV_CODEC_ID_PCM_U24LE,4,2      ; @AV_CODEC_ID_PCM_U24LE
	.comm	_AV_CODEC_ID_PCM_U32LE,4,2      ; @AV_CODEC_ID_PCM_U32LE
	.no_dead_strip	_sdx_read_header
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.sdx_read_header
l_switch.table.sdx_read_header:
	.quad	_AV_CODEC_ID_PCM_U8
	.quad	_AV_CODEC_ID_PCM_U16LE
	.quad	_AV_CODEC_ID_PCM_U24LE
	.quad	_AV_CODEC_ID_PCM_U32LE

.subsections_via_symbols
