	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xmb_list_insert
_xmb_list_insert:                       ## @xmb_list_insert
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movq	%rcx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r12
	xorl	%eax, %eax
	callq	_menu_navigation_get_selection
	testq	%r12, %r12
	je	LBB0_12
## %bb.1:
	testq	%r15, %r15
	je	LBB0_12
## %bb.2:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_file_list_get_userdata_at_offset
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	testq	%r13, %r13
	je	LBB0_13
LBB0_5:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_string_is_empty
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	movq	32(%r13), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:
	callq	_free
LBB0_8:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_strdup
	movq	%rax, 32(%r13)
LBB0_9:
	movl	8(%r12), %eax
	movl	%eax, 8(%r13)
	movl	4(%r12), %ecx
	movl	%ecx, (%r13)
	movl	%eax, 4(%r13)
	movq	%r12, %rdi
	movl	%r14d, %esi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_xmb_item_y
	movl	%eax, 24(%r13)
	movq	$0, 16(%r13)
	cmpl	%ebx, %r14d
	jne	LBB0_11
## %bb.10:
	movl	(%r12), %eax
	movl	%eax, 8(%r13)
	movl	%eax, 4(%r13)
	movl	%eax, (%r13)
LBB0_11:
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%r13, %rdx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_file_list_set_userdata         ## TAILCALL
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	xorl	%eax, %eax
	callq	_xmb_alloc_node
	movq	%rax, %r13
	testq	%r13, %r13
	jne	LBB0_5
LBB0_13:
	leaq	L_.str(%rip), %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_RARCH_ERR                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"XMB node could not be allocated.\n"

	.no_dead_strip	_xmb_list_insert
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xmb_list_insert
_xmb_list_insert:                       ; @xmb_list_insert
	.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
	mov	x19, x5
	mov	x24, x3
	mov	x20, x1
	mov	x21, x0
	bl	_menu_navigation_get_selection
	cbz	x21, LBB0_11
; %bb.1:
	cbz	x20, LBB0_11
; %bb.2:
	mov	x22, x0
	mov	x0, x20
	mov	x1, x19
	bl	_file_list_get_userdata_at_offset
	mov	x23, x0
	cbz	x0, LBB0_12
; %bb.3:
	cbz	x23, LBB0_13
LBB0_4:
	mov	x0, x24
	bl	_string_is_empty
	cbnz	w0, LBB0_8
; %bb.5:
	ldr	x0, [x23, #32]
	cbz	x0, LBB0_7
; %bb.6:
	bl	_free
LBB0_7:
	mov	x0, x24
	bl	_strdup
	str	x0, [x23, #32]
LBB0_8:
	ldp	w9, w8, [x21, #4]
	stp	w8, w8, [x23, #4]
	str	w9, [x23]
	mov	x0, x21
	mov	x1, x19
	mov	x2, x22
	bl	_xmb_item_y
	str	w0, [x23, #24]
	str	xzr, [x23, #16]
	cmp	w19, w22
	b.ne	LBB0_10
; %bb.9:
	ldr	w8, [x21]
	stp	w8, w8, [x23, #4]
	str	w8, [x23]
LBB0_10:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x23
	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
	b	_file_list_set_userdata
LBB0_11:
	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_12:
	bl	_xmb_alloc_node
	mov	x23, x0
	cbnz	x23, LBB0_4
LBB0_13:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	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
	b	_RARCH_ERR
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"XMB node could not be allocated.\n"

	.no_dead_strip	_xmb_list_insert
.subsections_via_symbols
