	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ScuDspSaveMD                   ## -- Begin function ScuDspSaveMD
	.p2align	4, 0x90
_ScuDspSaveMD:                          ## @ScuDspSaveMD
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$-1, %ebx
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	movl	%esi, %r15d
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	%rax, %r14
	movl	$8, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	%rax, %rbx
	movq	_ScuDsp@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movslq	%r15d, %rcx
	movq	(%rax,%rcx,8), %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%rax,%rcx), %rdx
	movl	%edx, %esi
	sarl	$24, %esi
	movslq	%esi, %rsi
	movq	%rsi, (%rbx,%rcx,8)
	movl	%edx, %esi
	sarl	$16, %esi
	movslq	%esi, %rsi
	movq	%rsi, 8(%rbx,%rcx,8)
	movl	%edx, %esi
	sarl	$8, %esi
	movslq	%esi, %rsi
	movq	%rsi, 16(%rbx,%rcx,8)
	movq	%rdx, 24(%rbx,%rcx,8)
	addq	$4, %rcx
	cmpq	$256, %rcx                      ## imm = 0x100
	jne	LBB0_4
## %bb.5:
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$8, %edx
	movq	%r14, %rcx
	callq	_fwrite
	movq	%r14, %rdi
	callq	_fclose
	movq	%rbx, %rdi
	callq	_free
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_7:
	movq	%r14, %rdi
	callq	_fclose
	movl	$-2, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wb"

	.comm	_ScuDsp,8,3                     ## @ScuDsp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ScuDspSaveMD                   ; -- Begin function ScuDspSaveMD
	.p2align	2
_ScuDspSaveMD:                          ; @ScuDspSaveMD
	.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
	cbz	x0, LBB0_6
; %bb.1:
	mov	x21, x1
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_6
; %bb.2:
	mov	x19, x0
	mov	w0, #8
	bl	_malloc
	cbz	x0, LBB0_7
; %bb.3:
	mov	x20, x0
	mov	x8, #0
Lloh2:
	adrp	x9, _ScuDsp@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ScuDsp@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	ldr	x9, [x9]
	ldr	x9, [x9, w21, sxtw #3]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	d0, [x9], #8
	sshr.2s	v1, v0, #24
	sshll.2d	v1, v1, #0
	sshr.2s	v5, v0, #16
	sshll.2d	v2, v5, #0
	sshr.2s	v5, v0, #8
	sshll.2d	v3, v5, #0
	sshll.2d	v4, v0, #0
	add	x10, x20, x8
	st4.2d	{ v1, v2, v3, v4 }, [x10]
	add	x8, x8, #64
	cmp	x8, #2048
	b.ne	LBB0_4
; %bb.5:
	mov	x0, x20
	mov	w1, #1
	mov	w2, #8
	mov	x3, x19
	bl	_fwrite
	mov	x0, x19
	bl	_fclose
	mov	x0, x20
	bl	_free
	mov	w0, #0
	b	LBB0_8
LBB0_6:
	mov	w0, #-1
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	bl	_fclose
	mov	w0, #-2
LBB0_8:
	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
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wb"

	.comm	_ScuDsp,8,3                     ; @ScuDsp
.subsections_via_symbols
