	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_chunk_type
_handle_chunk_type:                     ## @handle_chunk_type
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	$0, -12(%rbp)
	leaq	-12(%rbp), %rsi
	callq	_get_chunk_header
	cmpl	$128, %eax
	je	LBB0_4
## %bb.1:
	cmpl	$130, %eax
	je	LBB0_7
## %bb.2:
	cmpl	$129, %eax
	jne	LBB0_8
## %bb.3:
	movl	$0, (%rbx)
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%edi, %edi
	xorl	%eax, %eax
	callq	_av_log
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
	jmp	LBB0_9
LBB0_4:
	movl	$0, 4(%rbx)
	movq	%rbx, %rdi
	callq	_get_http_header_data
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	%eax, %ebx
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	xorl	%edi, %edi
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_9
LBB0_7:
	movl	-12(%rbp), %esi
	movq	%rbx, %rdi
	callq	_read_data_packet
	movl	%eax, %ebx
	jmp	LBB0_9
LBB0_8:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.2(%rip), %rdx
	xorl	%edi, %edi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_av_log
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_9
LBB0_5:
	xorl	%ebx, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Stream ended!\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"Stream changed! Failed to get new header!\n"

L_.str.2:                               ## @.str.2
	.asciz	"Recv other type packet %d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.no_dead_strip	_handle_chunk_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_chunk_type
_handle_chunk_type:                     ; @handle_chunk_type
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	str	wzr, [sp, #12]
	add	x1, sp, #12
	bl	_get_chunk_header
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w0, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w0, #130
	b.eq	LBB0_6
; %bb.2:
	cmp	w0, #129
	b.ne	LBB0_7
; %bb.3:
	str	wzr, [x19]
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, #0
	bl	_av_log
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x19, x0
	b	LBB0_8
LBB0_4:
	str	wzr, [x19, #4]
	mov	x0, x19
	bl	_get_http_header_data
	mov	x19, x0
	cbz	w0, LBB0_8
; %bb.5:
Lloh8:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str.1@PAGE
Lloh12:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, #0
	bl	_av_log
	b	LBB0_8
LBB0_6:
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_read_data_packet
	mov	x19, x0
	b	LBB0_8
LBB0_7:
Lloh13:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	str	x0, [sp]
Lloh16:
	adrp	x2, l_.str.2@PAGE
Lloh17:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, #0
	bl	_av_log
Lloh18:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh20:
	ldr	w19, [x8]
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Stream ended!\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"Stream changed! Failed to get new header!\n"

l_.str.2:                               ; @.str.2
	.asciz	"Recv other type packet %d\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.no_dead_strip	_handle_chunk_type
.subsections_via_symbols
