	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SndSave_CloseSoundFile         ## -- Begin function SndSave_CloseSoundFile
	.p2align	4, 0x90
_SndSave_CloseSoundFile:                ## @SndSave_CloseSoundFile
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_sndoutput@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.1:
	movq	_byteswritten@GOTPCREL(%rip), %r12
	movl	$36, %ebx
	testb	$1, (%r12)
	je	LBB0_5
## %bb.2:
	xorl	%edi, %edi
	callq	_putc
	movq	_EOF@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	sete	%al
	jne	LBB0_4
## %bb.3:
	movq	_FALSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
LBB0_4:
	movb	%al, %bl
	xorl	$37, %ebx
LBB0_5:
	testl	%r14d, %r14d
	je	LBB0_6
## %bb.7:
	movq	(%r15), %rdi
	movq	_SEEK_SET@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movl	$4, %esi
	callq	_fseek
	testq	%rax, %rax
	jne	LBB0_8
## %bb.9:
	addl	(%r12), %ebx
	movl	%ebx, %edi
	callq	_write32
	movq	(%r15), %rdi
	movl	(%r13), %edx
	movl	$40, %esi
	callq	_fseek
	testq	%rax, %rax
	je	LBB0_10
LBB0_8:
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_11
LBB0_6:
	xorl	%r14d, %r14d
	jmp	LBB0_11
LBB0_10:
	movl	(%r12), %edi
	callq	_write32
LBB0_11:
	movq	(%r15), %rdi
	callq	_fclose
	movq	$0, (%r15)
LBB0_12:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_sndoutput,8,3                  ## @sndoutput
	.comm	_byteswritten,4,2               ## @byteswritten
	.comm	_EOF,8,3                        ## @EOF
	.comm	_FALSE,4,2                      ## @FALSE
	.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
	.globl	_SndSave_CloseSoundFile         ; -- Begin function SndSave_CloseSoundFile
	.p2align	2
_SndSave_CloseSoundFile:                ; @SndSave_CloseSoundFile
	.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
Lloh0:
	adrp	x8, _TRUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
Lloh3:
	adrp	x20, _sndoutput@GOTPAGE
Lloh4:
	ldr	x20, [x20, _sndoutput@GOTPAGEOFF]
	ldr	x1, [x20]
	cbz	x1, LBB0_8
; %bb.1:
Lloh5:
	adrp	x21, _byteswritten@GOTPAGE
Lloh6:
	ldr	x21, [x21, _byteswritten@GOTPAGEOFF]
	mov	w22, #36
	ldrb	w8, [x21]
	tbz	w8, #0, LBB0_3
; %bb.2:
	mov	w0, #0
	bl	_putc
Lloh7:
	adrp	x8, _EOF@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EOF@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _FALSE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _FALSE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	cmp	x0, x8
	csel	w19, w9, w19, eq
	cinc	w22, w22, ne
LBB0_3:
	cbz	w19, LBB0_7
; %bb.4:
	ldr	x0, [x20]
Lloh13:
	adrp	x23, _SEEK_SET@GOTPAGE
Lloh14:
	ldr	x23, [x23, _SEEK_SET@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	w1, #4
	bl	_fseek
	cbnz	x0, LBB0_6
; %bb.5:
	ldr	w8, [x21]
	add	w0, w22, w8
	bl	_write32
	ldr	x0, [x20]
	ldr	w2, [x23]
	mov	w1, #40
	bl	_fseek
	cbz	x0, LBB0_9
LBB0_6:
Lloh15:
	adrp	x8, _FALSE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh17:
	ldr	w19, [x8]
LBB0_7:
	ldr	x0, [x20]
	bl	_fclose
	str	xzr, [x20]
LBB0_8:
	mov	x0, x19
	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_9:
	ldr	w0, [x21]
	bl	_write32
	b	LBB0_7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_sndoutput,8,3                  ; @sndoutput
	.comm	_byteswritten,4,2               ; @byteswritten
	.comm	_EOF,8,3                        ; @EOF
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
.subsections_via_symbols
