	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_chunk_header
_get_chunk_header:                      ## @get_chunk_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_CHUNK_HEADER_LENGTH@GOTPCREL(%rip), %r14
	movl	(%r14), %r13d
	movq	%r13, %rax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movq	_EXT_HEADER_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movl	4(%r15), %edi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	callq	_ffurl_read_complete
	cmpl	(%r14), %eax
	jne	LBB0_1
## %bb.3:
	movq	%rbx, %rdi
	callq	_AV_RL16
	movl	%eax, %r13d
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_AV_RL16
	movl	%eax, %ebx
	leal	-128(%r13), %eax
	cmpl	$4, %eax
	jae	LBB0_4
## %bb.5:
	cltq
	leaq	L_switch.table.get_chunk_header(%rip), %rcx
	movl	(%rcx,%rax,4), %r14d
	movl	4(%r15), %edi
	movq	%r12, %rsi
	movl	%r14d, %edx
	callq	_ffurl_read_complete
	cmpl	%r14d, %eax
	jne	LBB0_6
## %bb.7:
	subl	%r14d, %ebx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%ebx, (%rax)
	movl	%r13d, %eax
	addl	$-129, %eax
	cmpl	$1, %eax
	ja	LBB0_9
## %bb.8:
	movq	%r12, %rdi
	callq	_AV_RL32
	movl	%eax, (%r15)
	jmp	LBB0_9
LBB0_1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_2
LBB0_4:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	xorl	%edi, %edi
	movl	%r13d, %ecx
	xorl	%eax, %eax
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_9
LBB0_6:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
LBB0_2:
	xorl	%edi, %edi
	xorl	%eax, %eax
	callq	_av_log
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %r13d
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	movl	%r13d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CHUNK_HEADER_LENGTH,4,2        ## @CHUNK_HEADER_LENGTH
	.comm	_EXT_HEADER_LENGTH,4,2          ## @EXT_HEADER_LENGTH
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Read data packet header failed!\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"Strange chunk type %d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
L_.str.2:                               ## @.str.2
	.asciz	"Read ext header failed!\n"

	.no_dead_strip	_get_chunk_header
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ## @switch.table.get_chunk_header
L_switch.table.get_chunk_header:
	.long	4                               ## 0x4
	.long	4                               ## 0x4
	.long	8                               ## 0x8
	.long	8                               ## 0x8

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_chunk_header
_get_chunk_header:                      ; @get_chunk_header
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	sub	sp, sp, #16
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x21, _CHUNK_HEADER_LENGTH@GOTPAGE
Lloh4:
	ldr	x21, [x21, _CHUNK_HEADER_LENGTH@GOTPAGEOFF]
	ldr	w2, [x21]
	lsl	x8, x2, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x23, x9, x8
	mov	sp, x23
Lloh7:
	adrp	x8, _EXT_HEADER_LENGTH@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EXT_HEADER_LENGTH@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh10:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh11:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	ldr	w0, [x0, #4]
	mov	x1, x23
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_ffurl_read_complete
	ldr	w8, [x21]
	cmp	w0, w8
	b.ne	LBB0_5
; %bb.1:
	mov	x0, x23
	bl	_AV_RL16
	mov	x21, x0
	add	x0, x23, #8
	bl	_AV_RL16
	sub	w8, w21, #128
	cmp	w8, #4
	b.hs	LBB0_6
; %bb.2:
	mov	x23, x0
Lloh12:
	adrp	x9, l_switch.table.get_chunk_header@PAGE
Lloh13:
	add	x9, x9, l_switch.table.get_chunk_header@PAGEOFF
	ldr	w24, [x9, w8, sxtw #2]
	ldr	w0, [x19, #4]
	mov	x1, x22
	mov	x2, x24
	bl	_ffurl_read_complete
	cmp	w0, w24
	b.ne	LBB0_7
; %bb.3:
	sub	w8, w23, w24
	str	w8, [x20]
	sub	w8, w21, #129
	cmp	w8, #1
	b.hi	LBB0_9
; %bb.4:
	mov	x0, x22
	bl	_AV_RL32
	str	w0, [x19]
	b	LBB0_9
LBB0_5:
Lloh14:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x2, l_.str@PAGE
Lloh18:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_8
LBB0_6:
Lloh19:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	str	x21, [sp, #-16]!
Lloh22:
	adrp	x2, l_.str.1@PAGE
Lloh23:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, #0
	bl	_av_log
	add	sp, sp, #16
Lloh24:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh26:
	ldr	w21, [x8]
	b	LBB0_9
LBB0_7:
Lloh27:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x2, l_.str.2@PAGE
Lloh31:
	add	x2, x2, l_.str.2@PAGEOFF
LBB0_8:
	mov	x0, #0
	bl	_av_log
Lloh32:
	adrp	x8, _EIO@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x21, x0
LBB0_9:
	ldur	x8, [x29, #-56]
Lloh35:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh36:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x21
	sub	sp, x29, #48
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_CHUNK_HEADER_LENGTH,4,2        ; @CHUNK_HEADER_LENGTH
	.comm	_EXT_HEADER_LENGTH,4,2          ; @EXT_HEADER_LENGTH
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Read data packet header failed!\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"Strange chunk type %d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
l_.str.2:                               ; @.str.2
	.asciz	"Read ext header failed!\n"

	.no_dead_strip	_get_chunk_header
	.section	__TEXT,__literal16,16byte_literals
	.p2align	2                               ; @switch.table.get_chunk_header
l_switch.table.get_chunk_header:
	.long	4                               ; 0x4
	.long	4                               ; 0x4
	.long	8                               ; 0x8
	.long	8                               ; 0x8

.subsections_via_symbols
