	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FindChunkAndKeepExtras         ## -- Begin function FindChunkAndKeepExtras
	.p2align	4, 0x90
_FindChunkAndKeepExtras:                ## @FindChunkAndKeepExtras
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r15d
	movq	%rcx, %r14
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %rbx
	xorl	%edi, %edi
	testq	%rbx, %rbx
	setne	%dil
	callq	_assert
	xorl	%edi, %edi
	testq	%r12, %r12
	setne	%dil
	callq	_assert
	xorl	%edi, %edi
	testq	%r13, %r13
	setne	%dil
	callq	_assert
	movslq	4(%rbx), %rsi
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movslq	(%rbx), %rdx
	movl	%r15d, (%rsp)
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rcx
	movq	%r13, %r8
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %r9
	xorl	%eax, %eax
	callq	_TRACE
	movq	_MMIO_FINDCHUNK@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_2
## %bb.1:
	movq	(%r13), %r14
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_2:
	movq	_MMIO_FINDLIST@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_4
## %bb.3:
	movq	_FOURCC_LIST@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_4:
	movq	_MMIO_FINDRIFF@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_5
## %bb.6:
	movq	_FOURCC_RIFF@GOTPCREL(%rip), %rax
LBB0_7:
	movq	(%rax), %r14
	movq	8(%r13), %rbx
LBB0_8:
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_TRACE
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	xorl	%ecx, %ecx
	callq	_mmioDescend
	movq	_MMSYSERR_NOERROR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_19
## %bb.9:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	%r12, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_mmioAscend
	movq	_MMSYSERR_NOERROR@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jne	LBB0_16
LBB0_23:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	xorl	%ecx, %ecx
	callq	_mmioDescend
	cmpq	(%rbx), %rax
	jne	LBB0_24
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rbx
	cmpq	%r14, %rbx
	jne	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_21
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, 8(%r13)
	je	LBB0_21
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	_ckidAVIPADDING@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	$112, %edi
	movl	$97, %esi
	movl	$100, %edx
	movl	$100, %ecx
	callq	_mmioFOURCC
	cmpq	%rax, %rbx
	je	LBB0_15
## %bb.22:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	_ReadChunkIntoExtra
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	movq	_MMSYSERR_NOERROR@GOTPCREL(%rip), %rbx
	je	LBB0_23
	jmp	LBB0_18
LBB0_24:
	movl	-44(%rbp), %r15d                ## 4-byte Reload
LBB0_19:
	testl	%r15d, %r15d
	jne	LBB0_16
## %bb.20:
	movq	_MMIOERR_CHUNKNOTFOUND@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_16
LBB0_21:
	movq	_AVIERR_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_16:
	movq	_AVIERR_FILEREAD@GOTPCREL(%rip), %rax
LBB0_17:
	movl	(%rax), %r15d
LBB0_18:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	$-1, %r14
	movq	$-1, %rbx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"({%p,%u},%p,%p,%p,0x%X)\n"

	.comm	_MMIO_FINDCHUNK,4,2             ## @MMIO_FINDCHUNK
	.comm	_MMIO_FINDLIST,4,2              ## @MMIO_FINDLIST
	.comm	_FOURCC_LIST,8,3                ## @FOURCC_LIST
	.comm	_MMIO_FINDRIFF,4,2              ## @MMIO_FINDRIFF
	.comm	_FOURCC_RIFF,8,3                ## @FOURCC_RIFF
L_.str.1:                               ## @.str.1
	.asciz	": find ckid=0x%08X fccType=0x%08X\n"

	.comm	_MMSYSERR_NOERROR,8,3           ## @MMSYSERR_NOERROR
	.comm	_MMIOERR_CHUNKNOTFOUND,8,3      ## @MMIOERR_CHUNKNOTFOUND
	.comm	_AVIERR_OK,4,2                  ## @AVIERR_OK
	.comm	_AVIERR_FILEREAD,4,2            ## @AVIERR_FILEREAD
	.comm	_ckidAVIPADDING,8,3             ## @ckidAVIPADDING
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FindChunkAndKeepExtras         ; -- Begin function FindChunkAndKeepExtras
	.p2align	2
_FindChunkAndKeepExtras:                ; @FindChunkAndKeepExtras
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	cmp	x22, #0
	cset	w0, ne
	bl	_assert
	cmp	x21, #0
	cset	w0, ne
	bl	_assert
	ldpsw	x2, x1, [x23]
	stp	x20, x19, [sp, #16]
	stp	x22, x21, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
Lloh2:
	adrp	x8, _MMIO_FINDCHUNK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MMIO_FINDCHUNK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_2
; %bb.1:
	mov	x25, #0
	ldr	x24, [x21]
	b	LBB0_7
LBB0_2:
Lloh5:
	adrp	x8, _MMIO_FINDLIST@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MMIO_FINDLIST@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_4
; %bb.3:
Lloh8:
	adrp	x8, _FOURCC_LIST@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FOURCC_LIST@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh10:
	adrp	x8, _MMIO_FINDRIFF@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MMIO_FINDRIFF@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_23
; %bb.5:
Lloh13:
	adrp	x8, _FOURCC_RIFF@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FOURCC_RIFF@GOTPAGEOFF]
LBB0_6:
	ldr	x24, [x8]
	ldr	x25, [x21, #8]
LBB0_7:
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x24
	mov	x2, x25
	bl	_TRACE
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	w3, #0
	bl	_mmioDescend
Lloh17:
	adrp	x27, _MMSYSERR_NOERROR@GOTPAGE
Lloh18:
	ldr	x27, [x27, _MMSYSERR_NOERROR@GOTPAGEOFF]
	ldr	x8, [x27]
	cmp	x0, x8
	b.ne	LBB0_17
; %bb.8:
Lloh19:
	adrp	x28, _ckidAVIPADDING@GOTPAGE
Lloh20:
	ldr	x28, [x28, _ckidAVIPADDING@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x22
	mov	x1, x21
	mov	w2, #0
	bl	_mmioAscend
	ldr	x8, [x27]
	cmp	x0, x8
	b.ne	LBB0_20
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	mov	w3, #0
	bl	_mmioDescend
	ldr	x8, [x27]
	cmp	x0, x8
	b.ne	LBB0_17
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x26, [x21]
	cmp	x26, x24
	b.ne	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	cbz	x25, LBB0_19
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x21, #8]
	cmp	x8, x25
	b.eq	LBB0_19
LBB0_14:                                ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x28]
	cmp	x26, x8
	b.eq	LBB0_9
; %bb.15:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	w0, #112
	mov	w1, #97
	mov	w2, #100
	mov	w3, #100
	bl	_mmioFOURCC
	cmp	x26, x0
	b.eq	LBB0_9
; %bb.16:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	bl	_ReadChunkIntoExtra
	mov	x26, x0
	bl	_FAILED
	cbz	x0, LBB0_10
	b	LBB0_22
LBB0_17:
	cbnz	w19, LBB0_20
; %bb.18:
Lloh21:
	adrp	x8, _MMIOERR_CHUNKNOTFOUND@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MMIOERR_CHUNKNOTFOUND@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_20
LBB0_19:
Lloh24:
	adrp	x8, _AVIERR_OK@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AVIERR_OK@GOTPAGEOFF]
	b	LBB0_21
LBB0_20:
Lloh26:
	adrp	x8, _AVIERR_FILEREAD@GOTPAGE
Lloh27:
	ldr	x8, [x8, _AVIERR_FILEREAD@GOTPAGEOFF]
LBB0_21:
	ldr	w26, [x8]
LBB0_22:
	mov	x0, x26
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_23:
	mov	x24, #-1
	mov	x25, #-1
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"({%p,%u},%p,%p,%p,0x%X)\n"

	.comm	_MMIO_FINDCHUNK,4,2             ; @MMIO_FINDCHUNK
	.comm	_MMIO_FINDLIST,4,2              ; @MMIO_FINDLIST
	.comm	_FOURCC_LIST,8,3                ; @FOURCC_LIST
	.comm	_MMIO_FINDRIFF,4,2              ; @MMIO_FINDRIFF
	.comm	_FOURCC_RIFF,8,3                ; @FOURCC_RIFF
l_.str.1:                               ; @.str.1
	.asciz	": find ckid=0x%08X fccType=0x%08X\n"

	.comm	_MMSYSERR_NOERROR,8,3           ; @MMSYSERR_NOERROR
	.comm	_MMIOERR_CHUNKNOTFOUND,8,3      ; @MMIOERR_CHUNKNOTFOUND
	.comm	_AVIERR_OK,4,2                  ; @AVIERR_OK
	.comm	_AVIERR_FILEREAD,4,2            ; @AVIERR_FILEREAD
	.comm	_ckidAVIPADDING,8,3             ; @ckidAVIPADDING
.subsections_via_symbols
