	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_slot_delete                    ## -- Begin function slot_delete
	.p2align	4, 0x90
_slot_delete:                           ## @slot_delete
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movl	%edi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	testl	%r15d, %r15d
	je	LBB0_1
## %bb.5:
	movq	_rominfo@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%ebx, %ebx
	jle	LBB0_7
## %bb.6:
	decl	%ebx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_sprintf
	jmp	LBB0_8
LBB0_1:
	movq	_DEFAULT_PATH@GOTPCREL(%rip), %r15
	movq	(%r15), %rdx
	movq	_rom_filename@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	testl	%ebx, %ebx
	jle	LBB0_3
## %bb.2:
	decl	%ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_sprintf
	movq	%r14, %rdi
	callq	_remove
	movq	(%r15), %rdx
	movq	(%r12), %rcx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_sprintf
	jmp	LBB0_4
LBB0_7:
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_sprintf
LBB0_8:
	movq	_CARD_WORKAREA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SysArea@GOTPCREL(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_memset
	leaq	L_.str.5(%rip), %rdi
	leaq	L_.str.6(%rip), %rsi
	callq	_CARD_Init
	decl	%r15d
	movl	%r15d, %edi
	callq	_CardMount
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movl	%r15d, %edi
	movq	%r14, %rsi
	callq	_CARD_Delete
	movl	%eax, %ebx
	movl	%r15d, %edi
	callq	_CARD_Unmount
	jmp	LBB0_10
LBB0_3:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_sprintf
LBB0_4:
	movq	%r14, %rdi
	callq	_remove
	movl	%eax, %ebx
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movl	%ebx, %eax
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPATHLEN,4,2                 ## @MAXPATHLEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s/saves/%s__%d.png"

	.comm	_DEFAULT_PATH,8,3               ## @DEFAULT_PATH
	.comm	_rom_filename,8,3               ## @rom_filename
L_.str.1:                               ## @.str.1
	.asciz	"%s/saves/%s.gp%d"

L_.str.2:                               ## @.str.2
	.asciz	"%s/saves/%s.srm"

L_.str.3:                               ## @.str.3
	.asciz	"MD-%04X.gp%d"

	.comm	_rominfo,4,2                    ## @rominfo
L_.str.4:                               ## @.str.4
	.asciz	"MD-%04X.srm"

	.comm	_SysArea,4,2                    ## @SysArea
	.comm	_CARD_WORKAREA,4,2              ## @CARD_WORKAREA
L_.str.5:                               ## @.str.5
	.asciz	"GENP"

L_.str.6:                               ## @.str.6
	.asciz	"00"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_slot_delete                    ; -- Begin function slot_delete
	.p2align	2
_slot_delete:                           ; @slot_delete
	.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
	sub	sp, sp, #16
	mov	x20, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _MAXPATHLEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXPATHLEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x19, x9, x8
	mov	sp, x19
	cbz	w1, LBB0_3
; %bb.1:
Lloh8:
	adrp	x8, _rominfo@GOTPAGE
Lloh9:
	ldr	x8, [x8, _rominfo@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	subs	w9, w0, #1
	b.lt	LBB0_5
; %bb.2:
	stp	x8, x9, [sp, #-16]!
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_6
LBB0_3:
Lloh13:
	adrp	x20, _DEFAULT_PATH@GOTPAGE
Lloh14:
	ldr	x20, [x20, _DEFAULT_PATH@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh15:
	adrp	x22, _rom_filename@GOTPAGE
Lloh16:
	ldr	x22, [x22, _rom_filename@GOTPAGEOFF]
	ldr	x9, [x22]
	subs	w21, w0, #1
	b.lt	LBB0_9
; %bb.4:
	stp	x8, x9, [sp, #-32]!
	str	x21, [sp, #16]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_sprintf
	add	sp, sp, #32
	mov	x0, x19
	bl	_remove
	ldr	x8, [x20]
	ldr	x9, [x22]
	sub	sp, sp, #32
	stp	x9, x21, [sp, #8]
	str	x8, [sp]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_sprintf
	add	sp, sp, #32
	b	LBB0_10
LBB0_5:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	str	x8, [sp, #-16]!
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_6:
	mov	x0, x19
	bl	_sprintf
	add	sp, sp, #16
Lloh23:
	adrp	x8, _CARD_WORKAREA@GOTPAGE
Lloh24:
	ldr	x8, [x8, _CARD_WORKAREA@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
Lloh26:
	adrp	x0, _SysArea@GOTPAGE
Lloh27:
	ldr	x0, [x0, _SysArea@GOTPAGEOFF]
	mov	w1, #0
	bl	_memset
Lloh28:
	adrp	x0, l_.str.5@PAGE
Lloh29:
	add	x0, x0, l_.str.5@PAGEOFF
Lloh30:
	adrp	x1, l_.str.6@PAGE
Lloh31:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_CARD_Init
	sub	w20, w20, #1
	mov	x0, x20
	bl	_CardMount
	cbz	x0, LBB0_8
; %bb.7:
	mov	x0, x20
	mov	x1, x19
	bl	_CARD_Delete
	mov	x19, x0
	mov	x0, x20
	bl	_CARD_Unmount
	b	LBB0_11
LBB0_8:
	mov	w19, #0
	b	LBB0_11
LBB0_9:
	stp	x8, x9, [sp, #-16]!
Lloh32:
	adrp	x1, l_.str.2@PAGE
Lloh33:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_sprintf
	add	sp, sp, #16
LBB0_10:
	mov	x0, x19
	bl	_remove
	mov	x19, x0
LBB0_11:
	ldur	x8, [x29, #-40]
Lloh34:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh35:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
	mov	x0, x19
	sub	sp, x29, #32
	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
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPATHLEN,4,2                 ; @MAXPATHLEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s/saves/%s__%d.png"

	.comm	_DEFAULT_PATH,8,3               ; @DEFAULT_PATH
	.comm	_rom_filename,8,3               ; @rom_filename
l_.str.1:                               ; @.str.1
	.asciz	"%s/saves/%s.gp%d"

l_.str.2:                               ; @.str.2
	.asciz	"%s/saves/%s.srm"

l_.str.3:                               ; @.str.3
	.asciz	"MD-%04X.gp%d"

	.comm	_rominfo,4,2                    ; @rominfo
l_.str.4:                               ; @.str.4
	.asciz	"MD-%04X.srm"

	.comm	_SysArea,4,2                    ; @SysArea
	.comm	_CARD_WORKAREA,4,2              ; @CARD_WORKAREA
l_.str.5:                               ; @.str.5
	.asciz	"GENP"

l_.str.6:                               ; @.str.6
	.asciz	"00"

.subsections_via_symbols
