	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_menu_thumbnail_set_system      ## -- Begin function menu_thumbnail_set_system
	.p2align	4, 0x90
_menu_thumbnail_set_system:             ## @menu_thumbnail_set_system
	.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
	subq	$40, %rsp
	.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)
	xorl	%r14d, %r14d
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.1:
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movb	$0, (%rax)
	movq	8(%rdi), %rax
	movb	$0, (%rax)
	movq	16(%rdi), %rax
	movb	$0, (%rax)
	movq	_PLAYLIST_THUMBNAIL_MODE_DEFAULT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 32(%rdi)
	movq	%rax, 24(%rdi)
	movq	%rsi, %rdi
	callq	_string_is_empty
	testq	%rax, %rax
	je	LBB0_2
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	leaq	L_.str(%rip), %rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	$4, %edx
	callq	_strncmp
	testq	%rax, %rax
	movq	16(%r15), %rdi
	cmovneq	%r12, %rbx
	movq	%rbx, %rsi
	movl	$8, %edx
	callq	_strlcpy
	movl	$1, %r14d
	testq	%r13, %r13
	je	LBB0_11
## %bb.3:
	movq	%r13, %rdi
	callq	_playlist_get_conf_path
	movq	%r13, %rbx
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_string_is_empty
	testq	%rax, %rax
	jne	LBB0_11
## %bb.4:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_path_basename
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_string_is_empty
	testq	%rax, %rax
	jne	LBB0_11
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_string_is_equal
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movq	_FILE_PATH_CONTENT_HISTORY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_file_path_str
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_string_is_equal
	testl	%eax, %eax
	jne	LBB0_10
LBB0_7:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	callq	_string_is_equal
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movq	_FILE_PATH_CONTENT_FAVORITES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_file_path_str
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_string_is_equal
	testl	%eax, %eax
	jne	LBB0_10
LBB0_9:
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	_PATH_MAX_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movb	$0, (%rbx)
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_strlcpy
	movq	%rbx, %rdi
	callq	_path_remove_extension
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_string_is_equal
	movq	-64(%rbp), %rsp                 ## 8-byte Reload
	testl	%eax, %eax
	je	LBB0_11
LBB0_10:
	movq	_PLAYLIST_THUMBNAIL_RIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_playlist_get_thumbnail_mode
	movq	%rax, 32(%r15)
	movq	_PLAYLIST_THUMBNAIL_LEFT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_playlist_get_thumbnail_mode
	movq	%rax, 24(%r15)
	jmp	LBB0_11
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PLAYLIST_THUMBNAIL_MODE_DEFAULT,8,3 ## @PLAYLIST_THUMBNAIL_MODE_DEFAULT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MAME"

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

	.comm	_FILE_PATH_CONTENT_HISTORY,4,2  ## @FILE_PATH_CONTENT_HISTORY
L_.str.2:                               ## @.str.2
	.asciz	"favorites"

	.comm	_FILE_PATH_CONTENT_FAVORITES,4,2 ## @FILE_PATH_CONTENT_FAVORITES
	.comm	_PATH_MAX_LENGTH,4,2            ## @PATH_MAX_LENGTH
	.comm	_PLAYLIST_THUMBNAIL_RIGHT,4,2   ## @PLAYLIST_THUMBNAIL_RIGHT
	.comm	_PLAYLIST_THUMBNAIL_LEFT,4,2    ## @PLAYLIST_THUMBNAIL_LEFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_menu_thumbnail_set_system      ; -- Begin function menu_thumbnail_set_system
	.p2align	2
_menu_thumbnail_set_system:             ; @menu_thumbnail_set_system
	.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
	sub	sp, sp, #16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	cbz	x0, LBB0_12
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x8, [x0]
	strb	wzr, [x8]
	ldr	x8, [x0, #8]
	strb	wzr, [x8]
	ldr	x8, [x0, #16]
	strb	wzr, [x8]
Lloh3:
	adrp	x8, _PLAYLIST_THUMBNAIL_MODE_DEFAULT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PLAYLIST_THUMBNAIL_MODE_DEFAULT@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	stp	x8, x8, [x0, #24]
	mov	x0, x1
	bl	_string_is_empty
	mov	x8, x0
	mov	w0, #0
	cbnz	x8, LBB0_12
; %bb.2:
Lloh6:
	adrp	x22, l_.str@PAGE
Lloh7:
	add	x22, x22, l_.str@PAGEOFF
	mov	x0, x21
	mov	x1, x22
	mov	w2, #4
	bl	_strncmp
	ldr	x8, [x19, #16]
	cmp	x0, #0
	csel	x1, x22, x21, eq
	mov	x0, x8
	mov	w2, #8
	bl	_strlcpy
	cbz	x20, LBB0_11
; %bb.3:
	mov	x0, x20
	bl	_playlist_get_conf_path
	mov	x22, x0
	bl	_string_is_empty
	cbnz	x0, LBB0_11
; %bb.4:
	mov	x0, x22
	bl	_path_basename
	mov	x22, x0
	bl	_string_is_empty
	cbnz	x0, LBB0_11
; %bb.5:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_string_is_equal
	cbz	w0, LBB0_7
; %bb.6:
Lloh10:
	adrp	x8, _FILE_PATH_CONTENT_HISTORY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FILE_PATH_CONTENT_HISTORY@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_file_path_str
	mov	x1, x0
	mov	x0, x22
	bl	_string_is_equal
	cbnz	w0, LBB0_10
LBB0_7:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_string_is_equal
	cbz	w0, LBB0_9
; %bb.8:
Lloh15:
	adrp	x8, _FILE_PATH_CONTENT_FAVORITES@GOTPAGE
Lloh16:
	ldr	x8, [x8, _FILE_PATH_CONTENT_FAVORITES@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_file_path_str
	mov	x1, x0
	mov	x0, x22
	bl	_string_is_equal
	cbnz	w0, LBB0_10
LBB0_9:
	mov	x24, sp
Lloh18:
	adrp	x8, _PATH_MAX_LENGTH@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PATH_MAX_LENGTH@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x9, x2
Lloh21:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh22:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x2, #15
	and	x9, x9, #0x1fffffff0
	sub	x23, x8, x9
	mov	sp, x23
	strb	wzr, [x23]
	mov	x0, x23
	mov	x1, x22
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_strlcpy
	mov	x0, x23
	bl	_path_remove_extension
	mov	x1, x21
	bl	_string_is_equal
	mov	sp, x24
	cbz	w0, LBB0_11
LBB0_10:
Lloh23:
	adrp	x8, _PLAYLIST_THUMBNAIL_RIGHT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PLAYLIST_THUMBNAIL_RIGHT@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_playlist_get_thumbnail_mode
	str	x0, [x19, #32]
Lloh26:
	adrp	x8, _PLAYLIST_THUMBNAIL_LEFT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _PLAYLIST_THUMBNAIL_LEFT@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_playlist_get_thumbnail_mode
	str	x0, [x19, #24]
LBB0_11:
	mov	w0, #1
LBB0_12:
	ldur	x8, [x29, #-56]
Lloh29:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	sub	sp, x29, #48
	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_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_PLAYLIST_THUMBNAIL_MODE_DEFAULT,8,3 ; @PLAYLIST_THUMBNAIL_MODE_DEFAULT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MAME"

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

	.comm	_FILE_PATH_CONTENT_HISTORY,4,2  ; @FILE_PATH_CONTENT_HISTORY
l_.str.2:                               ; @.str.2
	.asciz	"favorites"

	.comm	_FILE_PATH_CONTENT_FAVORITES,4,2 ; @FILE_PATH_CONTENT_FAVORITES
	.comm	_PATH_MAX_LENGTH,4,2            ; @PATH_MAX_LENGTH
	.comm	_PLAYLIST_THUMBNAIL_RIGHT,4,2   ; @PLAYLIST_THUMBNAIL_RIGHT
	.comm	_PLAYLIST_THUMBNAIL_LEFT,4,2    ; @PLAYLIST_THUMBNAIL_LEFT
.subsections_via_symbols
