	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xmb_list_switch_new
_xmb_list_switch_new:                   ## @xmb_list_switch_new
	.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	%rcx, %r15
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r13
	xorl	%eax, %eax
	callq	_config_get_ptr
	cmpq	$0, 8(%rax)
	je	LBB0_11
## %bb.1:
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_PATH_MAX_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movslq	%eax, %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_malloc
	movq	%rax, %rbx
	movl	20(%r13), %edi
	leaq	L_.str(%rip), %rsi
	leaq	L_.str.1(%rip), %rdx
	callq	_string_replace_substring
	movb	$0, (%rbx)
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rax, %r14
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	_fill_pathname_join_noext
	movq	%r14, %rdi
	callq	_free
LBB0_3:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_strlcat
	movq	%rbx, %rdi
	callq	_path_is_valid
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	_APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_BG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_fill_pathname_application_special
LBB0_5:
	movq	(%r13), %rsi
	movq	%rbx, %rdi
	callq	_string_is_equal
	testl	%eax, %eax
	jne	LBB0_10
## %bb.6:
	movq	%rbx, %rdi
	callq	_path_is_valid
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	xorl	%eax, %eax
	callq	_video_driver_supports_rgba
	movq	_menu_display_handle_wallpaper_upload@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%rbx, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_task_push_image_load
	movq	(%r13), %rdi
	callq	_string_is_empty
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movq	(%r13), %rdi
	callq	_free
LBB0_9:
	movq	%rbx, %rdi
	callq	_strdup
	movq	%rax, (%r13)
LBB0_10:
	movq	%rbx, %rdi
	callq	_free
LBB0_11:
	movq	%r12, %rdi
	callq	_file_list_get_size
	movq	%rax, %rbx
	movl	$0, -48(%rbp)
	decl	%eax
	testq	%rbx, %rbx
	movl	$0, %ecx
	cmovel	%ecx, %eax
	movl	%eax, -44(%rbp)
	leaq	-64(%rbp), %rsi
	xorl	%edi, %edi
	callq	_video_driver_get_size
	movl	-64(%rbp), %esi
	leaq	-48(%rbp), %r8
	leaq	-44(%rbp), %r9
	movq	%r13, %rdi
	movq	%rbx, %rdx
	movl	%r15d, %ecx
	callq	_xmb_calculate_visible_range
	testq	%rbx, %rbx
	je	LBB0_21
## %bb.12:
	xorl	%r14d, %r14d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	$0, (%rax)
	movss	%xmm0, 8(%rax)
	movss	%xmm0, 4(%rax)
LBB0_20:                                ##   in Loop: Header=BB0_13 Depth=1
	incl	%r14d
	cmpq	%r14, %rbx
	jbe	LBB0_21
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_file_list_get_userdata_at_offset
	testq	%rax, %rax
	je	LBB0_20
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movss	8(%r13), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	movl	12(%r13), %ecx
	imull	-60(%rbp), %ecx                 ## 4-byte Folded Reload
	movl	%ecx, (%rax)
	movq	$0, 4(%rax)
	cmpq	%r15, %r14
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	movss	16(%r13), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=1
	cmpl	%r14d, -48(%rbp)
	ja	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_13 Depth=1
	cmpl	%r14d, -44(%rbp)
	jb	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%rax, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_xmb_push_animations
	jmp	LBB0_20
LBB0_21:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PATH_MAX_LENGTH,4,2            ## @PATH_MAX_LENGTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/"

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

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

	.comm	_APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_BG,4,2 ## @APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_BG
	.comm	_menu_display_handle_wallpaper_upload,4,2 ## @menu_display_handle_wallpaper_upload
	.no_dead_strip	_xmb_list_switch_new
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xmb_list_switch_new
_xmb_list_switch_new:                   ; @xmb_list_switch_new
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	bl	_config_get_ptr
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_11
; %bb.1:
	mov	x25, x0
Lloh0:
	adrp	x8, _PATH_MAX_LENGTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PATH_MAX_LENGTH@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	sxtw	x24, w0
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_malloc
	mov	x23, x0
	ldr	w0, [x22, #20]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
Lloh5:
	adrp	x2, l_.str.1@PAGE
Lloh6:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_string_replace_substring
	strb	wzr, [x23]
	cbz	x0, LBB0_3
; %bb.2:
	mov	x26, x0
	ldr	w1, [x25]
	mov	x0, x23
	mov	x2, x26
	mov	x3, x24
	bl	_fill_pathname_join_noext
	mov	x0, x26
	bl	_free
LBB0_3:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x23
	mov	x2, x24
	bl	_strlcat
	mov	x0, x23
	bl	_path_is_valid
	cbnz	x0, LBB0_5
; %bb.4:
Lloh9:
	adrp	x8, _APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_BG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_BG@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x23
	mov	x1, x24
	bl	_fill_pathname_application_special
LBB0_5:
	ldr	x1, [x22]
	mov	x0, x23
	bl	_string_is_equal
	cbnz	w0, LBB0_10
; %bb.6:
	mov	x0, x23
	bl	_path_is_valid
	cbz	x0, LBB0_10
; %bb.7:
	bl	_video_driver_supports_rgba
	mov	x1, x0
Lloh12:
	adrp	x8, _menu_display_handle_wallpaper_upload@GOTPAGE
Lloh13:
	ldr	x8, [x8, _menu_display_handle_wallpaper_upload@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	mov	x0, x23
	mov	w2, #0
	mov	x4, #0
	bl	_task_push_image_load
	ldr	x0, [x22]
	bl	_string_is_empty
	cbnz	w0, LBB0_9
; %bb.8:
	ldr	x0, [x22]
	bl	_free
LBB0_9:
	mov	x0, x23
	bl	_strdup
	str	x0, [x22]
LBB0_10:
	mov	x0, x23
	bl	_free
LBB0_11:
	mov	x0, x21
	bl	_file_list_get_size
	mov	x23, x0
	sub	w8, w23, #1
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	stp	w8, wzr, [sp, #8]
	add	x1, sp, #4
	mov	x0, #0
	bl	_video_driver_get_size
	ldr	w1, [sp, #4]
	add	x4, sp, #12
	add	x5, sp, #8
	mov	x0, x22
	mov	x2, x23
	mov	x3, x19
	bl	_xmb_calculate_visible_range
	cbz	x23, LBB0_20
; %bb.12:
	mov	x24, #0
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=1
	str	wzr, [x0]
	stp	s0, s0, [x0, #4]
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	w24, w24, #1
	cmp	x23, x24
	b.ls	LBB0_20
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x24
	bl	_file_list_get_userdata_at_offset
	cbz	x0, LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	s0, [x22, #8]
	ldr	w8, [x22, #12]
	mul	w8, w8, w20
	stp	wzr, wzr, [x0, #4]
	str	w8, [x0]
	cmp	x24, x19
	b.ne	LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	s0, [x22, #16]
LBB0_18:                                ;   in Loop: Header=BB0_15 Depth=1
	ldp	w9, w8, [sp, #8]
	cmp	w8, w24
	ccmp	w9, w24, #0, ls
	b.lo	LBB0_13
; %bb.19:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x1, x21
	mov	w2, #0
	bl	_xmb_push_animations
	b	LBB0_14
LBB0_20:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_PATH_MAX_LENGTH,4,2            ; @PATH_MAX_LENGTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/"

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

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

	.comm	_APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_BG,4,2 ; @APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_BG
	.comm	_menu_display_handle_wallpaper_upload,4,2 ; @menu_display_handle_wallpaper_upload
	.no_dead_strip	_xmb_list_switch_new
.subsections_via_symbols
