	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AVIFILE_CreateWAVFile          ## -- Begin function AVIFILE_CreateWAVFile
	.p2align	4, 0x90
_AVIFILE_CreateWAVFile:                 ## @AVIFILE_CreateWAVFile
	.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	$48, %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	_iwavft@GOTPCREL(%rip), %rcx
	movq	%rcx, 40(%rax)
	movq	_iwavpft@GOTPCREL(%rip), %rcx
	movq	%rcx, 32(%rax)
	movq	_iwavst@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	_iwavft,4,2                     ## @iwavft
	.comm	_iwavpft,4,2                    ## @iwavpft
	.comm	_iwavst,4,2                     ## @iwavst
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_AVIFILE_CreateWAVFile          ; -- Begin function AVIFILE_CreateWAVFile
	.p2align	2
_AVIFILE_CreateWAVFile:                 ; @AVIFILE_CreateWAVFile
	.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, #48
	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, _iwavft@GOTPAGE
Lloh6:
	ldr	x8, [x8, _iwavft@GOTPAGEOFF]
Lloh7:
	adrp	x9, _iwavpft@GOTPAGE
Lloh8:
	ldr	x9, [x9, _iwavpft@GOTPAGEOFF]
	stp	x9, x8, [x0, #32]
Lloh9:
	adrp	x8, _iwavst@GOTPAGE
Lloh10:
	ldr	x8, [x8, _iwavst@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:
Lloh11:
	adrp	x8, _AVIERR_MEMORY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AVIERR_MEMORY@GOTPAGEOFF]
Lloh13:
	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	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.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	_iwavft,4,2                     ; @iwavft
	.comm	_iwavpft,4,2                    ; @iwavpft
	.comm	_iwavst,4,2                     ; @iwavst
.subsections_via_symbols
