	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function asf_read_payload
_asf_read_payload:                      ## @asf_read_payload
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	8(%rdi), %r13
	cmpl	$0, (%r13)
	je	LBB0_5
## %bb.1:
	movl	8(%r13), %eax
	testl	%eax, %eax
	js	LBB0_16
## %bb.2:
	movl	4(%r13), %esi
	movq	64(%r13), %rcx
	incq	%rax
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdx,8), %rdi
	cmpl	(%rdi), %esi
	je	LBB0_20
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_3
	jmp	LBB0_16
LBB0_5:
	movq	(%r12), %r15
	movq	%r15, %rdi
	callq	_avio_r8
	movq	_ASF_STREAM_NUM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	movl	%ecx, 4(%r13)
	movl	8(%r13), %edx
	testl	%edx, %edx
	jle	LBB0_13
## %bb.6:
	movq	64(%r13), %rsi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rsi,%rdi,8), %rbx
	cmpl	(%rbx), %ecx
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%rdi
	cmpq	%rdi, %rdx
	jne	LBB0_8
LBB0_13:
	movq	24(%r13), %rax
	movq	40(%r13), %rcx
	movq	16(%r13), %rsi
	addq	%rax, %rsi
	addq	32(%r13), %rcx
	cmpq	%rcx, %rsi
	jg	LBB0_16
## %bb.14:
	testq	%rax, %rax
	je	LBB0_15
## %bb.25:
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_avio_seek
	movq	_AV_LOG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r13), %ecx
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_av_log
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_20:
	movl	20(%rdi), %eax
	movl	%eax, 8(%r14)
	movl	16(%rdi), %eax
	movl	%eax, 4(%r14)
	movq	(%rcx,%rdx,8), %rax
	movl	4(%rax), %eax
	movl	%eax, (%r14)
	movq	%r12, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
LBB0_21:
	callq	_asf_read_subpayload
	testl	%eax, %eax
	jns	LBB0_23
	jmp	LBB0_24
LBB0_9:
	movl	4(%rbx), %ecx
	movl	%ecx, 32(%rbx)
	cmpl	$128, %eax
	jb	LBB0_11
## %bb.10:
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 20(%rbx)
LBB0_11:
	leaq	8(%rbx), %r15
	movq	_ASF_PL_MASK_MEDIA_OBJECT_NUMBER_LENGTH_FIELD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	48(%r13), %edi
	movq	_ASF_PL_FLAG_MEDIA_OBJECT_NUMBER_LENGTH_FIELD_@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_READ_LEN
	movq	_ASF_PL_MASK_OFFSET_INTO_MEDIA_OBJECT_LENGTH_FIELD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	48(%r13), %edi
	movq	_ASF_PL_FLAG_OFFSET_INTO_MEDIA_OBJECT_LENGTH_FIELD_@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_READ_LEN
	movq	_ASF_PL_MASK_REPLICATED_DATA_LENGTH_FIELD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	48(%r13), %edi
	movq	_ASF_PL_FLAG_REPLICATED_DATA_LENGTH_FIELD_@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	56(%r13), %rdx
	callq	_READ_LEN
	cmpq	$0, 80(%r13)
	je	LBB0_17
## %bb.12:
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_asf_read_multiple_payload
	testl	%eax, %eax
	jns	LBB0_23
	jmp	LBB0_24
LBB0_15:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_av_log
LBB0_16:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_24
LBB0_17:
	cmpq	$1, 56(%r13)
	jne	LBB0_19
## %bb.18:
	movl	$1, (%r13)
	movq	_READ_SINGLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 72(%r13)
	movl	20(%rbx), %eax
	movl	%eax, 8(%r14)
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	$1, %edx
	jmp	LBB0_21
LBB0_19:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_asf_read_single_payload
	testl	%eax, %eax
	js	LBB0_24
LBB0_23:
	xorl	%eax, %eax
LBB0_24:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ASF_STREAM_NUM,4,2             ## @ASF_STREAM_NUM
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid packet size 0.\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_AV_LOG_WARNING,4,2             ## @AV_LOG_WARNING
L_.str.1:                               ## @.str.1
	.asciz	"Skipping the stream with the invalid stream index %d.\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.comm	_ASF_PL_MASK_MEDIA_OBJECT_NUMBER_LENGTH_FIELD_SIZE,4,2 ## @ASF_PL_MASK_MEDIA_OBJECT_NUMBER_LENGTH_FIELD_SIZE
	.comm	_ASF_PL_FLAG_MEDIA_OBJECT_NUMBER_LENGTH_FIELD_,4,2 ## @ASF_PL_FLAG_MEDIA_OBJECT_NUMBER_LENGTH_FIELD_
	.comm	_ASF_PL_MASK_OFFSET_INTO_MEDIA_OBJECT_LENGTH_FIELD_SIZE,4,2 ## @ASF_PL_MASK_OFFSET_INTO_MEDIA_OBJECT_LENGTH_FIELD_SIZE
	.comm	_ASF_PL_FLAG_OFFSET_INTO_MEDIA_OBJECT_LENGTH_FIELD_,4,2 ## @ASF_PL_FLAG_OFFSET_INTO_MEDIA_OBJECT_LENGTH_FIELD_
	.comm	_ASF_PL_MASK_REPLICATED_DATA_LENGTH_FIELD_SIZE,4,2 ## @ASF_PL_MASK_REPLICATED_DATA_LENGTH_FIELD_SIZE
	.comm	_ASF_PL_FLAG_REPLICATED_DATA_LENGTH_FIELD_,4,2 ## @ASF_PL_FLAG_REPLICATED_DATA_LENGTH_FIELD_
	.comm	_READ_SINGLE,4,2                ## @READ_SINGLE
	.no_dead_strip	_asf_read_payload
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function asf_read_payload
_asf_read_payload:                      ; @asf_read_payload
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x22, [x0, #8]
	ldr	w8, [x22]
	cbz	w8, LBB0_5
; %bb.1:
	ldr	w10, [x22, #8]
	tbnz	w10, #31, LBB0_18
; %bb.2:
	ldr	w9, [x22, #4]
	ldr	x8, [x22, #64]
	add	x10, x10, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x8]
	ldr	w12, [x11]
	cmp	w9, w12
	b.eq	LBB0_12
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, #8
	subs	x10, x10, #1
	b.ne	LBB0_3
	b	LBB0_18
LBB0_5:
	ldr	x21, [x19]
	mov	x0, x21
	bl	_avio_r8
Lloh0:
	adrp	x8, _ASF_STREAM_NUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ASF_STREAM_NUM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w8, w8, w0
	str	w8, [x22, #4]
	ldr	w9, [x22, #8]
	cmp	w9, #1
	b.lt	LBB0_9
; %bb.6:
	ldr	x10, [x22, #64]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x23, [x10]
	ldr	w11, [x23]
	cmp	w8, w11
	b.eq	LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x10, x10, #8
	subs	x9, x9, #1
	b.ne	LBB0_7
LBB0_9:
	ldp	x9, x8, [x22, #16]
	add	x1, x8, x9
	ldp	x9, x10, [x22, #32]
	add	x9, x10, x9
	cmp	x1, x9
	b.gt	LBB0_18
; %bb.10:
	cbz	x8, LBB0_17
; %bb.11:
Lloh3:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_avio_seek
Lloh6:
	adrp	x8, _AV_LOG_WARNING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_LOG_WARNING@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w8, [x22, #4]
	str	x8, [sp]
Lloh9:
	adrp	x2, l_.str.1@PAGE
Lloh10:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh11:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_AVERROR
LBB0_12:
	ldr	d0, [x11, #16]
	stur	d0, [x20, #4]
	ldr	x8, [x8]
	ldr	w8, [x8, #4]
	str	w8, [x20]
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_asf_read_subpayload
	tbz	w0, #31, LBB0_22
	b	LBB0_23
LBB0_13:
	add	x21, x23, #8
	ldr	w8, [x23, #4]
	str	w8, [x23, #32]
	cmp	w0, #128
	b.lo	LBB0_15
; %bb.14:
Lloh14:
	adrp	x8, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldr	w9, [x23, #20]
	orr	w8, w9, w8
	str	w8, [x23, #20]
LBB0_15:
Lloh17:
	adrp	x8, _ASF_PL_MASK_MEDIA_OBJECT_NUMBER_LENGTH_FIELD_SIZE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ASF_PL_MASK_MEDIA_OBJECT_NUMBER_LENGTH_FIELD_SIZE@GOTPAGEOFF]
	ldr	w9, [x22, #48]
Lloh19:
	ldr	w8, [x8]
	and	w0, w8, w9
Lloh20:
	adrp	x8, _ASF_PL_FLAG_MEDIA_OBJECT_NUMBER_LENGTH_FIELD_@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ASF_PL_FLAG_MEDIA_OBJECT_NUMBER_LENGTH_FIELD_@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	bl	_READ_LEN
Lloh23:
	adrp	x8, _ASF_PL_MASK_OFFSET_INTO_MEDIA_OBJECT_LENGTH_FIELD_SIZE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ASF_PL_MASK_OFFSET_INTO_MEDIA_OBJECT_LENGTH_FIELD_SIZE@GOTPAGEOFF]
	ldr	w9, [x22, #48]
Lloh25:
	ldr	w8, [x8]
	and	w0, w8, w9
Lloh26:
	adrp	x8, _ASF_PL_FLAG_OFFSET_INTO_MEDIA_OBJECT_LENGTH_FIELD_@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ASF_PL_FLAG_OFFSET_INTO_MEDIA_OBJECT_LENGTH_FIELD_@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	bl	_READ_LEN
	ldr	w8, [x22, #48]
Lloh29:
	adrp	x9, _ASF_PL_MASK_REPLICATED_DATA_LENGTH_FIELD_SIZE@GOTPAGE
Lloh30:
	ldr	x9, [x9, _ASF_PL_MASK_REPLICATED_DATA_LENGTH_FIELD_SIZE@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	and	w0, w9, w8
Lloh32:
	adrp	x8, _ASF_PL_FLAG_REPLICATED_DATA_LENGTH_FIELD_@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ASF_PL_FLAG_REPLICATED_DATA_LENGTH_FIELD_@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	ldr	x2, [x22, #56]
	bl	_READ_LEN
	ldr	x8, [x22, #80]
	cbz	x8, LBB0_19
; %bb.16:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_asf_read_multiple_payload
	tbz	w0, #31, LBB0_22
	b	LBB0_23
LBB0_17:
Lloh35:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh36:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
Lloh38:
	adrp	x2, l_.str@PAGE
Lloh39:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_18:
Lloh40:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh41:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh42:
	ldr	w0, [x8]
	b	LBB0_23
LBB0_19:
	ldr	x8, [x22, #56]
	cmp	x8, #1
	b.ne	LBB0_21
; %bb.20:
	str	w8, [x22]
Lloh43:
	adrp	x8, _READ_SINGLE@GOTPAGE
Lloh44:
	ldr	x8, [x8, _READ_SINGLE@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	str	w8, [x22, #72]
	ldr	w8, [x23, #20]
	str	w8, [x20, #8]
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_asf_read_subpayload
	tbz	w0, #31, LBB0_22
	b	LBB0_23
LBB0_21:
	mov	x0, x19
	mov	x1, x21
	bl	_asf_read_single_payload
	tbnz	w0, #31, LBB0_23
LBB0_22:
	mov	w0, #0
LBB0_23:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_ASF_STREAM_NUM,4,2             ; @ASF_STREAM_NUM
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid packet size 0.\n"

	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_AV_LOG_WARNING,4,2             ; @AV_LOG_WARNING
l_.str.1:                               ; @.str.1
	.asciz	"Skipping the stream with the invalid stream index %d.\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.comm	_ASF_PL_MASK_MEDIA_OBJECT_NUMBER_LENGTH_FIELD_SIZE,4,2 ; @ASF_PL_MASK_MEDIA_OBJECT_NUMBER_LENGTH_FIELD_SIZE
	.comm	_ASF_PL_FLAG_MEDIA_OBJECT_NUMBER_LENGTH_FIELD_,4,2 ; @ASF_PL_FLAG_MEDIA_OBJECT_NUMBER_LENGTH_FIELD_
	.comm	_ASF_PL_MASK_OFFSET_INTO_MEDIA_OBJECT_LENGTH_FIELD_SIZE,4,2 ; @ASF_PL_MASK_OFFSET_INTO_MEDIA_OBJECT_LENGTH_FIELD_SIZE
	.comm	_ASF_PL_FLAG_OFFSET_INTO_MEDIA_OBJECT_LENGTH_FIELD_,4,2 ; @ASF_PL_FLAG_OFFSET_INTO_MEDIA_OBJECT_LENGTH_FIELD_
	.comm	_ASF_PL_MASK_REPLICATED_DATA_LENGTH_FIELD_SIZE,4,2 ; @ASF_PL_MASK_REPLICATED_DATA_LENGTH_FIELD_SIZE
	.comm	_ASF_PL_FLAG_REPLICATED_DATA_LENGTH_FIELD_,4,2 ; @ASF_PL_FLAG_REPLICATED_DATA_LENGTH_FIELD_
	.comm	_READ_SINGLE,4,2                ; @READ_SINGLE
	.no_dead_strip	_asf_read_payload
.subsections_via_symbols
