	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function asf_read_next_payload_header
_asf_read_next_payload_header:          ## @asf_read_next_payload_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	(%rax), %r13
	cmpq	$0, (%rsi)
	je	LBB0_1
LBB0_14:
	testq	%r12, %r12
	je	LBB0_16
## %bb.15:
	movq	8(%r13), %rax
	movl	56(%rbx), %ecx
	andl	$127, %ecx
	movq	(%rax,%rcx,8), %rax
	movq	%rax, (%r12)
LBB0_16:
	testq	%r15, %r15
	je	LBB0_18
## %bb.17:
	movq	(%rbx), %rax
	movq	%rax, (%r15)
LBB0_18:
	movq	%r14, %rdi
	callq	_STREAM_POSITION
	subq	32(%rbx), %rax
	movq	%rax, 64(%rbx)
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rax
LBB0_19:
	movq	(%rax), %rax
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	8(%rbx), %rax
	cmpq	16(%rbx), %rax
	jl	LBB0_7
## %bb.2:
	movq	24(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	%r14, %rdi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	callq	_STREAM_POSITION
	movq	32(%rbx), %rsi
	subq	%rax, %rsi
	addq	-48(%rbp), %rsi                 ## 8-byte Folded Reload
	js	LBB0_4
## %bb.5:
	movq	%r14, %rdi
	callq	_SKIP_BYTES
LBB0_6:
	movl	$0, (%r13)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_asf_read_packet_header
	movl	$1, (%r13)
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_20
LBB0_7:
	cmpq	$0, 40(%rbx)
	jne	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_asf_read_payload_header
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_20
LBB0_9:
	cmpq	$0, 96(%rbx)
	je	LBB0_14
## %bb.10:
	movq	40(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.11:
	decq	%rax
	movq	%rax, 40(%rbx)
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_READ_U8
	movq	%rax, (%rbx)
	cmpq	40(%rbx), %rax
	jle	LBB0_13
## %bb.12:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_LOG_DEBUG
	movq	40(%rbx), %rax
	movq	%rax, (%rbx)
LBB0_13:
	movq	$0, 88(%rbx)
	movq	%rax, 48(%rbx)
	movl	72(%rbx), %eax
	addl	%eax, 80(%rbx)
	jmp	LBB0_14
LBB0_4:
	movq	_VC_CONTAINER_ERROR_CORRUPTED@GOTPCREL(%rip), %rax
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_VC_CONTAINER_ERROR_CORRUPTED,8,3 ## @VC_CONTAINER_ERROR_CORRUPTED
	.comm	_VC_CONTAINER_SUCCESS,8,3       ## @VC_CONTAINER_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Sub-Payload Data Length"

L_.str.1:                               ## @.str.1
	.asciz	"subpayload is too big"

	.no_dead_strip	_asf_read_next_payload_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function asf_read_next_payload_header
_asf_read_next_payload_header:          ; @asf_read_next_payload_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
	mov	x21, x3
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x23, [x8]
	ldr	x8, [x1]
	cbz	x8, LBB0_8
LBB0_1:
	cbz	x22, LBB0_3
; %bb.2:
	ldr	x8, [x23, #8]
	ldr	w9, [x19, #56]
	and	x9, x9, #0x7f
	ldr	x8, [x8, x9, lsl #3]
	str	x8, [x22]
LBB0_3:
	cbz	x21, LBB0_5
; %bb.4:
	ldr	x8, [x19]
	str	x8, [x21]
LBB0_5:
	mov	x0, x20
	bl	_STREAM_POSITION
	ldr	x8, [x19, #32]
	sub	x8, x0, x8
	str	x8, [x19, #64]
Lloh0:
	adrp	x8, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
LBB0_6:
	ldr	x0, [x8]
LBB0_7:
	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_8:
	ldp	x8, x9, [x19, #8]
	cmp	x8, x9
	b.lt	LBB0_13
; %bb.9:
	ldr	x24, [x19, #24]
	cbz	x24, LBB0_12
; %bb.10:
	mov	x0, x20
	bl	_STREAM_POSITION
	ldr	x8, [x19, #32]
	sub	x8, x8, x0
	adds	x1, x8, x24
	b.mi	LBB0_20
; %bb.11:
	mov	x0, x20
	bl	_SKIP_BYTES
LBB0_12:
	str	wzr, [x23]
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_asf_read_packet_header
	mov	w8, #1
	str	w8, [x23]
Lloh2:
	adrp	x8, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_7
LBB0_13:
	ldr	x8, [x19, #40]
	cbnz	x8, LBB0_15
; %bb.14:
	mov	x0, x20
	mov	x1, x19
	bl	_asf_read_payload_header
Lloh5:
	adrp	x8, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_7
LBB0_15:
	ldr	x8, [x19, #96]
	cbz	x8, LBB0_1
; %bb.16:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_1
; %bb.17:
	sub	x8, x8, #1
	str	x8, [x19, #40]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_READ_U8
	str	x0, [x19]
	ldr	x8, [x19, #40]
	cmp	x0, x8
	b.le	LBB0_19
; %bb.18:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_LOG_DEBUG
	ldr	x0, [x19, #40]
	str	x0, [x19]
LBB0_19:
	str	xzr, [x19, #88]
	str	x0, [x19, #48]
	ldr	w8, [x19, #72]
	ldr	w9, [x19, #80]
	add	w8, w9, w8
	str	w8, [x19, #80]
	b	LBB0_1
LBB0_20:
Lloh12:
	adrp	x8, _VC_CONTAINER_ERROR_CORRUPTED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_CORRUPTED@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_VC_CONTAINER_ERROR_CORRUPTED,8,3 ; @VC_CONTAINER_ERROR_CORRUPTED
	.comm	_VC_CONTAINER_SUCCESS,8,3       ; @VC_CONTAINER_SUCCESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Sub-Payload Data Length"

l_.str.1:                               ; @.str.1
	.asciz	"subpayload is too big"

	.no_dead_strip	_asf_read_next_payload_header
.subsections_via_symbols
