	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AVIFILE_CreateAVIFile          ## -- Begin function AVIFILE_CreateAVIFile
	.p2align	4, 0x90
_AVIFILE_CreateAVIFile:                 ## @AVIFILE_CreateAVIFile
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	$0, (%rdx)
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	_HEAP_ZERO_MEMORY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	movl	$40, %edx
	callq	_HeapAlloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	addq	$8, %rbx
	movq	_unk_vtbl@GOTPCREL(%rip), %rcx
	movq	%rcx, 8(%rax)
	movq	_avif_vt@GOTPCREL(%rip), %rcx
	movq	%rcx, 32(%rax)
	movq	_pf_vt@GOTPCREL(%rip), %rcx
	movq	%rcx, 24(%rax)
	movl	$1, (%rax)
	testq	%r12, %r12
	cmoveq	%rbx, %r12
	movq	%r12, 16(%rax)
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r15, %rdx
	callq	_IUnknown_QueryInterface
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_IUnknown_Release
	movl	%r14d, %eax
	jmp	LBB0_2
LBB0_1:
	movq	_AVIERR_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_2:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HEAP_ZERO_MEMORY,4,2           ## @HEAP_ZERO_MEMORY
	.comm	_AVIERR_MEMORY,4,2              ## @AVIERR_MEMORY
	.comm	_unk_vtbl,4,2                   ## @unk_vtbl
	.comm	_avif_vt,4,2                    ## @avif_vt
	.comm	_pf_vt,4,2                      ## @pf_vt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AVIFILE_CreateAVIFile          ; -- Begin function AVIFILE_CreateAVIFile
	.p2align	2
_AVIFILE_CreateAVIFile:                 ; @AVIFILE_CreateAVIFile
	.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, x2
	mov	x20, x1
	mov	x21, x0
	str	xzr, [x2]
	bl	_GetProcessHeap
Lloh0:
	adrp	x8, _HEAP_ZERO_MEMORY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HEAP_ZERO_MEMORY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #40
	bl	_HeapAlloc
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _unk_vtbl@GOTPAGE
Lloh4:
	ldr	x8, [x8, _unk_vtbl@GOTPAGEOFF]
	mov	x22, x0
	str	x8, [x22, #8]!
Lloh5:
	adrp	x8, _avif_vt@GOTPAGE
Lloh6:
	ldr	x8, [x8, _avif_vt@GOTPAGEOFF]
	str	x8, [x0, #32]
Lloh7:
	adrp	x8, _pf_vt@GOTPAGE
Lloh8:
	ldr	x8, [x8, _pf_vt@GOTPAGEOFF]
	mov	w9, #1
	str	w9, [x0]
	cmp	x21, #0
	csel	x9, x22, x21, eq
	stp	x9, x8, [x0, #16]
	mov	x0, x22
	mov	x1, x20
	mov	x2, x19
	bl	_IUnknown_QueryInterface
	mov	x19, x0
	mov	x0, x22
	bl	_IUnknown_Release
	mov	x0, x19
	b	LBB0_3
LBB0_2:
Lloh9:
	adrp	x8, _AVIERR_MEMORY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AVIERR_MEMORY@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
LBB0_3:
	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	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_HEAP_ZERO_MEMORY,4,2           ; @HEAP_ZERO_MEMORY
	.comm	_AVIERR_MEMORY,4,2              ; @AVIERR_MEMORY
	.comm	_unk_vtbl,4,2                   ; @unk_vtbl
	.comm	_avif_vt,4,2                    ; @avif_vt
	.comm	_pf_vt,4,2                      ; @pf_vt
.subsections_via_symbols
