	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function AVIFILE_OpenGetFrame
_AVIFILE_OpenGetFrame:                  ## @AVIFILE_OpenGetFrame
	.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	%rdi, %rbx
	xorl	%edi, %edi
	testq	%rbx, %rbx
	setne	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 128(%rbx)
	setne	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 120(%rbx)
	sete	%dil
	callq	_assert
	movq	128(%rbx), %rdi
	xorl	%esi, %esi
	callq	_AVIStreamGetFrameOpen
	movq	%rax, 120(%rbx)
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	64(%rbx), %rax
	movq	_comptypeDIB@GOTPCREL(%rip), %rcx
	movq	_AVIERR_OK@GOTPCREL(%rip), %r12
	cmpq	(%rcx), %rax
	jne	LBB0_4
LBB0_2:
	movq	%r12, %r13
	jmp	LBB0_18
LBB0_3:
	movq	_AVIERR_ERROR@GOTPCREL(%rip), %r13
	jmp	LBB0_18
LBB0_4:
	xorl	%edi, %edi
	cmpq	$0, 24(%rbx)
	setne	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 16(%rbx)
	sete	%dil
	callq	_assert
	movq	120(%rbx), %rdi
	movl	112(%rbx), %esi
	callq	_AVIStreamGetFrame
	movq	_AVIERR_MEMORY@GOTPCREL(%rip), %r13
	testq	%rax, %rax
	je	LBB0_18
## %bb.5:
	movq	%rax, %r15
	movq	24(%rbx), %rdi
	movq	%rax, %rsi
	callq	_ICCompressGetFormatSize
	movq	%rax, %r14
	movq	_AVIERR_COMPRESSOR@GOTPCREL(%rip), %rax
	cmpq	$4, %r14
	jge	LBB0_7
## %bb.6:
	movq	%rax, %r13
	jmp	LBB0_18
LBB0_7:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_HeapAlloc
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_18
## %bb.8:
	movq	%r14, 56(%rbx)
	movq	24(%rbx), %rdi
	movq	%r15, %rsi
	movq	%rax, %rdx
	callq	_ICCompressGetFormat
	movq	_S_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_10
## %bb.9:
	movq	_AVIERR_BADFORMAT@GOTPCREL(%rip), %r13
	jmp	LBB0_18
LBB0_10:
	movq	16(%rbx), %rdx
	movq	24(%rbx), %rdi
	movq	8(%rdx), %rax
	addq	96(%rbx), %rax
	movq	%rax, 104(%rbx)
	movq	(%rdx), %rax
	addq	80(%rbx), %rax
	movq	%rax, 88(%rbx)
	movq	%r15, %rsi
	callq	_ICCompressGetSize
	movl	%eax, 72(%rbx)
	movq	16(%rbx), %rdx
	movq	24(%rbx), %rdi
	movq	%r15, %rsi
	callq	_ICCompressBegin
	movq	_S_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.11:
	movslq	72(%rbx), %rax
	addq	%rax, %r14
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_HeapAlloc
	movq	%rax, 40(%rbx)
	testq	%rax, %rax
	je	LBB0_18
## %bb.12:
	movq	16(%rbx), %rsi
	movq	56(%rbx), %rdx
	movq	%rax, %rdi
	callq	_memcpy
	movq	40(%rbx), %rdi
	callq	_DIBPTR
	movq	%rax, 48(%rbx)
	cmpl	$1, (%rbx)
	je	LBB0_2
## %bb.13:
	movq	_VIDCF_FASTTEMPORALC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rbx)
	jne	LBB0_2
## %bb.14:
	movq	16(%rbx), %rsi
	movq	24(%rbx), %rdi
	callq	_ICDecompressGetFormatSize
	movq	%rax, %r14
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_HeapAlloc
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_18
## %bb.15:
	movq	16(%rbx), %rsi
	movq	24(%rbx), %rdi
	movq	%rax, %rdx
	callq	_ICDecompressGetFormat
	movq	_S_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_19
LBB0_17:
	movq	_AVIERR_COMPRESSOR@GOTPCREL(%rip), %r13
LBB0_18:
	movl	(%r13), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	8(%rbx), %rcx
	movl	(%rcx), %eax
	testl	%eax, %eax
	jne	LBB0_21
## %bb.20:
	movq	(%rcx), %rdi
	callq	_DIBWIDTHBYTES
	movq	8(%rbx), %rcx
	imull	4(%rcx), %eax
	movl	%eax, (%rcx)
LBB0_21:
	cltq
	addq	%rax, %r14
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	8(%rbx), %rdx
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r14, %rcx
	callq	_HeapReAlloc
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_18
## %bb.22:
	movq	%rax, %rdi
	callq	_DIBPTR
	movq	%rax, 32(%rbx)
	movq	24(%rbx), %rdi
	movq	8(%rbx), %rdx
	movq	16(%rbx), %rsi
	callq	_ICDecompressBegin
	movq	_AVIERR_COMPRESSOR@GOTPCREL(%rip), %r13
	movq	_S_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_AVIERR_ERROR,4,2               ## @AVIERR_ERROR
	.comm	_comptypeDIB,8,3                ## @comptypeDIB
	.comm	_AVIERR_OK,4,2                  ## @AVIERR_OK
	.comm	_AVIERR_MEMORY,4,2              ## @AVIERR_MEMORY
	.comm	_AVIERR_COMPRESSOR,4,2          ## @AVIERR_COMPRESSOR
	.comm	_S_OK,8,3                       ## @S_OK
	.comm	_AVIERR_BADFORMAT,4,2           ## @AVIERR_BADFORMAT
	.comm	_VIDCF_FASTTEMPORALC,4,2        ## @VIDCF_FASTTEMPORALC
	.no_dead_strip	_AVIFILE_OpenGetFrame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function AVIFILE_OpenGetFrame
_AVIFILE_OpenGetFrame:                  ; @AVIFILE_OpenGetFrame
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	ldr	x8, [x19, #128]
	cmp	x8, #0
	cset	w0, ne
	bl	_assert
	ldr	x8, [x19, #120]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	x0, [x19, #128]
	mov	x1, #0
	bl	_AVIStreamGetFrameOpen
	str	x0, [x19, #120]
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x19, #64]
Lloh0:
	adrp	x9, _comptypeDIB@GOTPAGE
Lloh1:
	ldr	x9, [x9, _comptypeDIB@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
LBB0_2:
Lloh3:
	adrp	x8, _AVIERR_OK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVIERR_OK@GOTPAGEOFF]
	b	LBB0_21
LBB0_3:
Lloh5:
	adrp	x8, _AVIERR_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AVIERR_ERROR@GOTPAGEOFF]
	b	LBB0_21
LBB0_4:
	ldr	x8, [x19, #24]
	cmp	x8, #0
	cset	w0, ne
	bl	_assert
	ldr	x8, [x19, #16]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	x0, [x19, #120]
	ldr	w1, [x19, #112]
	bl	_AVIStreamGetFrame
	cbz	x0, LBB0_20
; %bb.5:
	mov	x20, x0
	ldr	x0, [x19, #24]
	mov	x1, x20
	bl	_ICCompressGetFormatSize
	cmp	x0, #4
	b.ge	LBB0_7
LBB0_6:
Lloh7:
	adrp	x8, _AVIERR_COMPRESSOR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AVIERR_COMPRESSOR@GOTPAGEOFF]
	b	LBB0_21
LBB0_7:
	mov	x21, x0
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x21
	bl	_HeapAlloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_20
; %bb.8:
	mov	x2, x0
	str	x21, [x19, #56]
	ldr	x0, [x19, #24]
	mov	x1, x20
	bl	_ICCompressGetFormat
Lloh9:
	adrp	x22, _S_OK@GOTPAGE
Lloh10:
	ldr	x22, [x22, _S_OK@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	b.ge	LBB0_10
; %bb.9:
Lloh11:
	adrp	x8, _AVIERR_BADFORMAT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AVIERR_BADFORMAT@GOTPAGEOFF]
	b	LBB0_21
LBB0_10:
	ldr	x8, [x19, #96]
	ldp	x2, x0, [x19, #16]
	ldp	x10, x9, [x2]
	add	x8, x9, x8
	str	x8, [x19, #104]
	ldr	x8, [x19, #80]
	add	x8, x10, x8
	str	x8, [x19, #88]
	mov	x1, x20
	bl	_ICCompressGetSize
	str	w0, [x19, #72]
	ldp	x2, x0, [x19, #16]
	mov	x1, x20
	bl	_ICCompressBegin
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.11:
	ldrsw	x8, [x19, #72]
	add	x20, x21, x8
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x20
	bl	_HeapAlloc
	str	x0, [x19, #40]
	cbz	x0, LBB0_20
; %bb.12:
	ldr	x1, [x19, #16]
	ldr	x2, [x19, #56]
	bl	_memcpy
	ldr	x0, [x19, #40]
	bl	_DIBPTR
	str	x0, [x19, #48]
	ldr	w8, [x19]
	cmp	w8, #1
	b.eq	LBB0_2
; %bb.13:
	ldr	w8, [x19, #4]
Lloh13:
	adrp	x9, _VIDCF_FASTTEMPORALC@GOTPAGE
Lloh14:
	ldr	x9, [x9, _VIDCF_FASTTEMPORALC@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.14:
	ldp	x1, x0, [x19, #16]
	bl	_ICDecompressGetFormatSize
	mov	x20, x0
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x20
	bl	_HeapAlloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_20
; %bb.15:
	mov	x2, x0
	ldp	x1, x0, [x19, #16]
	bl	_ICDecompressGetFormat
	ldr	x8, [x22]
	cmp	x0, x8
	b.lt	LBB0_6
; %bb.16:
	ldr	x9, [x19, #8]
	ldr	w8, [x9]
	cbnz	w8, LBB0_18
; %bb.17:
	ldr	x0, [x9]
	bl	_DIBWIDTHBYTES
	ldr	x9, [x19, #8]
	ldr	w8, [x9, #4]
	mul	w8, w8, w0
	str	w8, [x9]
LBB0_18:
	add	x20, x20, w8, sxtw
	bl	_GetProcessHeap
	ldr	x2, [x19, #8]
	mov	w1, #0
	mov	x3, x20
	bl	_HeapReAlloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_20
; %bb.19:
	bl	_DIBPTR
	str	x0, [x19, #32]
	ldp	x1, x0, [x19, #16]
	ldr	x2, [x19, #8]
	bl	_ICDecompressBegin
	ldr	x8, [x22]
	cmp	x0, x8
	b.eq	LBB0_2
	b	LBB0_6
LBB0_20:
Lloh16:
	adrp	x8, _AVIERR_MEMORY@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AVIERR_MEMORY@GOTPAGEOFF]
LBB0_21:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_AVIERR_ERROR,4,2               ; @AVIERR_ERROR
	.comm	_comptypeDIB,8,3                ; @comptypeDIB
	.comm	_AVIERR_OK,4,2                  ; @AVIERR_OK
	.comm	_AVIERR_MEMORY,4,2              ; @AVIERR_MEMORY
	.comm	_AVIERR_COMPRESSOR,4,2          ; @AVIERR_COMPRESSOR
	.comm	_S_OK,8,3                       ; @S_OK
	.comm	_AVIERR_BADFORMAT,4,2           ; @AVIERR_BADFORMAT
	.comm	_VIDCF_FASTTEMPORALC,4,2        ; @VIDCF_FASTTEMPORALC
	.no_dead_strip	_AVIFILE_OpenGetFrame
.subsections_via_symbols
