	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function avi_read_dd_chunk
_avi_read_dd_chunk:                     ## @avi_read_dd_chunk
	.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	%r8, %r14
	movl	%ecx, %r12d
	movq	%rdx, %rbx
	movq	%rsi, %r13
	movq	%rdi, %r15
	movl	$100, %edi
	movl	$100, %esi
	callq	_AVI_TWOCC
	movl	(%r13), %ecx
	cmpq	%rbx, %rax
	jne	LBB0_7
## %bb.1:
	cmpl	$4, %r12d
	ja	LBB0_3
## %bb.2:
	testl	%ecx, %ecx
	jne	LBB0_3
## %bb.4:
	movl	24(%r13), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_READ_BYTES
	cmpl	%r12d, %eax
	jne	LBB0_5
## %bb.6:
	movq	%r15, %rdi
	callq	_AVI_SYNC_CHUNK
	movq	%r14, 8(%r13)
	movl	%r12d, (%r13)
	movq	$0, 16(%r13)
	movq	_VC_CONTAINER_ERROR_CONTINUE@GOTPCREL(%rip), %rbx
	jmp	LBB0_10
LBB0_7:
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %rbx
	testl	%ecx, %ecx
	je	LBB0_10
## %bb.8:
	movq	8(%r13), %rdx
	cmpq	%r14, %rdx
	je	LBB0_10
## %bb.9:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movq	%r14, %rcx
	xorl	%eax, %eax
	callq	_LOG_DEBUG
	movl	$0, (%r13)
	jmp	LBB0_10
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_LOG_DEBUG
	movq	_VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPCREL(%rip), %rbx
	jmp	LBB0_10
LBB0_5:
	movq	_VC_CONTAINER_ERROR_FORMAT_INVALID@GOTPCREL(%rip), %rbx
LBB0_10:
	movl	(%rbx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot handle multiple consecutive 'dd' chunks"

	.comm	_VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED,4,2 ## @VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED
	.comm	_VC_CONTAINER_ERROR_FORMAT_INVALID,4,2 ## @VC_CONTAINER_ERROR_FORMAT_INVALID
	.comm	_VC_CONTAINER_ERROR_CONTINUE,4,2 ## @VC_CONTAINER_ERROR_CONTINUE
L_.str.1:                               ## @.str.1
	.asciz	"dropping data from '%02ddd' chunk, not for this track (%d)"

	.comm	_VC_CONTAINER_SUCCESS,4,2       ## @VC_CONTAINER_SUCCESS
	.no_dead_strip	_avi_read_dd_chunk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function avi_read_dd_chunk
_avi_read_dd_chunk:                     ; @avi_read_dd_chunk
	.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, x4
	mov	x22, x3
	mov	x23, x2
	mov	x19, x1
	mov	x21, x0
	mov	w0, #100
	mov	w1, #100
	bl	_AVI_TWOCC
	ldr	w8, [x19]
	cmp	x0, x23
	b.ne	LBB0_5
; %bb.1:
	cmp	w22, #4
	b.hi	LBB0_9
; %bb.2:
	cbnz	w8, LBB0_9
; %bb.3:
	ldr	w1, [x19, #24]
	mov	x0, x21
	mov	x2, x22
	bl	_READ_BYTES
	cmp	w0, w22
	b.ne	LBB0_10
; %bb.4:
	mov	x0, x21
	bl	_AVI_SYNC_CHUNK
	str	w22, [x19]
	stp	x20, xzr, [x19, #8]
Lloh0:
	adrp	x8, _VC_CONTAINER_ERROR_CONTINUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_CONTINUE@GOTPAGEOFF]
	b	LBB0_11
LBB0_5:
	cbz	w8, LBB0_8
; %bb.6:
	ldr	x8, [x19, #8]
	cmp	x8, x20
	b.eq	LBB0_8
; %bb.7:
	stp	x8, x20, [sp]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_LOG_DEBUG
	str	wzr, [x19]
LBB0_8:
Lloh4:
	adrp	x8, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_LOG_DEBUG
Lloh8:
	adrp	x8, _VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh10:
	adrp	x8, _VC_CONTAINER_ERROR_FORMAT_INVALID@GOTPAGE
Lloh11:
	ldr	x8, [x8, _VC_CONTAINER_ERROR_FORMAT_INVALID@GOTPAGEOFF]
LBB0_11:
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot handle multiple consecutive 'dd' chunks"

	.comm	_VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED,4,2 ; @VC_CONTAINER_ERROR_FORMAT_NOT_SUPPORTED
	.comm	_VC_CONTAINER_ERROR_FORMAT_INVALID,4,2 ; @VC_CONTAINER_ERROR_FORMAT_INVALID
	.comm	_VC_CONTAINER_ERROR_CONTINUE,4,2 ; @VC_CONTAINER_ERROR_CONTINUE
l_.str.1:                               ; @.str.1
	.asciz	"dropping data from '%02ddd' chunk, not for this track (%d)"

	.comm	_VC_CONTAINER_SUCCESS,4,2       ; @VC_CONTAINER_SUCCESS
	.no_dead_strip	_avi_read_dd_chunk
.subsections_via_symbols
