	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_audio_mixer_load_wav           ## -- Begin function audio_mixer_load_wav
	.p2align	4, 0x90
_audio_mixer_load_wav:                  ## @audio_mixer_load_wav
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -24
	movl	%esi, %edx
	movq	%rdi, %rsi
	movq	$0, -16(%rbp)
	leaq	-48(%rbp), %rdi
	callq	_rwav_load
	movq	_RWAV_ITERATE_DONE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_7
## %bb.1:
	movslq	-48(%rbp), %rbx
	addq	%rbx, %rbx
	movq	%rbx, -32(%rbp)
	leaq	-48(%rbp), %rdi
	leaq	-16(%rbp), %rsi
	movq	%rbx, %rdx
	callq	_wav2float
	testl	%eax, %eax
	je	LBB0_7
## %bb.2:
	movq	-40(%rbp), %rdx
	movq	_s_rate@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_5
## %bb.3:
	movq	$0, -24(%rbp)
	movq	-16(%rbp), %rdi
	leaq	-24(%rbp), %rcx
	leaq	-32(%rbp), %r8
	movq	%rbx, %rsi
	callq	_one_shot_resample
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:
	movq	-16(%rbp), %rdi
	callq	_memalign_free
	movq	-24(%rbp), %rax
	movq	%rax, -16(%rbp)
LBB0_5:
	movl	$1, %edi
	movl	$24, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.9:
	movq	%rax, %rbx
	movq	_AUDIO_MIXER_TYPE_WAV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	-32(%rbp), %rax
	shrq	%rax
	movl	%eax, (%rbx)
	movq	-16(%rbp), %rax
	movq	%rax, 8(%rbx)
	leaq	-48(%rbp), %rdi
	callq	_rwav_free
	jmp	LBB0_8
LBB0_6:
	movq	-16(%rbp), %rdi
	callq	_memalign_free
LBB0_7:
	xorl	%ebx, %ebx
LBB0_8:
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RWAV_ITERATE_DONE,4,2          ## @RWAV_ITERATE_DONE
	.comm	_s_rate,8,3                     ## @s_rate
	.comm	_AUDIO_MIXER_TYPE_WAV,4,2       ## @AUDIO_MIXER_TYPE_WAV
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_audio_mixer_load_wav           ; -- Begin function audio_mixer_load_wav
	.p2align	2
_audio_mixer_load_wav:                  ; @audio_mixer_load_wav
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x2, x1
	mov	x1, x0
	str	xzr, [sp, #24]
	add	x0, sp, #32
	bl	_rwav_load
	mov	x19, #0
Lloh0:
	adrp	x8, _RWAV_ITERATE_DONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RWAV_ITERATE_DONE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_9
; %bb.1:
	ldrsw	x8, [sp, #32]
	lsl	x19, x8, #1
	str	x19, [sp, #16]
	add	x0, sp, #32
	add	x1, sp, #24
	mov	x2, x19
	bl	_wav2float
	cbz	w0, LBB0_7
; %bb.2:
	ldr	x2, [sp, #40]
Lloh3:
	adrp	x8, _s_rate@GOTPAGE
Lloh4:
	ldr	x8, [x8, _s_rate@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x2, x8
	b.eq	LBB0_5
; %bb.3:
	str	xzr, [sp, #8]
	ldr	x0, [sp, #24]
	add	x3, sp, #8
	add	x4, sp, #16
	mov	x1, x19
	bl	_one_shot_resample
	cbz	w0, LBB0_7
; %bb.4:
	ldr	x0, [sp, #24]
	bl	_memalign_free
	ldr	x8, [sp, #8]
	str	x8, [sp, #24]
LBB0_5:
	mov	w0, #1
	mov	w1, #24
	bl	_calloc
	mov	x19, x0
	cbz	x0, LBB0_8
; %bb.6:
Lloh6:
	adrp	x8, _AUDIO_MIXER_TYPE_WAV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AUDIO_MIXER_TYPE_WAV@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	ldr	x8, [sp, #16]
	lsr	x8, x8, #1
	str	w8, [x19]
	ldr	x8, [sp, #24]
	str	x8, [x19, #8]
	add	x0, sp, #32
	bl	_rwav_free
	b	LBB0_9
LBB0_7:
	mov	x19, #0
	b	LBB0_9
LBB0_8:
	ldr	x0, [sp, #24]
	bl	_memalign_free
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_RWAV_ITERATE_DONE,4,2          ; @RWAV_ITERATE_DONE
	.comm	_s_rate,8,3                     ; @s_rate
	.comm	_AUDIO_MIXER_TYPE_WAV,4,2       ; @AUDIO_MIXER_TYPE_WAV
.subsections_via_symbols
