	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function ScspSlotDebugAudioSaveWav
LCPI0_0:
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	44100                           ## 0xac44
	.long	16                              ## 0x10
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_ScspSlotDebugAudioSaveWav
	.p2align	4, 0x90
_ScspSlotDebugAudioSaveWav:             ## @ScspSlotDebugAudioSaveWav
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	movl	$12392, %eax                    ## imm = 0x3068
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	$0, -12344(%rbp)
	movq	_scsp@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax,%rdi,8)
	je	LBB0_8
## %bb.1:
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rax
	movq	%rsi, %rdi
	movq	%rax, %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r12
	leaq	L_.str.1(%rip), %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	$0, -12416(%rbp)
	leaq	L_.str.2(%rip), %rsi
	movl	$4, %edx
	callq	_memcpy
	leaq	-12344(%rbp), %rbx
	leaq	-12424(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	movl	$24, %ecx
	movq	%r12, %r8
	callq	_ywrite
	leaq	L_.str.3(%rip), %rsi
	movl	$4, %edx
	callq	_memcpy
	movl	$16, -12360(%rbp)
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [1,2,44100,16]
	movaps	%xmm0, -12384(%rbp)
	movabsq	$757632231014404, %rax          ## imm = 0x2B11000000004
	movq	%rax, -12368(%rbp)
	leaq	-12384(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	movl	$32, %ecx
	movq	%r12, %r8
	callq	_ywrite
	leaq	L_.str.4(%rip), %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	$0, -12400(%rbp)
	leaq	-12400(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	movl	$16, %ecx
	movq	%r12, %r8
	callq	_ywrite
	movq	%r15, %rdi
	callq	_ScspSlotResetDebug
	xorl	%r15d, %r15d
	leaq	-12336(%rbp), %rbx
	movq	_debugslot@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %r14d
	leaq	-8240(%rbp), %rdi
	movq	%rbx, %rsi
	movl	$512, %edx                      ## imm = 0x200
	callq	_ScspSlotDebugAudio
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leal	512(%r14), %r15d
	leaq	-12344(%rbp), %rdi
	movq	%rbx, %rsi
	movl	$2, %edx
	movl	$1024, %ecx                     ## imm = 0x400
	movq	%r12, %r8
	callq	_ywrite
	cmpq	$0, (%r13)
	je	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$440488, %r14d                  ## imm = 0x6B8A8
	jb	LBB0_4
LBB0_7:
	movq	%r12, %rdi
	callq	_ftell
	movq	%rax, %rbx
	movq	_SEEK_SET@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%r12, %rdi
	movl	$16, %esi
	callq	_fseek
	addq	$-4, %rbx
	movq	%rbx, -12352(%rbp)
	leaq	-12344(%rbp), %rbx
	leaq	-12352(%rbp), %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$1, %edx
	movl	$4, %ecx
	movq	%r12, %r8
	callq	_ywrite
	movl	(%r15), %edx
	movq	%r12, %rdi
	movl	$60, %esi
	callq	_fseek
	addq	$-56, -12352(%rbp)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$1, %edx
	movl	$4, %ecx
	movq	%r12, %r8
	callq	_ywrite
	movq	%r12, %rdi
	callq	_fclose
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_2:
	movl	$-1, %eax
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_11
## %bb.10:
	addq	$12392, %rsp                    ## imm = 0x3068
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_scsp,8,3                       ## @scsp
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wb"

L_.str.1:                               ## @.str.1
	.asciz	"RIFF"

L_.str.2:                               ## @.str.2
	.asciz	"WAVE"

L_.str.3:                               ## @.str.3
	.asciz	"fmt "

L_.str.4:                               ## @.str.4
	.asciz	"data"

	.comm	_debugslot,8,3                  ## @debugslot
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function ScspSlotDebugAudioSaveWav
lCPI0_0:
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	44100                           ; 0xac44
	.long	16                              ; 0x10
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
lCPI0_1:
	.long	4                               ; 0x4
	.long	176400                          ; 0x2b110
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_ScspSlotDebugAudioSaveWav
	.p2align	2
_ScspSlotDebugAudioSaveWav:             ; @ScspSlotDebugAudioSaveWav
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	w9, #12384
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #3, lsl #12             ; =12288
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	str	xzr, [sp, #-96]!
Lloh5:
	adrp	x8, _scsp@GOTPAGE
Lloh6:
	ldr	x8, [x8, _scsp@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x8, [x8, x0, lsl #3]
	cbz	x8, LBB0_6
; %bb.1:
	mov	x20, x0
Lloh8:
	adrp	x8, l_.str@PAGE
Lloh9:
	add	x8, x8, l_.str@PAGEOFF
	mov	x0, x1
	mov	x1, x8
	bl	_fopen
	cbz	x0, LBB0_7
; %bb.2:
	mov	x19, x0
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #4
	bl	_memcpy
	str	xzr, [sp, #72]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w2, #4
	bl	_memcpy
	mov	x0, sp
	add	x1, sp, #64
	mov	w2, #1
	mov	w3, #24
	mov	x4, x19
	bl	_ywrite
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w2, #4
	bl	_memcpy
	mov	w8, #16
	str	w8, [sp, #56]
Lloh16:
	adrp	x8, lCPI0_0@PAGE
Lloh17:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	str	q0, [sp, #32]
Lloh18:
	adrp	x8, lCPI0_1@PAGE
Lloh19:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	str	d0, [sp, #48]
	mov	x0, sp
	add	x1, sp, #32
	mov	w2, #1
	mov	w3, #32
	mov	x4, x19
	bl	_ywrite
Lloh20:
	adrp	x1, l_.str.4@PAGE
Lloh21:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w2, #4
	bl	_memcpy
	str	xzr, [sp, #16]
	mov	x0, sp
	add	x1, sp, #16
	mov	w2, #1
	mov	w3, #16
	mov	x4, x19
	bl	_ywrite
	mov	x0, x20
	bl	_ScspSlotResetDebug
	mov	w20, #0
Lloh22:
	adrp	x21, _debugslot@GOTPAGE
Lloh23:
	ldr	x21, [x21, _debugslot@GOTPAGEOFF]
	mov	w22, #47272
	movk	w22, #6, lsl #16
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #1, lsl #12             ; =4096
	add	x0, x0, #88
	add	x1, sp, #88
	mov	w2, #512
	bl	_ScspSlotDebugAudio
	cbz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w23, w20, #512
	mov	x0, sp
	add	x1, sp, #88
	mov	w2, #2
	mov	w3, #1024
	mov	x4, x19
	bl	_ywrite
	ldr	x8, [x21]
	cmp	x8, #0
	ccmp	w20, w22, #0, ne
	mov	x20, x23
	b.lo	LBB0_3
LBB0_5:
	mov	x0, x19
	bl	_ftell
	mov	x20, x0
Lloh24:
	adrp	x21, _SEEK_SET@GOTPAGE
Lloh25:
	ldr	x21, [x21, _SEEK_SET@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	x0, x19
	mov	w1, #16
	bl	_fseek
	sub	x8, x20, #4
	str	x8, [sp, #8]
	mov	x0, sp
	add	x1, sp, #8
	mov	w2, #1
	mov	w3, #4
	mov	x4, x19
	bl	_ywrite
	ldr	w2, [x21]
	mov	x0, x19
	mov	w1, #60
	bl	_fseek
	ldr	x8, [sp, #8]
	sub	x8, x8, #56
	str	x8, [sp, #8]
	mov	x0, sp
	add	x1, sp, #8
	mov	w2, #1
	mov	w3, #4
	mov	x4, x19
	bl	_ywrite
	mov	x0, x19
	bl	_fclose
LBB0_6:
	mov	w0, #0
	b	LBB0_8
LBB0_7:
	mov	w0, #-1
LBB0_8:
	ldur	x8, [x29, #-56]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	add	sp, sp, #3, lsl #12             ; =12288
	add	sp, sp, #96
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdr	Lloh18, Lloh19
	.loh AdrpAdrp	Lloh16, Lloh18
	.loh AdrpLdr	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_scsp,8,3                       ; @scsp
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wb"

l_.str.1:                               ; @.str.1
	.asciz	"RIFF"

l_.str.2:                               ; @.str.2
	.asciz	"WAVE"

l_.str.3:                               ; @.str.3
	.asciz	"fmt "

l_.str.4:                               ; @.str.4
	.asciz	"data"

	.comm	_debugslot,8,3                  ; @debugslot
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
.subsections_via_symbols
