	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SNDDXChangeVideoFormat         ## -- Begin function SNDDXChangeVideoFormat
	.p2align	4, 0x90
_SNDDXChangeVideoFormat:                ## @SNDDXChangeVideoFormat
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	$44100, %eax                    ## imm = 0xAC44
	xorl	%edx, %edx
	idivl	%edi
	movq	_soundlen@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_NUMSOUNDBLOCKS@GOTPCREL(%rip), %rcx
	imull	(%rcx), %eax
	shll	$2, %eax
	movq	_soundbufsize@GOTPCREL(%rip), %r14
	movl	%eax, (%r14)
	movq	_stereodata16@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_free
	movl	(%r14), %eax
LBB0_2:
	movl	%eax, %edi
	callq	_malloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	(%r14), %edx
	xorl	%ebx, %ebx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_memset
	jmp	LBB0_5
LBB0_3:
	movl	$-1, %ebx
LBB0_5:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_soundlen,4,2                   ## @soundlen
	.comm	_NUMSOUNDBLOCKS,4,2             ## @NUMSOUNDBLOCKS
	.comm	_soundbufsize,4,2               ## @soundbufsize
	.comm	_stereodata16,8,3               ## @stereodata16
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SNDDXChangeVideoFormat         ; -- Begin function SNDDXChangeVideoFormat
	.p2align	2
_SNDDXChangeVideoFormat:                ; @SNDDXChangeVideoFormat
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	w8, #44100
	sdiv	w8, w8, w0
Lloh0:
	adrp	x9, _soundlen@GOTPAGE
Lloh1:
	ldr	x9, [x9, _soundlen@GOTPAGEOFF]
Lloh2:
	str	w8, [x9]
Lloh3:
	adrp	x9, _NUMSOUNDBLOCKS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NUMSOUNDBLOCKS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	mul	w8, w8, w9
	lsl	w0, w8, #2
Lloh6:
	adrp	x19, _soundbufsize@GOTPAGE
Lloh7:
	ldr	x19, [x19, _soundbufsize@GOTPAGEOFF]
	str	w0, [x19]
Lloh8:
	adrp	x20, _stereodata16@GOTPAGE
Lloh9:
	ldr	x20, [x20, _stereodata16@GOTPAGEOFF]
	ldr	x8, [x20]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x8
	bl	_free
	ldr	w0, [x19]
LBB0_2:
	bl	_malloc
	str	x0, [x20]
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w2, [x19]
	mov	w1, #0
	bl	_memset
	mov	w0, #0
	b	LBB0_5
LBB0_4:
	mov	w0, #-1
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_soundlen,4,2                   ; @soundlen
	.comm	_NUMSOUNDBLOCKS,4,2             ; @NUMSOUNDBLOCKS
	.comm	_soundbufsize,4,2               ; @soundbufsize
	.comm	_stereodata16,8,3               ; @stereodata16
.subsections_via_symbols
