	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_metadata
_handle_metadata:                       ## @handle_metadata
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %esi
	callq	_update_offset
	movl	%eax, %r14d
	leaq	8(%rbx), %r15
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_av_reallocp
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	8(%rdx), %rax
	movq	%rax, -56(%rbp)
	movq	(%r15), %rax
	movslq	%r14d, %rcx
	leaq	(%rax,%rcx,4), %rcx
	movq	%rcx, -48(%rbp)
	movl	(%rdx), %edx
	movq	_RTMP_HEADER@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %edx
	jle	LBB0_7
## %bb.3:
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	leaq	-56(%rbp), %r14
	movq	%r14, %rdi
	callq	_bytestream_get_byte
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	callq	_bytestream_get_be24
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_bytestream_get_be24
	movl	%eax, %r12d
	movq	%r14, %rdi
	callq	_bytestream_get_byte
	movl	%eax, %r14d
	leal	7(%r15), %eax
	movslq	%eax, %r13
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movslq	(%rcx), %rax
	shlq	$2, %rax
	addq	8(%rcx), %rax
	subq	-56(%rbp), %rax
	sarq	$2, %rax
	cmpq	%r13, %rax
	jl	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	shll	$24, %r14d
	orl	%r12d, %r14d
	movl	%r14d, %eax
	subl	%ebx, %eax
	testl	%ebx, %ebx
	cmovel	%ebx, %eax
	movl	-60(%rbp), %ebx                 ## 4-byte Reload
	addl	%eax, %ebx
	leaq	-48(%rbp), %r12
	movq	%r12, %rdi
	movl	-76(%rbp), %esi                 ## 4-byte Reload
	callq	_bytestream_put_byte
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_bytestream_put_be24
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_bytestream_put_be24
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	sarl	$24, %ebx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_bytestream_put_byte
	movq	-48(%rbp), %rdi
	movq	-56(%rbp), %rsi
	movl	%r13d, %edx
	callq	_memcpy
	movq	-48(%rbp), %rax
	movslq	%r15d, %rcx
	leaq	(%rax,%rcx,4), %rax
	addq	$12, %rax
	movq	%rax, -48(%rbp)
	movq	_RTMP_HEADER@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	addl	%r15d, %esi
	movq	%r12, %rdi
	callq	_bytestream_put_be32
	shlq	$2, %r13
	addq	-56(%rbp), %r13
	movq	%r13, -56(%rbp)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	subq	8(%rax), %r13
	sarq	$2, %r13
	movslq	(%rax), %rax
	movslq	(%rbx), %rcx
	subq	%rcx, %rax
	movl	%r14d, %ebx
	cmpq	%rax, %r13
	jl	LBB0_4
LBB0_6:
	movq	-48(%rbp), %rcx
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
LBB0_7:
	movslq	(%rbx), %rdx
	leaq	(%rax,%rdx,4), %rax
	cmpq	%rax, %rcx
	je	LBB0_8
## %bb.9:
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_av_log
	movq	-48(%rbp), %rcx
	subq	8(%rbx), %rcx
	shrq	$2, %rcx
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_1:
	movl	$0, 4(%rbx)
	xorl	%ecx, %ecx
LBB0_10:
	movl	%ecx, (%rbx)
	jmp	LBB0_11
LBB0_8:
	xorl	%eax, %eax
LBB0_11:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RTMP_HEADER,4,2                ## @RTMP_HEADER
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Incomplete flv packets in RTMP_PT_METADATA packet\n"

	.no_dead_strip	_handle_metadata
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_metadata
_handle_metadata:                       ; @handle_metadata
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
	ldr	w1, [x1]
	bl	_update_offset
	mov	x22, x0
	mov	x21, x19
	ldr	w1, [x21], #8
	mov	x0, x21
	bl	_av_reallocp
	tbnz	w0, #31, LBB0_8
; %bb.1:
	ldr	x10, [x20, #8]
	ldr	x9, [x21]
	add	x8, x9, w22, sxtw #2
	stp	x8, x10, [sp]
	ldr	w10, [x20]
Lloh0:
	adrp	x27, _RTMP_HEADER@GOTPAGE
Lloh1:
	ldr	x27, [x27, _RTMP_HEADER@GOTPAGEOFF]
	ldr	w11, [x27]
	cmp	w10, w11
	b.le	LBB0_6
; %bb.2:
	mov	w28, #0
	ldr	w22, [x20, #4]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #8
	bl	_bytestream_get_byte
	mov	x25, x0
	add	x0, sp, #8
	bl	_bytestream_get_be24
	mov	x23, x0
	add	x0, sp, #8
	bl	_bytestream_get_be24
	mov	x26, x0
	add	x0, sp, #8
	bl	_bytestream_get_byte
	sxtw	x24, w23
	add	x23, x24, #7
	ldr	x8, [x20, #8]
	ldrsw	x9, [x20]
	add	x8, x8, x9, lsl #2
	ldr	x9, [sp, #8]
	sub	x8, x8, x9
	cmp	x23, x8, asr #2
	b.gt	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	orr	w26, w26, w0, lsl #24
	sub	w8, w26, w28
	cmp	w28, #0
	csel	w8, wzr, w8, eq
	add	w22, w8, w22
	mov	x0, sp
	mov	x1, x25
	bl	_bytestream_put_byte
	mov	x0, sp
	mov	x1, x24
	bl	_bytestream_put_be24
	mov	x0, sp
	mov	x1, x22
	bl	_bytestream_put_be24
	asr	w1, w22, #24
	mov	x0, sp
	bl	_bytestream_put_byte
	ldp	x0, x1, [sp]
	mov	x2, x23
	bl	_memcpy
	ldr	x8, [sp]
	add	x8, x8, x24, lsl #2
	add	x8, x8, #12
	str	x8, [sp]
	ldr	w8, [x27]
	add	w1, w8, w24
	mov	x0, sp
	bl	_bytestream_put_be32
	ldr	x8, [sp, #8]
	add	x8, x8, x23, lsl #2
	str	x8, [sp, #8]
	ldr	x9, [x20, #8]
	sub	x8, x8, x9
	ldrsw	x9, [x20]
	ldrsw	x10, [x27]
	sub	x9, x9, x10
	cmp	x9, x8, asr #2
	mov	x28, x26
	b.gt	LBB0_3
LBB0_5:
	ldr	x8, [sp]
	ldr	x9, [x21]
LBB0_6:
	ldrsw	x10, [x19]
	add	x9, x9, x10, lsl #2
	cmp	x8, x9
	b.eq	LBB0_10
; %bb.7:
Lloh2:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
	mov	w0, #0
	ldr	x8, [sp]
	ldr	x9, [x19, #8]
	sub	x8, x8, x9
	lsr	x8, x8, #2
	b	LBB0_9
LBB0_8:
	mov	w8, #0
	str	wzr, [x19, #4]
LBB0_9:
	str	w8, [x19]
	b	LBB0_11
LBB0_10:
	mov	w0, #0
LBB0_11:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_RTMP_HEADER,4,2                ; @RTMP_HEADER
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Incomplete flv packets in RTMP_PT_METADATA packet\n"

	.no_dead_strip	_handle_metadata
.subsections_via_symbols
