	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xmb_context_reset_background
_xmb_context_reset_background:          ## @xmb_context_reset_background
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_config_get_ptr
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_string_is_empty
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	callq	_string_is_empty
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_1:
	movq	%rbx, %rdi
	callq	_strdup
	movq	%rax, %rbx
	jmp	LBB0_5
LBB0_4:
	movq	_PATH_MAX_LENGTH@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_malloc
	movq	%rax, %rbx
	movb	$0, (%rax)
	movl	(%r15), %ecx
	leaq	L_.str(%rip), %rdx
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_fill_pathname_join
LBB0_5:
	movq	%rbx, %rdi
	callq	_path_is_valid
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	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
LBB0_7:
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.9:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free                           ## TAILCALL
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	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	"bg.png"

	.comm	_menu_display_handle_wallpaper_upload,4,2 ## @menu_display_handle_wallpaper_upload
	.no_dead_strip	_xmb_context_reset_background
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xmb_context_reset_background
_xmb_context_reset_background:          ; @xmb_context_reset_background
	.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
	mov	x20, x0
	bl	_config_get_ptr
	ldr	x19, [x0]
	mov	x0, x19
	bl	_string_is_empty
	cbz	w0, LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_string_is_empty
	cbz	w0, LBB0_4
; %bb.2:
	mov	x19, #0
	b	LBB0_5
LBB0_3:
	mov	x0, x19
	bl	_strdup
	mov	x19, x0
	b	LBB0_5
LBB0_4:
Lloh0:
	adrp	x21, _PATH_MAX_LENGTH@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PATH_MAX_LENGTH@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_malloc
	mov	x19, x0
	strb	wzr, [x0]
	ldr	w3, [x21]
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	mov	x1, x20
	bl	_fill_pathname_join
LBB0_5:
	mov	x0, x19
	bl	_path_is_valid
	cbz	x0, LBB0_7
; %bb.6:
	bl	_video_driver_supports_rgba
	mov	x1, x0
Lloh4:
	adrp	x8, _menu_display_handle_wallpaper_upload@GOTPAGE
Lloh5:
	ldr	x8, [x8, _menu_display_handle_wallpaper_upload@GOTPAGEOFF]
Lloh6:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	x4, #0
	bl	_task_push_image_load
LBB0_7:
	cbz	x19, LBB0_9
; %bb.8:
	mov	x0, x19
	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
	b	_free
LBB0_9:
	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
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_PATH_MAX_LENGTH,4,2            ; @PATH_MAX_LENGTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bg.png"

	.comm	_menu_display_handle_wallpaper_upload,4,2 ; @menu_display_handle_wallpaper_upload
	.no_dead_strip	_xmb_context_reset_background
.subsections_via_symbols
