	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stripes_update_savestate_thumbnail_path
_stripes_update_savestate_thumbnail_path: ## @stripes_update_savestate_thumbnail_path
	.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, %ebx
	movq	%rdi, %r12
	xorl	%eax, %eax
	callq	_config_get_ptr
	testq	%r12, %r12
	je	LBB0_19
## %bb.1:
	movq	%rax, %r14
	leaq	-40(%rbp), %r15
	movq	%r15, %rdi
	callq	_menu_entry_init
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	movl	$1, %r8d
	callq	_menu_entry_get
	movq	(%r12), %rdi
	callq	_string_is_empty
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	(%r12), %rdi
	callq	_free
LBB0_3:
	movq	$0, (%r12)
	movq	-40(%rbp), %rdi
	callq	_string_is_empty
	testl	%eax, %eax
	jne	LBB0_19
## %bb.4:
	cmpq	$0, 8(%r14)
	je	LBB0_19
## %bb.5:
	movq	-40(%rbp), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_string_is_equal
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	movq	-40(%rbp), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_string_is_equal
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	-40(%rbp), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_string_is_equal
	testq	%rax, %rax
	je	LBB0_19
LBB0_8:
	movl	$8204, %edi                     ## imm = 0x200C
	callq	_malloc
	movq	%rax, %r15
	xorl	%eax, %eax
	callq	_global_get_ptr
	movb	$0, (%r15)
	testq	%rax, %rax
	je	LBB0_14
## %bb.9:
	movl	(%r14), %r8d
	testl	%r8d, %r8d
	jle	LBB0_11
## %bb.10:
	movq	(%rax), %rcx
	leaq	L_.str.3(%rip), %rdx
	movl	$8024, %esi                     ## imm = 0x1F58
	movq	%r15, %rdi
	callq	_snprintf
	jmp	LBB0_14
LBB0_11:
	movq	(%rax), %rsi
	js	LBB0_12
## %bb.13:
	movl	$8024, %edx                     ## imm = 0x1F58
	movq	%r15, %rdi
	callq	_strlcpy
	jmp	LBB0_14
LBB0_12:
	leaq	L_.str.4(%rip), %rdx
	movl	$8024, %r8d                     ## imm = 0x1F58
	movq	%r15, %rdi
	movl	$46, %ecx
	callq	_fill_pathname_join_delim
LBB0_14:
	leaq	L_.str.5(%rip), %rsi
	movl	$8024, %edx                     ## imm = 0x1F58
	movq	%r15, %rdi
	callq	_strlcat
	movq	%r15, %rdi
	callq	_path_is_valid
	testq	%rax, %rax
	je	LBB0_18
## %bb.15:
	movq	(%r12), %rdi
	callq	_string_is_empty
	testl	%eax, %eax
	jne	LBB0_17
## %bb.16:
	movq	(%r12), %rdi
	callq	_free
LBB0_17:
	movq	%r15, %rdi
	callq	_strdup
	movq	%rax, (%r12)
LBB0_18:
	movq	%r15, %rdi
	callq	_free
LBB0_19:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"state_slot"

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

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

L_.str.3:                               ## @.str.3
	.asciz	"%s%d"

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

L_.str.5:                               ## @.str.5
	.asciz	".png"

	.no_dead_strip	_stripes_update_savestate_thumbnail_path
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stripes_update_savestate_thumbnail_path
_stripes_update_savestate_thumbnail_path: ; @stripes_update_savestate_thumbnail_path
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x1
	mov	x19, x0
	bl	_config_get_ptr
	cbz	x19, LBB0_19
; %bb.1:
	mov	x20, x0
	add	x0, sp, #8
	bl	_menu_entry_init
	add	x0, sp, #8
	mov	w1, #0
	mov	x2, x21
	mov	x3, #0
	mov	w4, #1
	bl	_menu_entry_get
	ldr	x0, [x19]
	bl	_string_is_empty
	cbnz	w0, LBB0_3
; %bb.2:
	ldr	x0, [x19]
	bl	_free
LBB0_3:
	str	xzr, [x19]
	ldr	x0, [sp, #8]
	bl	_string_is_empty
	cbnz	w0, LBB0_19
; %bb.4:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_19
; %bb.5:
	ldr	x0, [sp, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_string_is_equal
	cbnz	x0, LBB0_8
; %bb.6:
	ldr	x0, [sp, #8]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_string_is_equal
	cbnz	x0, LBB0_8
; %bb.7:
	ldr	x0, [sp, #8]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_string_is_equal
	cbz	x0, LBB0_19
LBB0_8:
	mov	w0, #8204
	bl	_malloc
	mov	x21, x0
	bl	_global_get_ptr
	strb	wzr, [x21]
	cbz	x0, LBB0_14
; %bb.9:
	ldr	w4, [x20]
	cmp	w4, #1
	b.lt	LBB0_11
; %bb.10:
	ldr	x3, [x0]
Lloh6:
	adrp	x2, l_.str.3@PAGE
Lloh7:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x21
	mov	w1, #8024
	bl	_snprintf
	b	LBB0_14
LBB0_11:
	ldr	x1, [x0]
	tbnz	w4, #31, LBB0_13
; %bb.12:
	mov	x0, x21
	mov	w2, #8024
	bl	_strlcpy
	b	LBB0_14
LBB0_13:
Lloh8:
	adrp	x2, l_.str.4@PAGE
Lloh9:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x0, x21
	mov	w3, #46
	mov	w4, #8024
	bl	_fill_pathname_join_delim
LBB0_14:
Lloh10:
	adrp	x1, l_.str.5@PAGE
Lloh11:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x21
	mov	w2, #8024
	bl	_strlcat
	mov	x0, x21
	bl	_path_is_valid
	cbz	x0, LBB0_18
; %bb.15:
	ldr	x0, [x19]
	bl	_string_is_empty
	cbnz	w0, LBB0_17
; %bb.16:
	ldr	x0, [x19]
	bl	_free
LBB0_17:
	mov	x0, x21
	bl	_strdup
	str	x0, [x19]
LBB0_18:
	mov	x0, x21
	bl	_free
LBB0_19:
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"state_slot"

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

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

l_.str.3:                               ; @.str.3
	.asciz	"%s%d"

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

l_.str.5:                               ; @.str.5
	.asciz	".png"

	.no_dead_strip	_stripes_update_savestate_thumbnail_path
.subsections_via_symbols
