	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function AVIFILE_ReadFrame
_AVIFILE_ReadFrame:                     ## @AVIFILE_ReadFrame
	.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
	movl	%edx, %r14d
	movq	%rsi, %r13
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	movl	%r14d, %ecx
	callq	_TRACE
	testq	%r13, %r13
	je	LBB0_13
## %bb.1:
	cmpq	%r13, 24(%r15)
	je	LBB0_8
## %bb.2:
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_AVIStreamGetFrameOpen
	testq	%rax, %rax
	je	LBB0_14
## %bb.3:
	movq	%rax, %r12
	cmpq	$0, 16(%r15)
	je	LBB0_6
## %bb.4:
	movq	(%r15), %rsi
	movl	$-1, (%rsp)
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movl	$-1, %r9d
	callq	_IGetFrame_SetFormat
	movq	_S_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.5:
	movq	16(%r15), %rdi
	callq	_AVIStreamGetFrameClose
LBB0_6:
	movq	%r12, 16(%r15)
	movq	%r13, 24(%r15)
	jmp	LBB0_9
LBB0_8:
	movq	16(%r15), %r12
LBB0_9:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_AVIStreamGetFrame
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	movq	%rax, %rbx
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	jmp	LBB0_14
LBB0_12:
	movq	%r12, %rdi
	callq	_AVIStreamGetFrameClose
	leaq	L_.str.1(%rip), %rdi
	callq	_ERR
LBB0_13:
	xorl	%ebx, %ebx
LBB0_14:
	movq	%rbx, %rax
	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	"(%p,%p,%d)\n"

	.comm	_S_OK,8,3                       ## @S_OK
L_.str.1:                               ## @.str.1
	.asciz	": IGetFrame_SetFormat failed\n"

	.no_dead_strip	_AVIFILE_ReadFrame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function AVIFILE_ReadFrame
_AVIFILE_ReadFrame:                     ; @AVIFILE_ReadFrame
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x21
	mov	x3, x20
	bl	_TRACE
	cbz	x21, LBB0_11
; %bb.1:
	ldr	x8, [x19, #24]
	cmp	x8, x21
	b.eq	LBB0_7
; %bb.2:
	mov	x0, x21
	mov	x1, #0
	bl	_AVIStreamGetFrameOpen
	cbz	x0, LBB0_12
; %bb.3:
	mov	x22, x0
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_6
; %bb.4:
	ldr	x1, [x19]
	mov	x0, x22
	mov	x2, #0
	mov	w3, #0
	mov	w4, #0
	mov	w5, #-1
	mov	w6, #-1
	bl	_IGetFrame_SetFormat
Lloh2:
	adrp	x8, _S_OK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _S_OK@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.5:
	ldr	x0, [x19, #16]
	bl	_AVIStreamGetFrameClose
LBB0_6:
	stp	x22, x21, [x19, #16]
	b	LBB0_8
LBB0_7:
	ldr	x22, [x19, #16]
LBB0_8:
	mov	x0, x22
	mov	x1, x20
	bl	_AVIStreamGetFrame
	str	x0, [x19]
	cbz	x0, LBB0_12
; %bb.9:
	ldr	w8, [x0]
	str	w8, [x19, #8]
	b	LBB0_12
LBB0_10:
	mov	x0, x22
	bl	_AVIStreamGetFrameClose
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERR
LBB0_11:
	mov	x0, #0
LBB0_12:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%p,%p,%d)\n"

	.comm	_S_OK,8,3                       ; @S_OK
l_.str.1:                               ; @.str.1
	.asciz	": IGetFrame_SetFormat failed\n"

	.no_dead_strip	_AVIFILE_ReadFrame
.subsections_via_symbols
